zwischenstopp

This commit is contained in:
Torsten Ruger
2014-07-01 18:58:25 +03:00
parent 7045a4b256
commit f74999af57
6 changed files with 25 additions and 39 deletions

View File

@ -32,19 +32,6 @@ class TestBasic < MiniTest::Test
check
end
def test_name_underscode_start
@string_input = '_bar '
@output = Ast::NameExpression.new('_bar')
check
end
def test_name_underscode_middle
@string_input = 'foo_bar '
@parse_output = {:name => 'foo_bar'}
@output = Ast::NameExpression.new('foo_bar')
check
end
def test_instance_variable
@string_input = '@foo_bar '
@parse_output = {:instance_variable=>{:name=>"foo_bar"}}
@ -74,13 +61,4 @@ class TestBasic < MiniTest::Test
check
end
def test_string_escapes
out = 'hello \nyou'
@string_input = '"' + out + '"'
@parse_output = {:string=>[{:char=>"h"}, {:char=>"e"}, {:char=>"l"}, {:char=>"l"}, {:char=>"o"},
{:char=>" "}, {:char=>" "}, {:esc=>"n"}, {:char=>"y"}, {:char=>"o"}, {:char=>"u"}]}
@output = Ast::StringExpression.new(out)
check
end
end

View File

@ -12,7 +12,7 @@ module VirtualHelper
syntax = parser.parse_with_debug(@string_input)
parts = Parser::Transform.new.apply(syntax)
machine = Virtual::Machine.new
expressions = parts.compile(machine.bindings)
expressions = parts.compile(machine.frame , machine.anonymous)
assert_equal @output , expressions
end