ion out last changes from grammar update
surprisingly painless, considering it was more or less a rewrite
This commit is contained in:
@ -49,9 +49,9 @@ HERE
|
||||
def test_int_function
|
||||
@string_input = <<HERE
|
||||
class Integer < Object
|
||||
int times(int x)
|
||||
self * x
|
||||
end
|
||||
int times(int x)
|
||||
return x
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@output = [[Virtual::MethodEnter] , [Virtual::MethodReturn]]
|
||||
|
@ -5,11 +5,9 @@ class TestBasicClass < MiniTest::Test
|
||||
|
||||
def test_class_basic
|
||||
@string_input = <<HERE
|
||||
module Foo
|
||||
class Bar
|
||||
int buh()
|
||||
return 1
|
||||
end
|
||||
class Bar
|
||||
int buh()
|
||||
return 1
|
||||
end
|
||||
end
|
||||
HERE
|
||||
|
@ -9,9 +9,9 @@ class Object
|
||||
int main()
|
||||
int n = 10
|
||||
if( n < 12)
|
||||
3
|
||||
return 3
|
||||
else
|
||||
4
|
||||
return 4
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -30,7 +30,8 @@ class Integer < Object
|
||||
int rest
|
||||
rest = self - div
|
||||
if( rest < 0)
|
||||
str = str + digit( rest )
|
||||
rest = self.digit( rest )
|
||||
str = str + rest
|
||||
else
|
||||
str = div.add_string(str)
|
||||
end
|
||||
|
Reference in New Issue
Block a user