Class: TestIf
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- TestIf
- Defined in:
- lib/tester/test_unit.rb
Instance Method Summary collapse
Instance Method Details
#test_if ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/tester/test_unit.rb', line 133 def test_if assert_equal(2, LangParser.new.calc_test(" #{$if} #{$true} 1+1 #{$end}")) assert_equal(2, LangParser.new.calc_test(" #{$if} 3 == 3 1+1 #{$end}")) assert_equal(nil, LangParser.new.calc_test("#{$if} 3 == 2 1+1 #{$end}")) end |