take the benchmark tests out from the soml

they just run soon long if accidentally invoked
This commit is contained in:
Torsten Ruger 2015-11-21 14:33:52 +02:00
parent 9eab4b7f67
commit a589df7bf9
3 changed files with 12 additions and 62 deletions

View File

@ -19,7 +19,7 @@ class TestSpace < MiniTest::Test
end end
def test_integer def test_integer
int = Parfait::Space.object_space.get_class_by_name :Integer int = Parfait::Space.object_space.get_class_by_name :Integer
assert_equal 2, int.method_names.get_length assert_equal 3, int.method_names.get_length
end end
def test_classes_class def test_classes_class

View File

@ -31,11 +31,10 @@ class TestPutiRT < MiniTest::Test
# finally settled on the long hackers delight version http://www.hackersdelight.org/divcMore.pdf # finally settled on the long hackers delight version http://www.hackersdelight.org/divcMore.pdf
def test_div10_random def test_div10_random
1000.times do 20.times do
i = rand 0xfffff i = rand 0xfffff
@main = "return #{i}.div10()" @main = "return #{i}.div10()"
check_local i / 10 check_local i / 10
puts "tested #{i}"
end end
end end
@ -69,7 +68,7 @@ class TestPutiRT < MiniTest::Test
def test_tos_one_digit def test_tos_one_digit
@main = "Word five = 5.to_s() @main = "Word five = 5.to_s()
five.putstring()" five.putstring()"
@stdout = " 5" @stdout = "5"
check check
end end
@ -82,14 +81,14 @@ return five.char_length"
def test_tos_zero def test_tos_zero
@main = "Word five = 0.to_s() @main = "Word five = 0.to_s()
five.putstring()" five.putstring()"
@stdout = " 0" @stdout = "0"
check check
end end
def test_tos_two_digit def test_tos_two_digit
@main = "Word five = 15.to_s() @main = "Word five = 15.to_s()
five.putstring()" five.putstring()"
@stdout = " 15" @stdout = "15"
check check
end end
@ -102,13 +101,13 @@ five.putstring()"
def test_tos_three_digit def test_tos_three_digit
@main = "Word five = 150.to_s() @main = "Word five = 150.to_s()
five.putstring()" five.putstring()"
@stdout = " 150" @stdout = "150"
check check
end end
def test_puti_four_digit def test_puti_four_digit
@main = "return 1234.puti()" @main = "return 1234.puti()"
@stdout = " 1234" @stdout = "1234"
check 1234 check 1234
end end
@ -116,7 +115,7 @@ five.putstring()"
@main = "int i = 301 * 4096 @main = "int i = 301 * 4096
i = i + 1671 i = i + 1671
return i.puti()" return i.puti()"
@stdout = " 1234567" @stdout = "1234567"
check 1234567 check 1234567
end end
@ -131,63 +130,27 @@ five.putstring()"
@main = "int i = 3014 * 4096 @main = "int i = 3014 * 4096
i = i + 334 i = i + 334
return i.puti()" return i.puti()"
@stdout = " 12345678" @stdout = "12345678"
check 12345678 check 12345678
end end
def test_fibr8 def test_fibr8
@main = "int fib = 8.fibr( ) @main = "int fib = 8.fibr( )
return fib.puti()" return fib.puti()"
@stdout = " 21" @stdout = "21"
check 21 check 21
end end
def test_fib20_1000
@main = "int count = 1000
while_plus( count - 1)
20.fibr( )
count = count - 1
end
return count"
check 0
end
def test_fibw8 def test_fibw8
@main = "int fib = 8.fibw( ) @main = "int fib = 8.fibw( )
return fib.puti()" return fib.puti()"
@stdout = " 21" @stdout = "21"
check 21 check 21
end end
def test_fibw20 def test_fibw20
@main = "int fib = 20.fibw( ) @main = "int fib = 20.fibw( )
return fib.puti()" return fib.puti()"
@stdout = " 6765" @stdout = "6765"
check 6765 check 6765
end end
def test_fib40_100000
@main = "int count = 100352 - 352
while_plus( count - 1)
40.fibw( )
count = count - 1
end
return count"
check 0
end
def test_itos_100000
@main = "int count = 100352 - 352
while_plus( count - 1)
count.to_s( )
count = count - 1
end
return count"
check 0
end
def test_loop_100000
@main = "int count = 100352 - 352
while_plus( count - 1)
count = count - 1
end
return count"
check 0
end
end end

View File

@ -177,17 +177,4 @@ return w.char_length
HERE HERE
check 4 check 4
end end
def test_puts_100000
@main = <<HERE
int count = 100352 - 352
Word hello = "Hello there"
while_plus( count - 1)
hello.putstring()
count = count - 1
end
return 1
HERE
check 1
end
end end