From 9aefa84e2f39d2d0f74274ae960c2bff94ffe66b Mon Sep 17 00:00:00 2001 From: Bystroushaak Date: Wed, 25 Sep 2019 02:25:03 +0200 Subject: [PATCH] Fixed count_to_500.self test. --- tests/scripts/count_to_500.self | 37 ++++----------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/tests/scripts/count_to_500.self b/tests/scripts/count_to_500.self index d3c4c2e..d95baf2 100644 --- a/tests/scripts/count_to_500.self +++ b/tests/scripts/count_to_500.self @@ -1,43 +1,14 @@ (| - init_true = (| true_mirror | - true_mirror: primitives mirrorOn: true. - - true_mirror toSlot: 'ifTrue:' Add: (| :blck | blck value). - true_mirror toSlot: 'ifFalse:' Add: (| :blck | nil.). - ). - init_false = (| false_mirror | - false_mirror: primitives mirrorOn: false. - - false_mirror toSlot: 'ifTrue:' Add: (| :blck | nil). - false_mirror toSlot: 'ifFalse:' Add: (| :blck | blck value.). - ). - - init = (| block_traits_mirror. | - init_true. - init_false. - - block_traits_mirror: primitives mirrorOn: block_traits. - block_traits_mirror toSlot: 'whileTrue:' Add: (| :blck | - self value ifFalse: [ ^nil ]. - blck value. - ^self whileTrue: blck. - ). - ). - test_while = (| i <- 0. | [ i < 500 ] whileTrue: [ 'i: ' print. i asString print. '\n' print. - # 'number of frames: ' print. - # primitives interpreter numberOfFrames asString print. - # '\n\n' print. + 'number of frames: ' print. + primitives interpreter numberOfFrames asString print. + '\n\n' print. i: i + 1. ]. ). - test = (|| - init. - test_while. - ). -|) test. +|) test_while.