class TestRPN
Public Instance Methods
setup()
click to toggle source
# File test/test.rb, line 84 def setup @type = "rpn" @string = "12 18 3 2 ^ / 13 - +" @array = [12.0, 18.0, 3.0, 2.0, "**", "/", 13.0, "-", "+"] @result = 1 @RPN = MathNotation.new(@string, @type) end
test_array_access()
click to toggle source
# File test/test.rb, line 96 def test_array_access assert_equal(@array, @RPN.array) end
test_result_access()
click to toggle source
# File test/test.rb, line 100 def test_result_access assert_equal(@result, @RPN.result) end
test_string_access()
click to toggle source
# File test/test.rb, line 92 def test_string_access assert_equal(@string, @RPN.string) end