update reader and implement singletons

This commit is contained in:
Torsten Ruger
2014-07-01 15:57:13 +03:00
parent 94d1140686
commit 7045a4b256
7 changed files with 48 additions and 5 deletions

View File

@ -1,2 +1 @@
require_relative "fragments/test_all"
require_relative "test_intel"

View File

@ -3,13 +3,29 @@ require_relative "virtual_helper"
class TestBasic < MiniTest::Test
# include the magic (setup and parse -> test method translation), see there
include VirtualHelper
def test_number
@string_input = '42 '
@output = [Virtual::IntegerConstant.new(42)]
check
end
def test_true
@string_input = 'true '
@output = [Virtual::TrueValue.new()]
check
end
def test_false
@string_input = 'false '
@output = [Virtual::FalseValue.new()]
check
end
def test_nil
@string_input = 'nil '
@output = [Virtual::NilValue.new()]
check
end
def test_name
@string_input = 'foo '
@output = [nil]