move more tests from interpreter to mains

while now
all interpreter tests with only return tests move now
This commit is contained in:
2020-03-27 19:04:10 +02:00
parent b378a42928
commit c29bb44159
8 changed files with 15 additions and 95 deletions

View File

@ -4,10 +4,22 @@ module Mains
class WhileTester < MiniTest::Test
include MainsHelper
def test_while
def test_while_cmp
@preload = "Integer.gt;Integer.plus"
@input = as_main 'a = -1; while( 0 > a); a = 1 + a;end;return a'
assert_result 0 , ""
end
def test_while_count
@preload = "Integer.gt;Integer.plus"
@input = as_main 'a = -1; while( 0 > a); a = 1 + a;end;return a'
assert_result 0 , ""
end
def test_while_simple
@input = as_main 'a = true; while( a ); a = false;end;return a'
# assert_result 4 , ""
end
end
end