loops2.xml 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890
  1. <xml xmlns="http://www.w3.org/1999/xhtml">
  2. <block type="unittest_main" x="66" y="-2">
  3. <statement name="DO">
  4. <block type="procedures_callnoreturn">
  5. <mutation name="test count"></mutation>
  6. <next>
  7. <block type="procedures_callnoreturn">
  8. <mutation name="test count by"></mutation>
  9. </block>
  10. </next>
  11. </block>
  12. </statement>
  13. </block>
  14. <block type="procedures_defnoreturn" x="679" y="-10">
  15. <field name="NAME">test count by</field>
  16. <statement name="STACK">
  17. <block type="variables_set" inline="false">
  18. <field name="VAR">log</field>
  19. <value name="VALUE">
  20. <block type="text">
  21. <field name="TEXT"></field>
  22. </block>
  23. </value>
  24. <next>
  25. <block type="controls_for">
  26. <field name="VAR">x</field>
  27. <value name="FROM">
  28. <block type="math_number">
  29. <field name="NUM">1</field>
  30. </block>
  31. </value>
  32. <value name="TO">
  33. <block type="math_number">
  34. <field name="NUM">8</field>
  35. </block>
  36. </value>
  37. <value name="BY">
  38. <block type="math_number">
  39. <field name="NUM">2</field>
  40. </block>
  41. </value>
  42. <statement name="DO">
  43. <block type="text_append" inline="false">
  44. <field name="VAR">log</field>
  45. <value name="TEXT">
  46. <block type="variables_get">
  47. <field name="VAR">x</field>
  48. </block>
  49. </value>
  50. </block>
  51. </statement>
  52. <next>
  53. <block type="unittest_assertequals" inline="false">
  54. <value name="MESSAGE">
  55. <block type="text">
  56. <field name="TEXT">count up ints</field>
  57. </block>
  58. </value>
  59. <value name="ACTUAL">
  60. <block type="variables_get">
  61. <field name="VAR">log</field>
  62. </block>
  63. </value>
  64. <value name="EXPECTED">
  65. <block type="text">
  66. <field name="TEXT">1357</field>
  67. </block>
  68. </value>
  69. <next>
  70. <block type="variables_set" inline="false">
  71. <field name="VAR">log</field>
  72. <value name="VALUE">
  73. <block type="text">
  74. <field name="TEXT"></field>
  75. </block>
  76. </value>
  77. <next>
  78. <block type="controls_for">
  79. <field name="VAR">x</field>
  80. <value name="FROM">
  81. <block type="math_number">
  82. <field name="NUM">8</field>
  83. </block>
  84. </value>
  85. <value name="TO">
  86. <block type="math_number">
  87. <field name="NUM">1</field>
  88. </block>
  89. </value>
  90. <value name="BY">
  91. <block type="math_number">
  92. <field name="NUM">2</field>
  93. </block>
  94. </value>
  95. <statement name="DO">
  96. <block type="text_append" inline="false">
  97. <field name="VAR">log</field>
  98. <value name="TEXT">
  99. <block type="variables_get">
  100. <field name="VAR">x</field>
  101. </block>
  102. </value>
  103. </block>
  104. </statement>
  105. <next>
  106. <block type="unittest_assertequals" inline="false">
  107. <value name="MESSAGE">
  108. <block type="text">
  109. <field name="TEXT">count down ints</field>
  110. </block>
  111. </value>
  112. <value name="ACTUAL">
  113. <block type="variables_get">
  114. <field name="VAR">log</field>
  115. </block>
  116. </value>
  117. <value name="EXPECTED">
  118. <block type="text">
  119. <field name="TEXT">8642</field>
  120. </block>
  121. </value>
  122. <next>
  123. <block type="variables_set" inline="false">
  124. <field name="VAR">loglist</field>
  125. <value name="VALUE">
  126. <block type="lists_create_empty"></block>
  127. </value>
  128. <next>
  129. <block type="controls_for">
  130. <field name="VAR">x</field>
  131. <value name="FROM">
  132. <block type="math_number">
  133. <field name="NUM">1</field>
  134. </block>
  135. </value>
  136. <value name="TO">
  137. <block type="math_number">
  138. <field name="NUM">8</field>
  139. </block>
  140. </value>
  141. <value name="BY">
  142. <block type="math_number">
  143. <field name="NUM">1.5</field>
  144. </block>
  145. </value>
  146. <statement name="DO">
  147. <block type="lists_setIndex">
  148. <mutation at="false"></mutation>
  149. <field name="MODE">INSERT</field>
  150. <field name="WHERE">LAST</field>
  151. <value name="LIST">
  152. <block type="variables_get">
  153. <field name="VAR">loglist</field>
  154. </block>
  155. </value>
  156. <value name="TO">
  157. <block type="variables_get">
  158. <field name="VAR">x</field>
  159. </block>
  160. </value>
  161. </block>
  162. </statement>
  163. <next>
  164. <block type="unittest_assertequals" inline="false">
  165. <value name="MESSAGE">
  166. <block type="text">
  167. <field name="TEXT">count with floats</field>
  168. </block>
  169. </value>
  170. <value name="ACTUAL">
  171. <block type="variables_get">
  172. <field name="VAR">loglist</field>
  173. </block>
  174. </value>
  175. <value name="EXPECTED">
  176. <block type="lists_create_with" inline="false">
  177. <mutation items="5"></mutation>
  178. <value name="ADD0">
  179. <block type="math_number">
  180. <field name="NUM">1</field>
  181. </block>
  182. </value>
  183. <value name="ADD1">
  184. <block type="math_number">
  185. <field name="NUM">2.5</field>
  186. </block>
  187. </value>
  188. <value name="ADD2">
  189. <block type="math_number">
  190. <field name="NUM">4</field>
  191. </block>
  192. </value>
  193. <value name="ADD3">
  194. <block type="math_number">
  195. <field name="NUM">5.5</field>
  196. </block>
  197. </value>
  198. <value name="ADD4">
  199. <block type="math_number">
  200. <field name="NUM">7</field>
  201. </block>
  202. </value>
  203. </block>
  204. </value>
  205. <next>
  206. <block type="variables_set" inline="false">
  207. <field name="VAR">loglist</field>
  208. <value name="VALUE">
  209. <block type="lists_create_empty"></block>
  210. </value>
  211. <next>
  212. <block type="controls_for">
  213. <field name="VAR">x</field>
  214. <value name="FROM">
  215. <block type="math_arithmetic">
  216. <field name="OP">ADD</field>
  217. <value name="A">
  218. <block type="math_number">
  219. <field name="NUM">1</field>
  220. </block>
  221. </value>
  222. <value name="B">
  223. <block type="math_number">
  224. <field name="NUM">0</field>
  225. </block>
  226. </value>
  227. </block>
  228. </value>
  229. <value name="TO">
  230. <block type="math_arithmetic">
  231. <field name="OP">ADD</field>
  232. <value name="A">
  233. <block type="math_number">
  234. <field name="NUM">8</field>
  235. </block>
  236. </value>
  237. <value name="B">
  238. <block type="math_number">
  239. <field name="NUM">0</field>
  240. </block>
  241. </value>
  242. </block>
  243. </value>
  244. <value name="BY">
  245. <block type="math_arithmetic">
  246. <field name="OP">MINUS</field>
  247. <value name="A">
  248. <block type="math_number">
  249. <field name="NUM">1</field>
  250. </block>
  251. </value>
  252. <value name="B">
  253. <block type="math_number">
  254. <field name="NUM">2</field>
  255. </block>
  256. </value>
  257. </block>
  258. </value>
  259. <statement name="DO">
  260. <block type="lists_setIndex">
  261. <mutation at="false"></mutation>
  262. <field name="MODE">INSERT</field>
  263. <field name="WHERE">LAST</field>
  264. <value name="LIST">
  265. <block type="variables_get">
  266. <field name="VAR">loglist</field>
  267. </block>
  268. </value>
  269. <value name="TO">
  270. <block type="variables_get">
  271. <field name="VAR">x</field>
  272. </block>
  273. </value>
  274. </block>
  275. </statement>
  276. <next>
  277. <block type="unittest_assertequals" inline="false">
  278. <value name="MESSAGE">
  279. <block type="text">
  280. <field name="TEXT">count up non-trivial ints</field>
  281. </block>
  282. </value>
  283. <value name="ACTUAL">
  284. <block type="variables_get">
  285. <field name="VAR">loglist</field>
  286. </block>
  287. </value>
  288. <value name="EXPECTED">
  289. <block type="lists_create_with" inline="false">
  290. <mutation items="8"></mutation>
  291. <value name="ADD0">
  292. <block type="math_number">
  293. <field name="NUM">1</field>
  294. </block>
  295. </value>
  296. <value name="ADD1">
  297. <block type="math_number">
  298. <field name="NUM">2</field>
  299. </block>
  300. </value>
  301. <value name="ADD2">
  302. <block type="math_number">
  303. <field name="NUM">3</field>
  304. </block>
  305. </value>
  306. <value name="ADD3">
  307. <block type="math_number">
  308. <field name="NUM">4</field>
  309. </block>
  310. </value>
  311. <value name="ADD4">
  312. <block type="math_number">
  313. <field name="NUM">5</field>
  314. </block>
  315. </value>
  316. <value name="ADD5">
  317. <block type="math_number">
  318. <field name="NUM">6</field>
  319. </block>
  320. </value>
  321. <value name="ADD6">
  322. <block type="math_number">
  323. <field name="NUM">7</field>
  324. </block>
  325. </value>
  326. <value name="ADD7">
  327. <block type="math_number">
  328. <field name="NUM">8</field>
  329. </block>
  330. </value>
  331. </block>
  332. </value>
  333. <next>
  334. <block type="variables_set" inline="false">
  335. <field name="VAR">loglist</field>
  336. <value name="VALUE">
  337. <block type="lists_create_empty"></block>
  338. </value>
  339. <next>
  340. <block type="controls_for">
  341. <field name="VAR">x</field>
  342. <value name="FROM">
  343. <block type="math_arithmetic">
  344. <field name="OP">ADD</field>
  345. <value name="A">
  346. <block type="math_number">
  347. <field name="NUM">8</field>
  348. </block>
  349. </value>
  350. <value name="B">
  351. <block type="math_number">
  352. <field name="NUM">0</field>
  353. </block>
  354. </value>
  355. </block>
  356. </value>
  357. <value name="TO">
  358. <block type="math_arithmetic">
  359. <field name="OP">ADD</field>
  360. <value name="A">
  361. <block type="math_number">
  362. <field name="NUM">1</field>
  363. </block>
  364. </value>
  365. <value name="B">
  366. <block type="math_number">
  367. <field name="NUM">0</field>
  368. </block>
  369. </value>
  370. </block>
  371. </value>
  372. <value name="BY">
  373. <block type="math_number">
  374. <field name="NUM">2</field>
  375. </block>
  376. </value>
  377. <statement name="DO">
  378. <block type="lists_setIndex">
  379. <mutation at="false"></mutation>
  380. <field name="MODE">INSERT</field>
  381. <field name="WHERE">LAST</field>
  382. <value name="LIST">
  383. <block type="variables_get">
  384. <field name="VAR">loglist</field>
  385. </block>
  386. </value>
  387. <value name="TO">
  388. <block type="variables_get">
  389. <field name="VAR">x</field>
  390. </block>
  391. </value>
  392. </block>
  393. </statement>
  394. <next>
  395. <block type="unittest_assertequals" inline="false">
  396. <value name="MESSAGE">
  397. <block type="text">
  398. <field name="TEXT">count down non-trivial ints</field>
  399. </block>
  400. </value>
  401. <value name="ACTUAL">
  402. <block type="variables_get">
  403. <field name="VAR">loglist</field>
  404. </block>
  405. </value>
  406. <value name="EXPECTED">
  407. <block type="lists_create_with" inline="false">
  408. <mutation items="4"></mutation>
  409. <value name="ADD0">
  410. <block type="math_number">
  411. <field name="NUM">8</field>
  412. </block>
  413. </value>
  414. <value name="ADD1">
  415. <block type="math_number">
  416. <field name="NUM">6</field>
  417. </block>
  418. </value>
  419. <value name="ADD2">
  420. <block type="math_number">
  421. <field name="NUM">4</field>
  422. </block>
  423. </value>
  424. <value name="ADD3">
  425. <block type="math_number">
  426. <field name="NUM">2</field>
  427. </block>
  428. </value>
  429. </block>
  430. </value>
  431. <next>
  432. <block type="variables_set" inline="false">
  433. <field name="VAR">loglist</field>
  434. <value name="VALUE">
  435. <block type="lists_create_empty"></block>
  436. </value>
  437. <next>
  438. <block type="controls_for">
  439. <field name="VAR">x</field>
  440. <value name="FROM">
  441. <block type="math_arithmetic">
  442. <field name="OP">ADD</field>
  443. <value name="A">
  444. <block type="math_number">
  445. <field name="NUM">5</field>
  446. </block>
  447. </value>
  448. <value name="B">
  449. <block type="math_number">
  450. <field name="NUM">0.5</field>
  451. </block>
  452. </value>
  453. </block>
  454. </value>
  455. <value name="TO">
  456. <block type="math_arithmetic">
  457. <field name="OP">ADD</field>
  458. <value name="A">
  459. <block type="math_number">
  460. <field name="NUM">1</field>
  461. </block>
  462. </value>
  463. <value name="B">
  464. <block type="math_number">
  465. <field name="NUM">0</field>
  466. </block>
  467. </value>
  468. </block>
  469. </value>
  470. <value name="BY">
  471. <block type="math_arithmetic">
  472. <field name="OP">ADD</field>
  473. <value name="A">
  474. <block type="math_number">
  475. <field name="NUM">1</field>
  476. </block>
  477. </value>
  478. <value name="B">
  479. <block type="math_number">
  480. <field name="NUM">0</field>
  481. </block>
  482. </value>
  483. </block>
  484. </value>
  485. <statement name="DO">
  486. <block type="lists_setIndex">
  487. <mutation at="false"></mutation>
  488. <field name="MODE">INSERT</field>
  489. <field name="WHERE">LAST</field>
  490. <value name="LIST">
  491. <block type="variables_get">
  492. <field name="VAR">loglist</field>
  493. </block>
  494. </value>
  495. <value name="TO">
  496. <block type="variables_get">
  497. <field name="VAR">x</field>
  498. </block>
  499. </value>
  500. </block>
  501. </statement>
  502. <next>
  503. <block type="unittest_assertequals" inline="false">
  504. <value name="MESSAGE">
  505. <block type="text">
  506. <field name="TEXT">count with floats</field>
  507. </block>
  508. </value>
  509. <value name="ACTUAL">
  510. <block type="variables_get">
  511. <field name="VAR">loglist</field>
  512. </block>
  513. </value>
  514. <value name="EXPECTED">
  515. <block type="lists_create_with" inline="false">
  516. <mutation items="5"></mutation>
  517. <value name="ADD0">
  518. <block type="math_number">
  519. <field name="NUM">5.5</field>
  520. </block>
  521. </value>
  522. <value name="ADD1">
  523. <block type="math_number">
  524. <field name="NUM">4.5</field>
  525. </block>
  526. </value>
  527. <value name="ADD2">
  528. <block type="math_number">
  529. <field name="NUM">3.5</field>
  530. </block>
  531. </value>
  532. <value name="ADD3">
  533. <block type="math_number">
  534. <field name="NUM">2.5</field>
  535. </block>
  536. </value>
  537. <value name="ADD4">
  538. <block type="math_number">
  539. <field name="NUM">1.5</field>
  540. </block>
  541. </value>
  542. </block>
  543. </value>
  544. </block>
  545. </next>
  546. </block>
  547. </next>
  548. </block>
  549. </next>
  550. </block>
  551. </next>
  552. </block>
  553. </next>
  554. </block>
  555. </next>
  556. </block>
  557. </next>
  558. </block>
  559. </next>
  560. </block>
  561. </next>
  562. </block>
  563. </next>
  564. </block>
  565. </next>
  566. </block>
  567. </next>
  568. </block>
  569. </next>
  570. </block>
  571. </next>
  572. </block>
  573. </next>
  574. </block>
  575. </next>
  576. </block>
  577. </next>
  578. </block>
  579. </statement>
  580. </block>
  581. <block type="procedures_defnoreturn" x="29" y="184">
  582. <field name="NAME">test count</field>
  583. <statement name="STACK">
  584. <block type="variables_set" inline="false">
  585. <field name="VAR">log</field>
  586. <value name="VALUE">
  587. <block type="text">
  588. <field name="TEXT"></field>
  589. </block>
  590. </value>
  591. <next>
  592. <block type="controls_for">
  593. <field name="VAR">x</field>
  594. <value name="FROM">
  595. <block type="math_number">
  596. <field name="NUM">1</field>
  597. </block>
  598. </value>
  599. <value name="TO">
  600. <block type="math_number">
  601. <field name="NUM">8</field>
  602. </block>
  603. </value>
  604. <statement name="DO">
  605. <block type="text_append" inline="false">
  606. <field name="VAR">log</field>
  607. <value name="TEXT">
  608. <block type="variables_get">
  609. <field name="VAR">x</field>
  610. </block>
  611. </value>
  612. </block>
  613. </statement>
  614. <next>
  615. <block type="unittest_assertequals" inline="false">
  616. <value name="MESSAGE">
  617. <block type="text">
  618. <field name="TEXT">count up</field>
  619. </block>
  620. </value>
  621. <value name="ACTUAL">
  622. <block type="variables_get">
  623. <field name="VAR">log</field>
  624. </block>
  625. </value>
  626. <value name="EXPECTED">
  627. <block type="text">
  628. <field name="TEXT">12345678</field>
  629. </block>
  630. </value>
  631. <next>
  632. <block type="variables_set" inline="false">
  633. <field name="VAR">log</field>
  634. <value name="VALUE">
  635. <block type="text">
  636. <field name="TEXT"></field>
  637. </block>
  638. </value>
  639. <next>
  640. <block type="controls_for">
  641. <field name="VAR">x</field>
  642. <value name="FROM">
  643. <block type="math_number">
  644. <field name="NUM">8</field>
  645. </block>
  646. </value>
  647. <value name="TO">
  648. <block type="math_number">
  649. <field name="NUM">1</field>
  650. </block>
  651. </value>
  652. <statement name="DO">
  653. <block type="text_append" inline="false">
  654. <field name="VAR">log</field>
  655. <value name="TEXT">
  656. <block type="variables_get">
  657. <field name="VAR">x</field>
  658. </block>
  659. </value>
  660. </block>
  661. </statement>
  662. <next>
  663. <block type="unittest_assertequals" inline="false">
  664. <value name="MESSAGE">
  665. <block type="text">
  666. <field name="TEXT">count down</field>
  667. </block>
  668. </value>
  669. <value name="ACTUAL">
  670. <block type="variables_get">
  671. <field name="VAR">log</field>
  672. </block>
  673. </value>
  674. <value name="EXPECTED">
  675. <block type="text">
  676. <field name="TEXT">87654321</field>
  677. </block>
  678. </value>
  679. <next>
  680. <block type="variables_set" inline="false">
  681. <field name="VAR">loglist</field>
  682. <value name="VALUE">
  683. <block type="lists_create_empty"></block>
  684. </value>
  685. <next>
  686. <block type="controls_for">
  687. <field name="VAR">x</field>
  688. <value name="FROM">
  689. <block type="math_arithmetic">
  690. <field name="OP">ADD</field>
  691. <value name="A">
  692. <block type="math_number">
  693. <field name="NUM">1</field>
  694. </block>
  695. </value>
  696. <value name="B">
  697. <block type="math_number">
  698. <field name="NUM">0</field>
  699. </block>
  700. </value>
  701. </block>
  702. </value>
  703. <value name="TO">
  704. <block type="math_arithmetic">
  705. <field name="OP">ADD</field>
  706. <value name="A">
  707. <block type="math_number">
  708. <field name="NUM">4</field>
  709. </block>
  710. </value>
  711. <value name="B">
  712. <block type="math_number">
  713. <field name="NUM">0</field>
  714. </block>
  715. </value>
  716. </block>
  717. </value>
  718. <statement name="DO">
  719. <block type="lists_setIndex">
  720. <mutation at="false"></mutation>
  721. <field name="MODE">INSERT</field>
  722. <field name="WHERE">LAST</field>
  723. <value name="LIST">
  724. <block type="variables_get">
  725. <field name="VAR">loglist</field>
  726. </block>
  727. </value>
  728. <value name="TO">
  729. <block type="variables_get">
  730. <field name="VAR">x</field>
  731. </block>
  732. </value>
  733. </block>
  734. </statement>
  735. <next>
  736. <block type="unittest_assertequals" inline="false">
  737. <value name="MESSAGE">
  738. <block type="text">
  739. <field name="TEXT">count up non-trivial</field>
  740. </block>
  741. </value>
  742. <value name="ACTUAL">
  743. <block type="variables_get">
  744. <field name="VAR">loglist</field>
  745. </block>
  746. </value>
  747. <value name="EXPECTED">
  748. <block type="lists_create_with" inline="false">
  749. <mutation items="4"></mutation>
  750. <value name="ADD0">
  751. <block type="math_number">
  752. <field name="NUM">1</field>
  753. </block>
  754. </value>
  755. <value name="ADD1">
  756. <block type="math_number">
  757. <field name="NUM">2</field>
  758. </block>
  759. </value>
  760. <value name="ADD2">
  761. <block type="math_number">
  762. <field name="NUM">3</field>
  763. </block>
  764. </value>
  765. <value name="ADD3">
  766. <block type="math_number">
  767. <field name="NUM">4</field>
  768. </block>
  769. </value>
  770. </block>
  771. </value>
  772. <next>
  773. <block type="variables_set" inline="false">
  774. <field name="VAR">loglist</field>
  775. <value name="VALUE">
  776. <block type="lists_create_empty"></block>
  777. </value>
  778. <next>
  779. <block type="controls_for">
  780. <field name="VAR">x</field>
  781. <value name="FROM">
  782. <block type="math_arithmetic">
  783. <field name="OP">ADD</field>
  784. <value name="A">
  785. <block type="math_number">
  786. <field name="NUM">3</field>
  787. </block>
  788. </value>
  789. <value name="B">
  790. <block type="math_number">
  791. <field name="NUM">1</field>
  792. </block>
  793. </value>
  794. </block>
  795. </value>
  796. <value name="TO">
  797. <block type="math_arithmetic">
  798. <field name="OP">ADD</field>
  799. <value name="A">
  800. <block type="math_number">
  801. <field name="NUM">1</field>
  802. </block>
  803. </value>
  804. <value name="B">
  805. <block type="math_number">
  806. <field name="NUM">0</field>
  807. </block>
  808. </value>
  809. </block>
  810. </value>
  811. <statement name="DO">
  812. <block type="lists_setIndex">
  813. <mutation at="false"></mutation>
  814. <field name="MODE">INSERT</field>
  815. <field name="WHERE">LAST</field>
  816. <value name="LIST">
  817. <block type="variables_get">
  818. <field name="VAR">loglist</field>
  819. </block>
  820. </value>
  821. <value name="TO">
  822. <block type="variables_get">
  823. <field name="VAR">x</field>
  824. </block>
  825. </value>
  826. </block>
  827. </statement>
  828. <next>
  829. <block type="unittest_assertequals" inline="false">
  830. <value name="MESSAGE">
  831. <block type="text">
  832. <field name="TEXT">count down non-trivial</field>
  833. </block>
  834. </value>
  835. <value name="ACTUAL">
  836. <block type="variables_get">
  837. <field name="VAR">loglist</field>
  838. </block>
  839. </value>
  840. <value name="EXPECTED">
  841. <block type="lists_create_with" inline="false">
  842. <mutation items="4"></mutation>
  843. <value name="ADD0">
  844. <block type="math_number">
  845. <field name="NUM">4</field>
  846. </block>
  847. </value>
  848. <value name="ADD1">
  849. <block type="math_number">
  850. <field name="NUM">3</field>
  851. </block>
  852. </value>
  853. <value name="ADD2">
  854. <block type="math_number">
  855. <field name="NUM">2</field>
  856. </block>
  857. </value>
  858. <value name="ADD3">
  859. <block type="math_number">
  860. <field name="NUM">1</field>
  861. </block>
  862. </value>
  863. </block>
  864. </value>
  865. </block>
  866. </next>
  867. </block>
  868. </next>
  869. </block>
  870. </next>
  871. </block>
  872. </next>
  873. </block>
  874. </next>
  875. </block>
  876. </next>
  877. </block>
  878. </next>
  879. </block>
  880. </next>
  881. </block>
  882. </next>
  883. </block>
  884. </next>
  885. </block>
  886. </next>
  887. </block>
  888. </statement>
  889. </block>
  890. </xml>