fix all tests to use space.main

This commit is contained in:
Torsten Ruger
2015-11-30 16:20:39 +02:00
parent afe16868b5
commit c7d1f9ec99
22 changed files with 53 additions and 58 deletions

View File

@ -11,7 +11,7 @@ class Bar
return 1
end
end
class Object
class Space
int main()
return 1
end

View File

@ -5,7 +5,7 @@ class TestFunctions < MiniTest::Test
def test_functions
@string_input = <<HERE
class Object
class Space
int times(int a, int b)
if_zero( b + 0)
@ -35,7 +35,7 @@ HERE
def test_class_method
@string_input = <<HERE
class Object
class Space
int self.some()
return 5
@ -52,7 +52,7 @@ HERE
def test_class_method_fails
@string_input = <<HERE
class Object
class Space
int main()
return Object.som()
end

View File

@ -5,7 +5,7 @@ class TestHello < MiniTest::Test
def test_hello
@string_input = <<HERE
class Object
class Space
int main()
"Hello Raisa, I am salama".putstring()
end

View File

@ -5,7 +5,7 @@ class TestIf < MiniTest::Test
def test_if_plus
@string_input = <<HERE
class Object
class Space
int main()
int n = 10
if_plus( n - 12)
@ -22,7 +22,7 @@ HERE
def test_if_zero
@string_input = <<HERE
class Object
class Space
int main()
int n = 10
if_zero(n - 10 )
@ -39,7 +39,7 @@ HERE
def test_if_minus
@string_input = <<HERE
class Object
class Space
int itest(int n)
if_minus( n - 12)
"then".putstring()

View File

@ -10,7 +10,7 @@ class Integer
return 1
end
end
class Object
class Space
int main()
42.putint()
end

View File

@ -5,7 +5,7 @@ class TestRecursinveFibo < MiniTest::Test
def test_recursive_fibo
@string_input = <<HERE
class Object
class Space
int fibonaccir( int n )
if_plus( n - 2 )
int tmp

View File

@ -5,7 +5,7 @@ class TestReturn < MiniTest::Test
def test_return1
@string_input = <<HERE
class Object
class Space
int main()
return 5
end
@ -17,7 +17,7 @@ HERE
def test_return2
@string_input = <<HERE
class Object
class Space
int foo(int x)
return x
end
@ -33,7 +33,7 @@ HERE
def test_return3
@string_input = <<HERE
class Object
class Space
int foo(int x)
int a = 5
return a

View File

@ -5,7 +5,7 @@ class TestWhileFragment < MiniTest::Test
def fibo num
@string_input = <<HERE
class Object
class Space
int fibonaccit(int n)
int a = 0
int b = 1

View File

@ -6,12 +6,12 @@ class TestWord < MiniTest::Test
def test_word_new
@string_input = <<HERE
class Object
class Space
Word self.new()
return nil
end
end
class Object
class Space
int main()
Word w = Word.new()
end