update to new syntax and patch tests
basic semantics remain, but have to improve test for new functionality that has to be written for new branch types
This commit is contained in:
@ -8,7 +8,7 @@ class TestIfStatement < MiniTest::Test
|
||||
@string_input = <<HERE
|
||||
class Object
|
||||
int main()
|
||||
if( 10 < 12)
|
||||
if_plus( 10 < 12)
|
||||
return 3
|
||||
else
|
||||
return 4
|
||||
@ -28,7 +28,7 @@ HERE
|
||||
@string_input = <<HERE
|
||||
class Object
|
||||
int main()
|
||||
if( 10 < 12)
|
||||
if_minus( 10 < 12)
|
||||
return 3
|
||||
end
|
||||
end
|
||||
|
@ -9,7 +9,7 @@ module Register
|
||||
@string_input = <<HERE
|
||||
class Object
|
||||
int main()
|
||||
while(1)
|
||||
while_plus(1)
|
||||
return 3
|
||||
end
|
||||
end
|
||||
@ -25,7 +25,7 @@ HERE
|
||||
class Object
|
||||
int main()
|
||||
int n = 5
|
||||
while(n > 0)
|
||||
while_minus(n > 0)
|
||||
n = n - 1
|
||||
end
|
||||
end
|
||||
@ -43,7 +43,7 @@ HERE
|
||||
class Object
|
||||
int main()
|
||||
int n = 10
|
||||
while( n > 5)
|
||||
while_notzero( n > 5)
|
||||
n = n + 1
|
||||
return n
|
||||
end
|
||||
|
Reference in New Issue
Block a user