123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- <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">
- <value name="MESSAGE">
- <block type="text">
- <field name="TEXT">static colour</field>
- </block>
- </value>
- <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">
- <field name="NAME">test rgb</field>
- <statement name="STACK">
- <block type="unittest_assertequals" inline="false">
- <value name="MESSAGE">
- <block type="text">
- <field name="TEXT">from rgb</field>
- </block>
- </value>
- <value name="ACTUAL">
- <block type="colour_rgb" inline="false">
- <value name="RED">
- <block type="math_number">
- <field name="NUM">100</field>
- </block>
- </value>
- <value name="GREEN">
- <block type="math_number">
- <field name="NUM">40</field>
- </block>
- </value>
- <value name="BLUE">
- <block type="math_number">
- <field name="NUM">0</field>
- </block>
- </value>
- </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">
- <mutation name="test colour picker"></mutation>
- <next>
- <block type="procedures_callnoreturn">
- <mutation name="test blend"></mutation>
- <next>
- <block type="procedures_callnoreturn">
- <mutation name="test rgb"></mutation>
- <next>
- <block type="procedures_callnoreturn">
- <mutation name="test colour random"></mutation>
- </block>
- </next>
- </block>
- </next>
- </block>
- </next>
- </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">
- <value name="MESSAGE">
- <block type="text">
- <field name="TEXT">test name</field>
- </block>
- </value>
- <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">
- <value name="MESSAGE">
- <block type="text">
- <field name="TEXT">test name</field>
- </block>
- </value>
- <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">
- <value name="MESSAGE">
- <block type="text">
- <field name="TEXT">test name</field>
- </block>
- </value>
- <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">
- <field name="NAME">test blend</field>
- <statement name="STACK">
- <block type="unittest_assertequals" inline="false">
- <value name="MESSAGE">
- <block type="text">
- <field name="TEXT">blend</field>
- </block>
- </value>
- <value name="ACTUAL">
- <block type="colour_blend" inline="false">
- <value name="COLOUR1">
- <block type="colour_picker">
- <field name="COLOUR">#ff0000</field>
- </block>
- </value>
- <value name="COLOUR2">
- <block type="colour_rgb" inline="false">
- <value name="RED">
- <block type="math_number">
- <field name="NUM">100</field>
- </block>
- </value>
- <value name="GREEN">
- <block type="math_number">
- <field name="NUM">40</field>
- </block>
- </value>
- <value name="BLUE">
- <block type="math_number">
- <field name="NUM">0</field>
- </block>
- </value>
- </block>
- </value>
- <value name="RATIO">
- <block type="math_number">
- <field name="NUM">0.4</field>
- </block>
- </value>
- </block>
- </value>
- <value name="EXPECTED">
- <block type="text">
- <field name="TEXT">#ff2900</field>
- </block>
- </value>
- </block>
- </statement>
- </block>
- </xml>
|