rebooting tests for small compiles
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
|
||||
require_relative "test_foo"
|
||||
require_relative "test_if"
|
||||
#require_relative "test_functions"
|
||||
#require_relative "test_hello"
|
||||
#require_relative "test_if"
|
||||
#require_relative "test_putint"
|
||||
#require_relative "test_recursive_fibo"
|
||||
#require_relative "test_while_fibo"
|
||||
|
@@ -5,7 +5,7 @@ class TestFoo < MiniTest::Test
|
||||
|
||||
def test_foo2
|
||||
@string_input = <<HERE
|
||||
def foo(x)
|
||||
def foo2(x)
|
||||
a = 5
|
||||
end
|
||||
3.foo( 4 )
|
||||
|
@@ -3,7 +3,19 @@ require_relative 'helper'
|
||||
class TestIf < MiniTest::Test
|
||||
include Fragments
|
||||
|
||||
def test_if
|
||||
def test_if_basic
|
||||
@string_input = <<HERE
|
||||
if( n < 12)
|
||||
3
|
||||
else
|
||||
4
|
||||
end
|
||||
HERE
|
||||
@expect = [Virtual::Return ]
|
||||
check
|
||||
end
|
||||
|
||||
def ttest_if_function
|
||||
@string_input = <<HERE
|
||||
def itest(n)
|
||||
if( n < 12)
|
||||
@@ -15,11 +27,7 @@ end
|
||||
|
||||
itest(20)
|
||||
HERE
|
||||
@should = [0x0,0x40,0x2d,0xe9,0xc,0x0,0x53,0xe3,0x3,0x0,0x0,0xba,0x34,0x20,0x8f,0xe2,0x8,0x30,0xa0,0xe3,0xd4,0xff,0xff,0xeb,0x2,0x0,0x0,0xea,0x2c,0x20,0x8f,0xe2,0x8,0x30,0xa0,0xe3,0xd0,0xff,0xff,0xeb,0x0,0x80,0xbd,0xe8]
|
||||
@output = "else "
|
||||
@target = [:Object , :itest]
|
||||
parse
|
||||
write "if"
|
||||
@expect = [Virtual::Return ]
|
||||
check
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user