class TestLisp
Public Instance Methods
setup()
click to toggle source
# File test/test.rb, line 6 def setup @type = "lisp" @string = "( - ( + ( / 18 ( ^ 3 2 ) ) 12 ) 13 )" @array = ["(", "-", "(", "+", "(", "/", 18.0, "(", "**", 3.0, 2.0, ")", ")", 12.0, ")", 13.0, ")"] @result = 1 @Lisp = Lisp.new(@string, @type) end
test_array_access()
click to toggle source
# File test/test.rb, line 22 def test_array_access assert_equal(@array, @Lisp.array) end
test_results()
click to toggle source
# File test/test.rb, line 26 def test_results assert_equal(@result, @Lisp.result) end
test_string_access()
click to toggle source
# File test/test.rb, line 18 def test_string_access assert_equal(@string, @Lisp.string) end
test_type_access()
click to toggle source
# File test/test.rb, line 14 def test_type_access assert_equal(@type, @Lisp.type) end