move expression tests to standard dir for guard

This commit is contained in:
Torsten Ruger 2017-01-03 22:18:41 +02:00
parent 3b0c5c00ce
commit 66f359a14f
11 changed files with 27 additions and 29 deletions

View File

@ -5,7 +5,7 @@ module Register
def test_simple_collect
Machine.new.boot
objects = Register::Collector.collect_space
assert ((352 == objects.length) or (419 == objects.length)) , objects.length.to_s
assert ((352 == objects.length) or (420 == objects.length)) , objects.length.to_s
end
end
end

View File

@ -1,21 +0,0 @@
require_relative '../helper'
module ExpressionHelper
def check
Register.machine.boot unless Register.machine.booted
compiler = Typed::MethodCompiler.new Parfait.object_space.get_main
code = Typed.ast_to_code @input
assert code.to_s , @input
produced = compiler.process( code )
assert @output , "No output given"
assert_equal produced.class , @output , "Wrong class"
produced
end
# test hack to in place change object type
def add_space_field(name,type)
class_type = Parfait.object_space.get_class_by_name(:Space).instance_type
class_type.send(:private_add_instance_variable, name , type)
end
end

View File

@ -1,5 +0,0 @@
require_relative "test_basic"
require_relative "test_call"
require_relative "test_field_access"
require_relative "test_ops"
require_relative "test_vars"

View File

@ -1,5 +1,24 @@
require_relative '../helper'
module ExpressionHelper
def check
Register.machine.boot unless Register.machine.booted
compiler = Typed::MethodCompiler.new Parfait.object_space.get_main
code = Typed.ast_to_code @input
assert code.to_s , @input
produced = compiler.process( code )
assert @output , "No output given"
assert_equal produced.class , @output , "Wrong class"
produced
end
# test hack to in place change object type
def add_space_field(name,type)
class_type = Parfait.object_space.get_class_by_name(:Space).instance_type
class_type.send(:private_add_instance_variable, name , type)
end
end
module Statements
include AST::Sexp

View File

@ -1,3 +1,4 @@
#statements
require_relative "test_assign"
require_relative "test_call_site"
require_relative "test_class"
@ -5,3 +6,9 @@ require_relative "test_fields"
require_relative "test_if"
require_relative "test_return"
require_relative "test_while"
#expressions
require_relative "test_basic"
require_relative "test_call"
require_relative "test_field_access"
require_relative "test_ops"
require_relative "test_vars"

View File

@ -2,8 +2,6 @@ require_relative "parfait/test_all"
require_relative "type/test_all"
require_relative "expressions/test_all"
require_relative "method_compiler/test_all"
require_relative "test_to_code"