mirror of
https://github.com/google/blockly.git
synced 2026-01-13 20:07:08 +01:00
Refresh XML in generator unit tests.
This commit is contained in:
@@ -961,9 +961,9 @@ Blockly.Trashcan.prototype.position=function(){var a=this.workspace_.getMetrics(
|
||||
Blockly.Trashcan.prototype.getRect=function(){var a=Blockly.getSvgXY_(this.svgGroup_);return new goog.math.Rect(a.x-this.MARGIN_HOTSPOT_,a.y-this.MARGIN_HOTSPOT_,this.WIDTH_+2*this.MARGIN_HOTSPOT_,this.BODY_HEIGHT_+this.LID_HEIGHT_+2*this.MARGIN_HOTSPOT_)};Blockly.Trashcan.prototype.setOpen_=function(a){this.isOpen!=a&&(goog.Timer.clear(this.lidTask_),this.isOpen=a,this.animateLid_())};
|
||||
Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2:-.2;this.lidOpen_=goog.math.clamp(this.lidOpen_,0,1);var a=45*this.lidOpen_;this.svgLid_.setAttribute("transform","rotate("+(this.workspace_.RTL?-a:a)+", "+(this.workspace_.RTL?4:this.WIDTH_-4)+", "+(this.LID_HEIGHT_-2)+")");a=goog.math.lerp(.4,.8,this.lidOpen_);this.svgGroup_.style.opacity=a;0<this.lidOpen_&&1>this.lidOpen_&&(this.lidTask_=goog.Timer.callOnce(this.animateLid_,20,this))};
|
||||
Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)};Blockly.Xml={};Blockly.Xml.workspaceToDom=function(a){var b;a.RTL&&(b=a.getWidth());for(var c=goog.dom.createDom("xml"),d=a.getTopBlocks(!0),e=0,f;f=d[e];e++){var g=Blockly.Xml.blockToDom_(f);f=f.getRelativeToSurfaceXY();g.setAttribute("x",Math.round(a.RTL?b-f.x:f.x));g.setAttribute("y",Math.round(f.y));c.appendChild(g)}return c};
|
||||
Blockly.Xml.blockToDom_=function(a){var b=goog.dom.createDom("block");b.setAttribute("type",a.type);b.setAttribute("id",a.id);if(a.mutationToDom){var c=a.mutationToDom();c&&b.appendChild(c)}for(var c=0,d;d=a.inputList[c];c++)for(var e=0,f;f=d.fieldRow[e];e++)if(f.name&&f.EDITABLE){var g=goog.dom.createDom("field",null,f.getValue());g.setAttribute("name",f.name);b.appendChild(g)}if(c=a.getCommentText())c=goog.dom.createDom("comment",null,c),"object"==typeof a.comment&&(c.setAttribute("pinned",a.comment.isVisible()),
|
||||
d=a.comment.getBubbleSize(),c.setAttribute("h",d.height),c.setAttribute("w",d.width)),b.appendChild(c);a.data&&(c=goog.dom.createDom("data",null,a.data),b.appendChild(c));for(c=0;d=a.inputList[c];c++){var h,e=!0;d.type!=Blockly.DUMMY_INPUT&&(f=d.connection.targetBlock(),d.type==Blockly.INPUT_VALUE?h=goog.dom.createDom("value"):d.type==Blockly.NEXT_STATEMENT&&(h=goog.dom.createDom("statement")),f&&(h.appendChild(Blockly.Xml.blockToDom_(f)),e=!1),h.setAttribute("name",d.name),e||b.appendChild(h))}a.inputsInlineDefault!=
|
||||
a.inputsInline&&b.setAttribute("inline",a.inputsInline);a.isCollapsed()&&b.setAttribute("collapsed",!0);a.disabled&&b.setAttribute("disabled",!0);a.isDeletable()||b.setAttribute("deletable",!1);a.isMovable()||b.setAttribute("movable",!1);a.isEditable()||b.setAttribute("editable",!1);if(a=a.getNextBlock())h=goog.dom.createDom("next",null,Blockly.Xml.blockToDom_(a)),b.appendChild(h);return b};Blockly.Xml.domToText=function(a){return(new XMLSerializer).serializeToString(a)};
|
||||
Blockly.Xml.blockToDom_=function(a){var b=goog.dom.createDom("block");b.setAttribute("type",a.type);b.setAttribute("id",a.id);if(a.mutationToDom){var c=a.mutationToDom();c&&(c.hasChildNodes()||c.hasAttributes())&&b.appendChild(c)}for(var c=0,d;d=a.inputList[c];c++)for(var e=0,f;f=d.fieldRow[e];e++)if(f.name&&f.EDITABLE){var g=goog.dom.createDom("field",null,f.getValue());g.setAttribute("name",f.name);b.appendChild(g)}if(c=a.getCommentText())c=goog.dom.createDom("comment",null,c),"object"==typeof a.comment&&
|
||||
(c.setAttribute("pinned",a.comment.isVisible()),d=a.comment.getBubbleSize(),c.setAttribute("h",d.height),c.setAttribute("w",d.width)),b.appendChild(c);a.data&&(c=goog.dom.createDom("data",null,a.data),b.appendChild(c));for(c=0;d=a.inputList[c];c++){var h,e=!0;d.type!=Blockly.DUMMY_INPUT&&(f=d.connection.targetBlock(),d.type==Blockly.INPUT_VALUE?h=goog.dom.createDom("value"):d.type==Blockly.NEXT_STATEMENT&&(h=goog.dom.createDom("statement")),f&&(h.appendChild(Blockly.Xml.blockToDom_(f)),e=!1),h.setAttribute("name",
|
||||
d.name),e||b.appendChild(h))}a.inputsInlineDefault!=a.inputsInline&&b.setAttribute("inline",a.inputsInline);a.isCollapsed()&&b.setAttribute("collapsed",!0);a.disabled&&b.setAttribute("disabled",!0);a.isDeletable()||b.setAttribute("deletable",!1);a.isMovable()||b.setAttribute("movable",!1);a.isEditable()||b.setAttribute("editable",!1);if(a=a.getNextBlock())h=goog.dom.createDom("next",null,Blockly.Xml.blockToDom_(a)),b.appendChild(h);return b};Blockly.Xml.domToText=function(a){return(new XMLSerializer).serializeToString(a)};
|
||||
Blockly.Xml.domToPrettyText=function(a){a=Blockly.Xml.domToText(a).split("<");for(var b="",c=1;c<a.length;c++){var d=a[c];"/"==d[0]&&(b=b.substring(2));a[c]=b+"<"+d;"/"!=d[0]&&"/>"!=d.slice(-2)&&(b+=" ")}a=a.join("\n");a=a.replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g,"$1</$2>");return a.replace(/^\n/,"")};
|
||||
Blockly.Xml.textToDom=function(a){a=(new DOMParser).parseFromString(a,"text/xml");if(!a||!a.firstChild||"xml"!=a.firstChild.nodeName.toLowerCase()||a.firstChild!==a.lastChild)throw"Blockly.Xml.textToDom did not obtain a valid XML tree.";return a.firstChild};
|
||||
Blockly.Xml.domToWorkspace=function(a,b){var c;a.RTL&&(c=a.getWidth());for(var d=b.childNodes.length,e=0;e<d;e++){var f=b.childNodes[e];if("block"==f.nodeName.toLowerCase()){var g=Blockly.Xml.domToBlock(a,f),h=parseInt(f.getAttribute("x"),10),f=parseInt(f.getAttribute("y"),10);isNaN(h)||isNaN(f)||g.moveBy(a.RTL?c-h:h,f)}}};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -66,7 +66,7 @@ Blockly.Xml.blockToDom_ = function(block) {
|
||||
if (block.mutationToDom) {
|
||||
// Custom data for an advanced block.
|
||||
var mutation = block.mutationToDom();
|
||||
if (mutation) {
|
||||
if (mutation && (mutation.hasChildNodes() || mutation.hasAttributes())) {
|
||||
element.appendChild(mutation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,23 @@
|
||||
<xml xmlns="http://www.w3.org/1999/xhtml">
|
||||
<block type="procedures_defnoreturn" x="260" y="14">
|
||||
<field name="NAME">test colour picker</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">static colour</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="colour_picker">
|
||||
<field name="COLOUR">#ff6600</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="text">
|
||||
<field name="TEXT">#ff6600</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="630" y="13">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test rgb</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
@@ -32,25 +49,6 @@
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="260" y="14">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test colour picker</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">static colour</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="colour_picker">
|
||||
<field name="COLOUR">#ff6600</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="text">
|
||||
<field name="TEXT">#ff6600</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="unittest_main" x="-5" y="49">
|
||||
<statement name="DO">
|
||||
<block type="procedures_callnoreturn">
|
||||
@@ -73,8 +71,124 @@
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-7" y="223">
|
||||
<field name="NAME">test colour random</field>
|
||||
<statement name="STACK">
|
||||
<block type="controls_repeat_ext" inline="true">
|
||||
<value name="TIMES">
|
||||
<block type="math_number">
|
||||
<field name="NUM">100</field>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">item</field>
|
||||
<value name="VALUE">
|
||||
<block type="colour_random"></block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">test name</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_length" inline="false">
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">item</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="math_number">
|
||||
<field name="NUM">7</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">test name</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_charAt">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="WHERE">FIRST</field>
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">item</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="text">
|
||||
<field name="TEXT">#</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for">
|
||||
<field name="VAR">i</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
<field name="NUM">2</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<block type="math_number">
|
||||
<field name="NUM">7</field>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="unittest_assertvalue" inline="false">
|
||||
<field name="MESSAGE">test name</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">NEQ</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
<field name="NUM">0</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="text_indexOf" inline="false">
|
||||
<field name="END">FIRST</field>
|
||||
<value name="VALUE">
|
||||
<block type="text">
|
||||
<field name="TEXT">abcdefABDEF0123456789</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="FIND">
|
||||
<block type="text_charAt">
|
||||
<mutation at="true"></mutation>
|
||||
<field name="WHERE">FROM_START</field>
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">item</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="AT">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">i</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="520" y="205">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test blend</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
@@ -120,122 +234,4 @@
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-7" y="223">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test colour random</field>
|
||||
<statement name="STACK">
|
||||
<block type="controls_repeat_ext" inline="true">
|
||||
<value name="TIMES">
|
||||
<block type="math_number">
|
||||
<field name="NUM">100</field>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">item</field>
|
||||
<value name="VALUE">
|
||||
<block type="colour_random"></block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">test name</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_length" inline="false">
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">item</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="math_number">
|
||||
<field name="NUM">7</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">test name</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_charAt" inline="true">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="WHERE">FIRST</field>
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">item</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="text">
|
||||
<field name="TEXT">#</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<field name="VAR">i</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
<field name="NUM">2</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<block type="math_number">
|
||||
<field name="NUM">7</field>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="unittest_assertvalue" inline="false">
|
||||
<field name="MESSAGE">test name</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<field name="OP">NEQ</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
<field name="NUM">0</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="text_indexOf" inline="false">
|
||||
<field name="END">FIRST</field>
|
||||
<value name="VALUE">
|
||||
<block type="text">
|
||||
<field name="TEXT">abcdefABDEF0123456789</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="FIND">
|
||||
<block type="text_charAt" inline="true">
|
||||
<mutation at="true"></mutation>
|
||||
<field name="WHERE">FROM_START</field>
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">item</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="AT">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">i</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
</xml>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Blockly Generator Tests</title>
|
||||
<script src="../../blockly_uncompressed.js"></script>
|
||||
|
||||
<script src="../../generators/javascript.js"></script>
|
||||
<script src="unittest_javascript.js"></script>
|
||||
<script src="../../generators/javascript/logic.js"></script>
|
||||
@@ -14,6 +15,7 @@
|
||||
<script src="../../generators/javascript/colour.js"></script>
|
||||
<script src="../../generators/javascript/variables.js"></script>
|
||||
<script src="../../generators/javascript/procedures.js"></script>
|
||||
|
||||
<script src="../../generators/python.js"></script>
|
||||
<script src="unittest_python.js"></script>
|
||||
<script src="../../generators/python/logic.js"></script>
|
||||
@@ -25,16 +27,16 @@
|
||||
<script src="../../generators/python/variables.js"></script>
|
||||
<script src="../../generators/python/procedures.js"></script>
|
||||
|
||||
<script src="../../generators/php.js"></script>
|
||||
<script src="unittest_php.js"></script>
|
||||
<script src="../../generators/php/logic.js"></script>
|
||||
<script src="../../generators/php/loops.js"></script>
|
||||
<script src="../../generators/php/math.js"></script>
|
||||
<script src="../../generators/php/text.js"></script>
|
||||
<script src="../../generators/php/lists.js"></script>
|
||||
<script src="../../generators/php/colour.js"></script>
|
||||
<script src="../../generators/php/variables.js"></script>
|
||||
<script src="../../generators/php/procedures.js"></script>
|
||||
<script src="../../generators/php.js"></script>
|
||||
<script src="unittest_php.js"></script>
|
||||
<script src="../../generators/php/logic.js"></script>
|
||||
<script src="../../generators/php/loops.js"></script>
|
||||
<script src="../../generators/php/math.js"></script>
|
||||
<script src="../../generators/php/text.js"></script>
|
||||
<script src="../../generators/php/lists.js"></script>
|
||||
<script src="../../generators/php/colour.js"></script>
|
||||
<script src="../../generators/php/variables.js"></script>
|
||||
<script src="../../generators/php/procedures.js"></script>
|
||||
|
||||
<script src="../../generators/dart.js"></script>
|
||||
<script src="unittest_dart.js"></script>
|
||||
@@ -46,6 +48,7 @@
|
||||
<script src="../../generators/dart/colour.js"></script>
|
||||
<script src="../../generators/dart/variables.js"></script>
|
||||
<script src="../../generators/dart/procedures.js"></script>
|
||||
|
||||
<script src="unittest.js"></script>
|
||||
<script src="../../msg/messages.js"></script>
|
||||
<script src="../../blocks/logic.js"></script>
|
||||
@@ -104,6 +107,8 @@ function fetchFile(xmlUrl) {
|
||||
function fromXml(xmlText) {
|
||||
var output = document.getElementById('importExport');
|
||||
output.value = xmlText;
|
||||
output.scrollTop = 0;
|
||||
output.scrollLeft = 0;
|
||||
workspace.clear();
|
||||
try {
|
||||
var xmlDoc = Blockly.Xml.textToDom(xmlText);
|
||||
@@ -124,6 +129,7 @@ function setOutput(text) {
|
||||
function toXml() {
|
||||
var xmlDom = Blockly.Xml.workspaceToDom(workspace);
|
||||
var xmlText = Blockly.Xml.domToPrettyText(xmlDom);
|
||||
xmlText = xmlText.replace(/ id="\d+"/g, '');
|
||||
setOutput(xmlText);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -79,7 +79,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="385" y="-3">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test if</field>
|
||||
<statement name="STACK">
|
||||
<block type="controls_if" inline="false">
|
||||
@@ -295,14 +294,13 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-7" y="384">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test equalities</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertvalue" inline="false">
|
||||
<field name="MESSAGE">Equal yes</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -321,7 +319,7 @@
|
||||
<field name="MESSAGE">Equal no</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -340,7 +338,7 @@
|
||||
<field name="MESSAGE">Not equal yes</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">NEQ</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -359,7 +357,7 @@
|
||||
<field name="MESSAGE">Not equal no</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -378,7 +376,7 @@
|
||||
<field name="MESSAGE">Smaller yes</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">LT</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -397,7 +395,7 @@
|
||||
<field name="MESSAGE">Smaller no</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">LT</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -416,7 +414,7 @@
|
||||
<field name="MESSAGE">Greater yes</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">GT</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -435,7 +433,7 @@
|
||||
<field name="MESSAGE">Greater no</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">GT</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -454,7 +452,7 @@
|
||||
<field name="MESSAGE">Smaller-equal yes</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">LTE</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -473,7 +471,7 @@
|
||||
<field name="MESSAGE">Smaller-equal no</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">LTE</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -492,7 +490,7 @@
|
||||
<field name="MESSAGE">Greater-equal yes</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">GTE</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -511,7 +509,7 @@
|
||||
<field name="MESSAGE">Greater-equal no</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">GTE</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -551,14 +549,13 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-5" y="1200">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test or</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertvalue" inline="false">
|
||||
<field name="MESSAGE">Or true/true</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_operation" inline="true">
|
||||
<block type="logic_operation">
|
||||
<field name="OP">OR</field>
|
||||
<value name="A">
|
||||
<block type="logic_boolean">
|
||||
@@ -577,7 +574,7 @@
|
||||
<field name="MESSAGE">Or false/true</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_operation" inline="true">
|
||||
<block type="logic_operation">
|
||||
<field name="OP">OR</field>
|
||||
<value name="A">
|
||||
<block type="logic_boolean">
|
||||
@@ -596,7 +593,7 @@
|
||||
<field name="MESSAGE">Or true/false</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_operation" inline="true">
|
||||
<block type="logic_operation">
|
||||
<field name="OP">OR</field>
|
||||
<value name="A">
|
||||
<block type="logic_boolean">
|
||||
@@ -615,7 +612,7 @@
|
||||
<field name="MESSAGE">Or false/false</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_operation" inline="true">
|
||||
<block type="logic_operation">
|
||||
<field name="OP">OR</field>
|
||||
<value name="A">
|
||||
<block type="logic_boolean">
|
||||
@@ -639,14 +636,13 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="385" y="1208">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test and</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertvalue" inline="false">
|
||||
<field name="MESSAGE">And true/true</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_operation" inline="true">
|
||||
<block type="logic_operation">
|
||||
<field name="OP">AND</field>
|
||||
<value name="A">
|
||||
<block type="logic_boolean">
|
||||
@@ -665,7 +661,7 @@
|
||||
<field name="MESSAGE">And false/true</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_operation" inline="true">
|
||||
<block type="logic_operation">
|
||||
<field name="OP">AND</field>
|
||||
<value name="A">
|
||||
<block type="logic_boolean">
|
||||
@@ -684,7 +680,7 @@
|
||||
<field name="MESSAGE">And true/false</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_operation" inline="true">
|
||||
<block type="logic_operation">
|
||||
<field name="OP">AND</field>
|
||||
<value name="A">
|
||||
<block type="logic_boolean">
|
||||
@@ -703,7 +699,7 @@
|
||||
<field name="MESSAGE">And false/false</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_operation" inline="true">
|
||||
<block type="logic_operation">
|
||||
<field name="OP">AND</field>
|
||||
<value name="A">
|
||||
<block type="logic_boolean">
|
||||
@@ -727,7 +723,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="3" y="1527">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test ternary</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<block type="controls_whileUntil" inline="false">
|
||||
<field name="MODE">WHILE</field>
|
||||
<value name="BOOL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">NEQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -170,7 +170,7 @@
|
||||
<block type="controls_whileUntil" inline="false">
|
||||
<field name="MODE">UNTIL</field>
|
||||
<value name="BOOL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
<xml xmlns="http://www.w3.org/1999/xhtml">
|
||||
<block type="unittest_main" x="66" y="-2">
|
||||
<statement name="DO">
|
||||
<block type="procedures_callnoreturn">
|
||||
<mutation name="test count"></mutation>
|
||||
<next>
|
||||
<block type="procedures_callnoreturn">
|
||||
<mutation name="test count by"></mutation>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="679" y="-10">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test count by</field>
|
||||
<statement name="STACK">
|
||||
<block type="variables_set" inline="false">
|
||||
@@ -11,7 +22,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
@@ -60,7 +71,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
@@ -107,7 +118,7 @@
|
||||
<block type="lists_create_empty"></block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
@@ -125,7 +136,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="lists_setIndex" inline="true">
|
||||
<block type="lists_setIndex">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="MODE">INSERT</field>
|
||||
<field name="WHERE">LAST</field>
|
||||
@@ -186,10 +197,10 @@
|
||||
<block type="lists_create_empty"></block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -204,7 +215,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -219,7 +230,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<value name="BY">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MINUS</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -234,7 +245,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="lists_setIndex" inline="true">
|
||||
<block type="lists_setIndex">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="MODE">INSERT</field>
|
||||
<field name="WHERE">LAST</field>
|
||||
@@ -310,10 +321,10 @@
|
||||
<block type="lists_create_empty"></block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -328,7 +339,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -348,7 +359,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="lists_setIndex" inline="true">
|
||||
<block type="lists_setIndex">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="MODE">INSERT</field>
|
||||
<field name="WHERE">LAST</field>
|
||||
@@ -404,10 +415,10 @@
|
||||
<block type="lists_create_empty"></block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -422,7 +433,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -437,7 +448,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<value name="BY">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -452,7 +463,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="lists_setIndex" inline="true">
|
||||
<block type="lists_setIndex">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="MODE">INSERT</field>
|
||||
<field name="WHERE">LAST</field>
|
||||
@@ -543,20 +554,7 @@
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="unittest_main" x="66" y="-2">
|
||||
<statement name="DO">
|
||||
<block type="procedures_callnoreturn">
|
||||
<mutation name="test count"></mutation>
|
||||
<next>
|
||||
<block type="procedures_callnoreturn">
|
||||
<mutation name="test count by"></mutation>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="29" y="184">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test count</field>
|
||||
<statement name="STACK">
|
||||
<block type="variables_set" inline="false">
|
||||
@@ -567,7 +565,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
@@ -611,7 +609,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
@@ -653,10 +651,10 @@
|
||||
<block type="lists_create_empty"></block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -671,7 +669,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -686,7 +684,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="lists_setIndex" inline="true">
|
||||
<block type="lists_setIndex">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="MODE">INSERT</field>
|
||||
<field name="WHERE">LAST</field>
|
||||
@@ -742,10 +740,10 @@
|
||||
<block type="lists_create_empty"></block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -760,7 +758,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -775,7 +773,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="lists_setIndex" inline="true">
|
||||
<block type="lists_setIndex">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="MODE">INSERT</field>
|
||||
<field name="WHERE">LAST</field>
|
||||
|
||||
@@ -11,333 +11,7 @@
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="600" y="300">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test break</field>
|
||||
<statement name="STACK">
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">count</field>
|
||||
<value name="VALUE">
|
||||
<block type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_whileUntil" inline="false">
|
||||
<field name="MODE">WHILE</field>
|
||||
<value name="BOOL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<field name="OP">NEQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="math_number">
|
||||
<field name="NUM">10</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare" inline="true">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO0">
|
||||
<block type="controls_flow_statements">
|
||||
<field name="FLOW">BREAK</field>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="math_change" inline="false">
|
||||
<field name="VAR">count</field>
|
||||
<value name="DELTA">
|
||||
<block type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">while break</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">count</field>
|
||||
<value name="VALUE">
|
||||
<block type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_whileUntil" inline="false">
|
||||
<field name="MODE">UNTIL</field>
|
||||
<value name="BOOL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="math_number">
|
||||
<field name="NUM">10</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare" inline="true">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO0">
|
||||
<block type="controls_flow_statements">
|
||||
<field name="FLOW">BREAK</field>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="math_change" inline="false">
|
||||
<field name="VAR">count</field>
|
||||
<value name="DELTA">
|
||||
<block type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">until break</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">log</field>
|
||||
<value name="VALUE">
|
||||
<block type="text">
|
||||
<field name="TEXT"></field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<block type="math_number">
|
||||
<field name="NUM">8</field>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare" inline="true">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO0">
|
||||
<block type="controls_flow_statements">
|
||||
<field name="FLOW">BREAK</field>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="text_append" inline="false">
|
||||
<field name="VAR">log</field>
|
||||
<value name="TEXT">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">count break</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">log</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="text">
|
||||
<field name="TEXT">1234</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">log</field>
|
||||
<value name="VALUE">
|
||||
<block type="text">
|
||||
<field name="TEXT"></field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_forEach" inline="false">
|
||||
<field name="VAR">x</field>
|
||||
<value name="LIST">
|
||||
<block type="lists_create_with" inline="false">
|
||||
<mutation items="4"></mutation>
|
||||
<value name="ADD0">
|
||||
<block type="text">
|
||||
<field name="TEXT">a</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD1">
|
||||
<block type="text">
|
||||
<field name="TEXT">b</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD2">
|
||||
<block type="text">
|
||||
<field name="TEXT">c</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD3">
|
||||
<block type="text">
|
||||
<field name="TEXT">d</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare" inline="true">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="text">
|
||||
<field name="TEXT">c</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO0">
|
||||
<block type="controls_flow_statements">
|
||||
<field name="FLOW">BREAK</field>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="text_append" inline="false">
|
||||
<field name="VAR">log</field>
|
||||
<value name="TEXT">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">for break</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">log</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="text">
|
||||
<field name="TEXT">ab</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="13" y="300">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test continue</field>
|
||||
<statement name="STACK">
|
||||
<block type="variables_set" inline="false">
|
||||
@@ -359,7 +33,7 @@
|
||||
<block type="controls_whileUntil" inline="false">
|
||||
<field name="MODE">WHILE</field>
|
||||
<value name="BOOL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">NEQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -384,7 +58,7 @@
|
||||
<next>
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -450,7 +124,7 @@
|
||||
<block type="controls_whileUntil" inline="false">
|
||||
<field name="MODE">UNTIL</field>
|
||||
<value name="BOOL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -475,7 +149,7 @@
|
||||
<next>
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -530,7 +204,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
@@ -545,7 +219,7 @@
|
||||
<statement name="DO">
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -628,7 +302,7 @@
|
||||
<statement name="DO">
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -701,4 +375,328 @@
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="600" y="300">
|
||||
<field name="NAME">test break</field>
|
||||
<statement name="STACK">
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">count</field>
|
||||
<value name="VALUE">
|
||||
<block type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_whileUntil" inline="false">
|
||||
<field name="MODE">WHILE</field>
|
||||
<value name="BOOL">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">NEQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="math_number">
|
||||
<field name="NUM">10</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO0">
|
||||
<block type="controls_flow_statements">
|
||||
<field name="FLOW">BREAK</field>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="math_change" inline="false">
|
||||
<field name="VAR">count</field>
|
||||
<value name="DELTA">
|
||||
<block type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">while break</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">count</field>
|
||||
<value name="VALUE">
|
||||
<block type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_whileUntil" inline="false">
|
||||
<field name="MODE">UNTIL</field>
|
||||
<value name="BOOL">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="math_number">
|
||||
<field name="NUM">10</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO0">
|
||||
<block type="controls_flow_statements">
|
||||
<field name="FLOW">BREAK</field>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="math_change" inline="false">
|
||||
<field name="VAR">count</field>
|
||||
<value name="DELTA">
|
||||
<block type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">until break</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">count</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">log</field>
|
||||
<value name="VALUE">
|
||||
<block type="text">
|
||||
<field name="TEXT"></field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<block type="math_number">
|
||||
<field name="NUM">8</field>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO0">
|
||||
<block type="controls_flow_statements">
|
||||
<field name="FLOW">BREAK</field>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="text_append" inline="false">
|
||||
<field name="VAR">log</field>
|
||||
<value name="TEXT">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">count break</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">log</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="text">
|
||||
<field name="TEXT">1234</field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">log</field>
|
||||
<value name="VALUE">
|
||||
<block type="text">
|
||||
<field name="TEXT"></field>
|
||||
</block>
|
||||
</value>
|
||||
<next>
|
||||
<block type="controls_forEach" inline="false">
|
||||
<field name="VAR">x</field>
|
||||
<value name="LIST">
|
||||
<block type="lists_create_with" inline="false">
|
||||
<mutation items="4"></mutation>
|
||||
<value name="ADD0">
|
||||
<block type="text">
|
||||
<field name="TEXT">a</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD1">
|
||||
<block type="text">
|
||||
<field name="TEXT">b</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD2">
|
||||
<block type="text">
|
||||
<field name="TEXT">c</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD3">
|
||||
<block type="text">
|
||||
<field name="TEXT">d</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO">
|
||||
<block type="controls_if" inline="false">
|
||||
<value name="IF0">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">EQ</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="text">
|
||||
<field name="TEXT">c</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<statement name="DO0">
|
||||
<block type="controls_flow_statements">
|
||||
<field name="FLOW">BREAK</field>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="text_append" inline="false">
|
||||
<field name="VAR">log</field>
|
||||
<value name="TEXT">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
<next>
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">for break</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">log</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="EXPECTED">
|
||||
<block type="text">
|
||||
<field name="TEXT">ab</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</next>
|
||||
</block>
|
||||
</statement>
|
||||
</block>
|
||||
</xml>
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="395" y="125">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test operations on single</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
@@ -206,13 +205,12 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="23" y="194">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test arithmetic</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">add</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">ADD</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -235,7 +233,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">subtract</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MINUS</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -258,7 +256,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">multiply</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MULTIPLY</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -281,7 +279,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">divide</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">DIVIDE</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -304,7 +302,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">power</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">POWER</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -335,7 +333,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="16" y="727">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test trig</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
@@ -459,7 +456,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="311" y="733">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test constant</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
@@ -468,7 +464,7 @@
|
||||
<block type="math_round" inline="false">
|
||||
<field name="OP">ROUNDDOWN</field>
|
||||
<value name="NUM">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MULTIPLY</field>
|
||||
<value name="A">
|
||||
<block type="math_constant">
|
||||
@@ -496,7 +492,7 @@
|
||||
<block type="math_round" inline="false">
|
||||
<field name="OP">ROUNDDOWN</field>
|
||||
<value name="NUM">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MULTIPLY</field>
|
||||
<value name="A">
|
||||
<block type="math_constant">
|
||||
@@ -524,7 +520,7 @@
|
||||
<block type="math_round" inline="false">
|
||||
<field name="OP">ROUNDDOWN</field>
|
||||
<value name="NUM">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MULTIPLY</field>
|
||||
<value name="A">
|
||||
<block type="math_constant">
|
||||
@@ -552,7 +548,7 @@
|
||||
<block type="math_round" inline="false">
|
||||
<field name="OP">ROUNDDOWN</field>
|
||||
<value name="NUM">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MULTIPLY</field>
|
||||
<value name="A">
|
||||
<block type="math_constant">
|
||||
@@ -580,7 +576,7 @@
|
||||
<block type="math_round" inline="false">
|
||||
<field name="OP">ROUNDDOWN</field>
|
||||
<value name="NUM">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MULTIPLY</field>
|
||||
<value name="A">
|
||||
<block type="math_constant">
|
||||
@@ -606,7 +602,7 @@
|
||||
<field name="MESSAGE">const infinity</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">LT</field>
|
||||
<value name="A">
|
||||
<block type="math_number">
|
||||
@@ -634,14 +630,13 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="18" y="1279">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test number properties</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertvalue" inline="false">
|
||||
<field name="MESSAGE">even</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="false"></mutation>
|
||||
<field name="PROPERTY">EVEN</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -656,7 +651,7 @@
|
||||
<field name="MESSAGE">odd</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="false"></mutation>
|
||||
<field name="PROPERTY">ODD</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -671,7 +666,7 @@
|
||||
<field name="MESSAGE">prime 5</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="false"></mutation>
|
||||
<field name="PROPERTY">PRIME</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -686,7 +681,7 @@
|
||||
<field name="MESSAGE">prime 25</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="false"></mutation>
|
||||
<field name="PROPERTY">PRIME</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -701,7 +696,7 @@
|
||||
<field name="MESSAGE">prime negative</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="false"></mutation>
|
||||
<field name="PROPERTY">PRIME</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -716,7 +711,7 @@
|
||||
<field name="MESSAGE">whole</field>
|
||||
<field name="EXPECTED">FALSE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="false"></mutation>
|
||||
<field name="PROPERTY">WHOLE</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -731,7 +726,7 @@
|
||||
<field name="MESSAGE">positive</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="false"></mutation>
|
||||
<field name="PROPERTY">POSITIVE</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -746,7 +741,7 @@
|
||||
<field name="MESSAGE">negative</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="false"></mutation>
|
||||
<field name="PROPERTY">NEGATIVE</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -761,7 +756,7 @@
|
||||
<field name="MESSAGE">divisible</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="true"></mutation>
|
||||
<field name="PROPERTY">DIVISIBLE_BY</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -796,7 +791,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="387" y="1282">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test round</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
@@ -860,7 +854,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="394" y="1819">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test change</field>
|
||||
<statement name="STACK">
|
||||
<block type="variables_set" inline="false">
|
||||
@@ -916,7 +909,7 @@
|
||||
<block type="controls_if" inline="false">
|
||||
<mutation else="1"></mutation>
|
||||
<value name="IF0">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">NEQ</field>
|
||||
<value name="A">
|
||||
<block type="lists_length" inline="false">
|
||||
@@ -949,7 +942,7 @@
|
||||
</block>
|
||||
</statement>
|
||||
<statement name="ELSE">
|
||||
<block type="controls_for" inline="true">
|
||||
<block type="controls_for">
|
||||
<field name="VAR">x</field>
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
@@ -971,37 +964,37 @@
|
||||
<block type="logic_compare" inline="false">
|
||||
<field name="OP">NEQ</field>
|
||||
<value name="A">
|
||||
<block type="lists_getIndex" inline="true">
|
||||
<block type="lists_getIndex">
|
||||
<mutation statement="false" at="true"></mutation>
|
||||
<field name="MODE">GET</field>
|
||||
<field name="WHERE">FROM_START</field>
|
||||
<value name="AT">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">a</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="lists_getIndex" inline="true">
|
||||
<mutation statement="false" at="true"></mutation>
|
||||
<field name="MODE">GET</field>
|
||||
<field name="WHERE">FROM_START</field>
|
||||
<value name="AT">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="lists_getIndex">
|
||||
<mutation statement="false" at="true"></mutation>
|
||||
<field name="MODE">GET</field>
|
||||
<field name="WHERE">FROM_START</field>
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">b</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="AT">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">x</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
@@ -1064,13 +1057,13 @@
|
||||
</value>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="24" y="2568">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test operations on list</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">sum</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_on_list" inline="false">
|
||||
<mutation op="SUM"></mutation>
|
||||
<field name="OP">SUM</field>
|
||||
<value name="LIST">
|
||||
<block type="lists_create_with" inline="true">
|
||||
@@ -1104,6 +1097,7 @@
|
||||
<field name="MESSAGE">min</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_on_list" inline="false">
|
||||
<mutation op="MIN"></mutation>
|
||||
<field name="OP">MIN</field>
|
||||
<value name="LIST">
|
||||
<block type="lists_create_with" inline="true">
|
||||
@@ -1137,6 +1131,7 @@
|
||||
<field name="MESSAGE">max</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_on_list" inline="false">
|
||||
<mutation op="MAX"></mutation>
|
||||
<field name="OP">MAX</field>
|
||||
<value name="LIST">
|
||||
<block type="lists_create_with" inline="true">
|
||||
@@ -1170,6 +1165,7 @@
|
||||
<field name="MESSAGE">average</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_on_list" inline="false">
|
||||
<mutation op="AVERAGE"></mutation>
|
||||
<field name="OP">AVERAGE</field>
|
||||
<value name="LIST">
|
||||
<block type="lists_create_with" inline="true">
|
||||
@@ -1203,6 +1199,7 @@
|
||||
<field name="MESSAGE">median</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_on_list" inline="false">
|
||||
<mutation op="MEDIAN"></mutation>
|
||||
<field name="OP">MEDIAN</field>
|
||||
<value name="LIST">
|
||||
<block type="lists_create_with" inline="true">
|
||||
@@ -1248,6 +1245,7 @@
|
||||
</mutation>
|
||||
<value name="ARG0">
|
||||
<block type="math_on_list" inline="false">
|
||||
<mutation op="MODE"></mutation>
|
||||
<field name="OP">MODE</field>
|
||||
<value name="LIST">
|
||||
<block type="lists_create_with" inline="true">
|
||||
@@ -1288,6 +1286,7 @@
|
||||
<field name="MESSAGE">standard dev</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_on_list" inline="false">
|
||||
<mutation op="STD_DEV"></mutation>
|
||||
<field name="OP">STD_DEV</field>
|
||||
<value name="LIST">
|
||||
<block type="lists_create_with" inline="true">
|
||||
@@ -1326,8 +1325,29 @@
|
||||
<value name="A">
|
||||
<block type="lists_indexOf" inline="false">
|
||||
<field name="END">FIRST</field>
|
||||
<value name="VALUE">
|
||||
<block type="lists_create_with" inline="true">
|
||||
<mutation items="3"></mutation>
|
||||
<value name="ADD0">
|
||||
<block type="math_number">
|
||||
<field name="NUM">3</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD1">
|
||||
<block type="math_number">
|
||||
<field name="NUM">4</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD2">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<value name="FIND">
|
||||
<block type="math_on_list" inline="false">
|
||||
<mutation op="RANDOM"></mutation>
|
||||
<field name="OP">RANDOM</field>
|
||||
<value name="LIST">
|
||||
<block type="lists_create_with" inline="false">
|
||||
@@ -1351,26 +1371,6 @@
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<value name="VALUE">
|
||||
<block type="lists_create_with" inline="true">
|
||||
<mutation items="3"></mutation>
|
||||
<value name="ADD0">
|
||||
<block type="math_number">
|
||||
<field name="NUM">3</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD1">
|
||||
<block type="math_number">
|
||||
<field name="NUM">4</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="ADD2">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
@@ -1398,13 +1398,12 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="15" y="3494">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test mod</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">mod</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_modulo" inline="true">
|
||||
<block type="math_modulo">
|
||||
<value name="DIVIDEND">
|
||||
<block type="math_number">
|
||||
<field name="NUM">42</field>
|
||||
@@ -1426,13 +1425,12 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="373" y="3499">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test constraint</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">constraint</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_constrain" inline="true">
|
||||
<block type="math_constrain">
|
||||
<value name="VALUE">
|
||||
<block type="math_number">
|
||||
<field name="NUM">100</field>
|
||||
@@ -1459,13 +1457,12 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="15" y="3664">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test random integer</field>
|
||||
<statement name="STACK">
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">rand</field>
|
||||
<value name="VALUE">
|
||||
<block type="math_random_int" inline="true">
|
||||
<block type="math_random_int">
|
||||
<value name="FROM">
|
||||
<block type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
@@ -1483,10 +1480,10 @@
|
||||
<field name="MESSAGE">randRange</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_operation" inline="true">
|
||||
<block type="logic_operation">
|
||||
<field name="OP">AND</field>
|
||||
<value name="A">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">GTE</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -1501,7 +1498,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">LTE</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -1522,7 +1519,7 @@
|
||||
<field name="MESSAGE">randInteger</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="false"></mutation>
|
||||
<field name="PROPERTY">WHOLE</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -1540,7 +1537,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="15" y="3931">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test random fraction</field>
|
||||
<statement name="STACK">
|
||||
<block type="variables_set" inline="false">
|
||||
@@ -1553,10 +1549,10 @@
|
||||
<field name="MESSAGE">randFloat</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="logic_operation" inline="true">
|
||||
<block type="logic_operation">
|
||||
<field name="OP">AND</field>
|
||||
<value name="A">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">GTE</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -1571,7 +1567,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<value name="B">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">LTE</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-3" y="249">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test procedure</field>
|
||||
<statement name="STACK">
|
||||
<block type="procedures_callnoreturn" inline="false">
|
||||
@@ -146,7 +145,7 @@
|
||||
<block type="variables_set" inline="false">
|
||||
<field name="VAR">proc z</field>
|
||||
<value name="VALUE">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">DIVIDE</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -169,7 +168,7 @@
|
||||
</mutation>
|
||||
<field name="NAME">procedure 2</field>
|
||||
<statement name="STACK">
|
||||
<block type="procedures_ifreturn" inline="true">
|
||||
<block type="procedures_ifreturn">
|
||||
<mutation value="0"></mutation>
|
||||
<value name="CONDITION">
|
||||
<block type="variables_get">
|
||||
@@ -190,7 +189,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-2" y="731">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test function</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
@@ -346,7 +344,7 @@
|
||||
</block>
|
||||
</statement>
|
||||
<value name="RETURN">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MINUS</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -398,7 +396,7 @@
|
||||
</mutation>
|
||||
<field name="NAME">function 3</field>
|
||||
<statement name="STACK">
|
||||
<block type="procedures_ifreturn" inline="true">
|
||||
<block type="procedures_ifreturn">
|
||||
<mutation value="1"></mutation>
|
||||
<value name="CONDITION">
|
||||
<block type="variables_get">
|
||||
@@ -427,7 +425,7 @@
|
||||
<block type="controls_if" inline="false">
|
||||
<mutation else="1"></mutation>
|
||||
<value name="IF0">
|
||||
<block type="logic_compare" inline="true">
|
||||
<block type="logic_compare">
|
||||
<field name="OP">GT</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -453,7 +451,7 @@
|
||||
<arg name="n"></arg>
|
||||
</mutation>
|
||||
<value name="ARG0">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MINUS</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
@@ -480,7 +478,7 @@
|
||||
<arg name="n"></arg>
|
||||
</mutation>
|
||||
<value name="ARG0">
|
||||
<block type="math_arithmetic" inline="true">
|
||||
<block type="math_arithmetic">
|
||||
<field name="OP">MINUS</field>
|
||||
<value name="A">
|
||||
<block type="variables_get">
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="261" y="3">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test length</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
@@ -89,7 +88,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="266" y="219">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test empty</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertvalue" inline="false">
|
||||
@@ -123,7 +121,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-21" y="342">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test create text</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
@@ -202,7 +199,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-23" y="733">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test append item</field>
|
||||
<statement name="STACK">
|
||||
<block type="variables_set" inline="false">
|
||||
@@ -276,7 +272,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-24" y="1069">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test substring</field>
|
||||
<statement name="STACK">
|
||||
<block type="variables_set" inline="false">
|
||||
@@ -290,7 +285,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">substring # start</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_getSubstring" inline="true">
|
||||
<block type="text_getSubstring">
|
||||
<mutation at1="true" at2="true"></mutation>
|
||||
<field name="WHERE1">FROM_START</field>
|
||||
<field name="WHERE2">FROM_START</field>
|
||||
@@ -320,7 +315,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">substring # end</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_getSubstring" inline="true">
|
||||
<block type="text_getSubstring">
|
||||
<mutation at1="true" at2="true"></mutation>
|
||||
<field name="WHERE1">FROM_END</field>
|
||||
<field name="WHERE2">FROM_END</field>
|
||||
@@ -350,7 +345,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">substring first-last</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_getSubstring" inline="true">
|
||||
<block type="text_getSubstring">
|
||||
<mutation at1="false" at2="false"></mutation>
|
||||
<field name="WHERE1">FIRST</field>
|
||||
<field name="WHERE2">LAST</field>
|
||||
@@ -376,13 +371,12 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-24" y="1429">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test find</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">first find</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_indexOf" inline="true">
|
||||
<block type="text_indexOf">
|
||||
<field name="END">FIRST</field>
|
||||
<value name="VALUE">
|
||||
<block type="text">
|
||||
@@ -405,7 +399,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">last find</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_indexOf" inline="true">
|
||||
<block type="text_indexOf">
|
||||
<field name="END">LAST</field>
|
||||
<value name="VALUE">
|
||||
<block type="text">
|
||||
@@ -428,7 +422,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">no find</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_indexOf" inline="true">
|
||||
<block type="text_indexOf">
|
||||
<field name="END">FIRST</field>
|
||||
<value name="VALUE">
|
||||
<block type="text">
|
||||
@@ -455,13 +449,12 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-22" y="1789">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test letter</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">letter #</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_charAt" inline="true">
|
||||
<block type="text_charAt">
|
||||
<mutation at="true"></mutation>
|
||||
<field name="WHERE">FROM_START</field>
|
||||
<value name="VALUE">
|
||||
@@ -485,7 +478,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">letter # from end</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_charAt" inline="true">
|
||||
<block type="text_charAt">
|
||||
<mutation at="true"></mutation>
|
||||
<field name="WHERE">FROM_END</field>
|
||||
<value name="VALUE">
|
||||
@@ -509,7 +502,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">first letter</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_charAt" inline="true">
|
||||
<block type="text_charAt">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="WHERE">FIRST</field>
|
||||
<value name="VALUE">
|
||||
@@ -528,7 +521,7 @@
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">last letter</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_charAt" inline="true">
|
||||
<block type="text_charAt">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="WHERE">LAST</field>
|
||||
<value name="VALUE">
|
||||
@@ -548,7 +541,7 @@
|
||||
<field name="MESSAGE">random letter</field>
|
||||
<field name="EXPECTED">TRUE</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="math_number_property" inline="true">
|
||||
<block type="math_number_property">
|
||||
<mutation divisor_input="false"></mutation>
|
||||
<field name="PROPERTY">POSITIVE</field>
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
@@ -560,7 +553,7 @@
|
||||
</block>
|
||||
</value>
|
||||
<value name="FIND">
|
||||
<block type="text_charAt" inline="true">
|
||||
<block type="text_charAt">
|
||||
<mutation at="false"></mutation>
|
||||
<field name="WHERE">RANDOM</field>
|
||||
<value name="VALUE">
|
||||
@@ -586,7 +579,6 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-20" y="2295">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test case</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
@@ -650,14 +642,12 @@
|
||||
</statement>
|
||||
</block>
|
||||
<block type="procedures_defnoreturn" x="-20" y="2598">
|
||||
<mutation></mutation>
|
||||
<field name="NAME">test trim</field>
|
||||
<statement name="STACK">
|
||||
<block type="unittest_assertequals" inline="false">
|
||||
<field name="MESSAGE">trim both</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_trim" inline="false">
|
||||
<mutation plural="true"></mutation>
|
||||
<field name="MODE">BOTH</field>
|
||||
<value name="TEXT">
|
||||
<block type="text">
|
||||
@@ -676,7 +666,6 @@
|
||||
<field name="MESSAGE">trim left</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_trim" inline="false">
|
||||
<mutation plural="false"></mutation>
|
||||
<field name="MODE">LEFT</field>
|
||||
<value name="TEXT">
|
||||
<block type="text">
|
||||
@@ -695,7 +684,6 @@
|
||||
<field name="MESSAGE">trim right</field>
|
||||
<value name="ACTUAL">
|
||||
<block type="text_trim" inline="false">
|
||||
<mutation plural="false"></mutation>
|
||||
<field name="MODE">RIGHT</field>
|
||||
<value name="TEXT">
|
||||
<block type="text">
|
||||
|
||||
Reference in New Issue
Block a user