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:
Torsten Ruger
2015-10-19 15:31:48 +03:00
parent bdcd0f297d
commit 50379a1fea
8 changed files with 37 additions and 38 deletions

View File

@ -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

View File

@ -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