diff --git a/stash/fibo_times.ruby b/stash/fibo_times.ruby deleted file mode 100644 index b06f34c0..00000000 --- a/stash/fibo_times.ruby +++ /dev/null @@ -1,14 +0,0 @@ -def fibonaccit(n) - a = 0 - b = 1 - (n-1).times do - tmp = a - a = b - b = tmp + b - end - b -end - -#1000000.times {fibonaccit( 30 )} -#10.times {|i| puts fibonaccit(i+90).class} -puts fibonaccit 90 diff --git a/stash/fragments/test_adds.rb b/stash/fragments/test_adds.rb deleted file mode 100644 index f3a47736..00000000 --- a/stash/fragments/test_adds.rb +++ /dev/null @@ -1,26 +0,0 @@ -require_relative 'helper' - -module Rubyx - class TestRubyAdds < MiniTest::Test - include RubyxTests - - def pest_ruby_adds - @string_input = < 0) do - counter -= 1 - end -HERE - @stdout = "Hello there" - check - end - - end -end diff --git a/stash/fragments/test_many_adds.rb b/stash/fragments/test_many_adds.rb deleted file mode 100644 index 6ada305a..00000000 --- a/stash/fragments/test_many_adds.rb +++ /dev/null @@ -1,34 +0,0 @@ -require_relative 'helper' - -module Rubyx - class TestManyAdds < MiniTest::Test - include RubyxTests - - def pest_ruby_adds_looping - @string_input = < 0) do - fibo(40) - counter -= 1 - end -HERE - @length = 37 - @stdout = "Hello there" - check - end - end -end diff --git a/stash/fragments/test_many_calls.rb b/stash/fragments/test_many_calls.rb deleted file mode 100644 index bdb07281..00000000 --- a/stash/fragments/test_many_calls.rb +++ /dev/null @@ -1,30 +0,0 @@ -require_relative 'helper' - -module Rubyx - class TestManyCalls < MiniTest::Test - include RubyxTests - - def pest_ruby_calls_looping - @string_input = < 0) do - fibo_r(20) - counter -= 1 - end -HERE - @length = 37 - @stdout = "" - check - end - end -end diff --git a/stash/fragments/test_many_hello.rb b/stash/fragments/test_many_hello.rb deleted file mode 100644 index d40df56c..00000000 --- a/stash/fragments/test_many_hello.rb +++ /dev/null @@ -1,21 +0,0 @@ -require_relative 'helper' - -module Rubyx - class TestManyHello < MiniTest::Test - include RubyxTests - - def pest_ruby_hello_looping - @string_input = < 0) do - puts "Hello there" - STDOUT.flush - counter = counter - 1 - end -HERE - @length = 37 - @stdout = "Hello there" - check - end - end -end diff --git a/stash/fragments/test_many_itos.rb b/stash/fragments/test_many_itos.rb deleted file mode 100644 index fed2f8c5..00000000 --- a/stash/fragments/test_many_itos.rb +++ /dev/null @@ -1,22 +0,0 @@ -require_relative 'helper' - -module Rubyx - class TestManyItos < MiniTest::Test - include RubyxTests - - def pest_ruby_itos_looping - @string_input = < 0) do - str = counter.to_s - counter = counter - 1 - end - str -HERE - @length = 37 - @stdout = "Hello Raisa, I am rubyx" - check - end - end -end diff --git a/test/risc/test_parfait_adapter.rb b/test/risc/test_parfait_adapter.rb index ae00142a..7515fe08 100644 --- a/test/risc/test_parfait_adapter.rb +++ b/test/risc/test_parfait_adapter.rb @@ -19,5 +19,16 @@ module Parfait assert_equal word , Parfait.new_word(string) assert_equal string , word.to_string end + def test_word_type + assert_has_type Parfait.new_word("string") + end + def test_int_type + assert_has_type Parfait::Integer.new(5) + end + def assert_has_type(obj) + assert_equal Parfait::Type , obj.type.class + assert_equal Parfait::Type , obj.get_type.class + assert_equal Parfait::Type , obj.get_internal_word(0).class + end end end