hurra, a first test. looks a lot.... but lets not spoil th efeeling
This commit is contained in:
@ -6,7 +6,7 @@ class TestBasic < MiniTest::Test
|
||||
|
||||
def test_number
|
||||
@string_input = '42 '
|
||||
@output = Ast::IntegerExpression.new(42)
|
||||
@output = [Virtual::IntegerConstant.new(42)]
|
||||
check
|
||||
end
|
||||
|
||||
|
@ -12,9 +12,8 @@ module VirtualHelper
|
||||
syntax = parser.parse_with_debug(@string_input)
|
||||
parts = Parser::Transform.new.apply(syntax)
|
||||
machine = Virtual::Machine.new
|
||||
puts parts.class.inspect
|
||||
parts.compile(machine.bindings)
|
||||
|
||||
expressions = parts.compile(machine.bindings)
|
||||
assert_equal @output , expressions
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user