summaryrefslogtreecommitdiff
path: root/blockly/tests/generators/variables.xml
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2016-09-10 17:58:46 -0500
committerDavid Barksdale <amatus@amatus.name>2016-09-10 18:32:35 -0500
commit475f9f3ac7688e58505690d420cafe6ae8bb8b5f (patch)
treeb1bf14b10751fe4e9e146ad7244ec86bb123893d /blockly/tests/generators/variables.xml
parent923561056ddb63ce82fd1ec2a5e249bbdae267bf (diff)
Merge blockly sub-tree
Diffstat (limited to 'blockly/tests/generators/variables.xml')
-rw-r--r--blockly/tests/generators/variables.xml66
1 files changed, 66 insertions, 0 deletions
diff --git a/blockly/tests/generators/variables.xml b/blockly/tests/generators/variables.xml
new file mode 100644
index 0000000..a11d0a0
--- /dev/null
+++ b/blockly/tests/generators/variables.xml
@@ -0,0 +1,66 @@
+<xml xmlns="http://www.w3.org/1999/xhtml">
+ <block type="unittest_main" x="0" y="0">
+ <statement name="DO">
+ <block type="variables_set" inline="false">
+ <field name="VAR">item</field>
+ <value name="VALUE">
+ <block type="math_number">
+ <field name="NUM">123</field>
+ </block>
+ </value>
+ <next>
+ <block type="unittest_assertequals" inline="false">
+ <value name="MESSAGE">
+ <block type="text">
+ <field name="TEXT">variable</field>
+ </block>
+ </value>
+ <value name="ACTUAL">
+ <block type="variables_get">
+ <field name="VAR">item</field>
+ </block>
+ </value>
+ <value name="EXPECTED">
+ <block type="math_number">
+ <field name="NUM">123</field>
+ </block>
+ </value>
+ <next>
+ <block type="variables_set" inline="false">
+ <field name="VAR">if</field>
+ <value name="VALUE">
+ <block type="math_number">
+ <field name="NUM">123</field>
+ </block>
+ </value>
+ <next>
+ <block type="unittest_assertequals" inline="false">
+ <value name="MESSAGE">
+ <block type="text">
+ <field name="TEXT">reserved variable</field>
+ </block>
+ </value>
+ <value name="ACTUAL">
+ <block type="variables_get">
+ <field name="VAR">if</field>
+ </block>
+ </value>
+ <value name="EXPECTED">
+ <block type="math_number">
+ <field name="NUM">123</field>
+ </block>
+ </value>
+ </block>
+ </next>
+ </block>
+ </next>
+ </block>
+ </next>
+ </block>
+ </statement>
+ </block>
+ <block type="variables_get" x="300" y="100">
+ <field name="VAR">naked</field>
+ <comment pinned="true" h="80" w="160">Intentionally non-connected variable.</comment>
+ </block>
+</xml>