Class: TestFunction
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- TestFunction
- Defined in:
- lib/tester/test_unit.rb
Instance Method Summary collapse
Instance Method Details
#test_function ⇒ Object
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/tester/test_unit.rb', line 178 def test_function assert_equal(nil, LangParser.new.calc_test(" #{$def} foo() 5+5 #{$end}")) assert_equal(10, LangParser.new.calc_test(" #{$def} foo() 5+5 #{$end} foo()")) assert_equal(10, LangParser.new.calc_test(" #{$def} boo() a = 5 a #{$end} b = 5 + boo() b")) end |