variables.xml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <xml xmlns="http://www.w3.org/1999/xhtml">
  2. <block type="unittest_main" x="0" y="0">
  3. <statement name="DO">
  4. <block type="variables_set" inline="false">
  5. <field name="VAR">item</field>
  6. <value name="VALUE">
  7. <block type="math_number">
  8. <field name="NUM">123</field>
  9. </block>
  10. </value>
  11. <next>
  12. <block type="unittest_assertequals" inline="false">
  13. <value name="MESSAGE">
  14. <block type="text">
  15. <field name="TEXT">variable</field>
  16. </block>
  17. </value>
  18. <value name="ACTUAL">
  19. <block type="variables_get">
  20. <field name="VAR">item</field>
  21. </block>
  22. </value>
  23. <value name="EXPECTED">
  24. <block type="math_number">
  25. <field name="NUM">123</field>
  26. </block>
  27. </value>
  28. <next>
  29. <block type="variables_set" inline="false">
  30. <field name="VAR">if</field>
  31. <value name="VALUE">
  32. <block type="math_number">
  33. <field name="NUM">123</field>
  34. </block>
  35. </value>
  36. <next>
  37. <block type="unittest_assertequals" inline="false">
  38. <value name="MESSAGE">
  39. <block type="text">
  40. <field name="TEXT">reserved variable</field>
  41. </block>
  42. </value>
  43. <value name="ACTUAL">
  44. <block type="variables_get">
  45. <field name="VAR">if</field>
  46. </block>
  47. </value>
  48. <value name="EXPECTED">
  49. <block type="math_number">
  50. <field name="NUM">123</field>
  51. </block>
  52. </value>
  53. </block>
  54. </next>
  55. </block>
  56. </next>
  57. </block>
  58. </next>
  59. </block>
  60. </statement>
  61. </block>
  62. <block type="variables_get" x="300" y="100">
  63. <field name="VAR">naked</field>
  64. <comment pinned="true" h="80" w="160">Intentionally non-connected variable.</comment>
  65. </block>
  66. </xml>