move expression tests to standard dir for guard
This commit is contained in:
parent
3b0c5c00ce
commit
66f359a14f
@ -5,7 +5,7 @@ module Register
|
|||||||
def test_simple_collect
|
def test_simple_collect
|
||||||
Machine.new.boot
|
Machine.new.boot
|
||||||
objects = Register::Collector.collect_space
|
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
|
end
|
||||||
end
|
end
|
||||||
|
@ -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
|
|
@ -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"
|
|
@ -1,5 +1,24 @@
|
|||||||
require_relative '../helper'
|
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
|
module Statements
|
||||||
include AST::Sexp
|
include AST::Sexp
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#statements
|
||||||
require_relative "test_assign"
|
require_relative "test_assign"
|
||||||
require_relative "test_call_site"
|
require_relative "test_call_site"
|
||||||
require_relative "test_class"
|
require_relative "test_class"
|
||||||
@ -5,3 +6,9 @@ require_relative "test_fields"
|
|||||||
require_relative "test_if"
|
require_relative "test_if"
|
||||||
require_relative "test_return"
|
require_relative "test_return"
|
||||||
require_relative "test_while"
|
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"
|
||||||
|
@ -2,8 +2,6 @@ require_relative "parfait/test_all"
|
|||||||
|
|
||||||
require_relative "type/test_all"
|
require_relative "type/test_all"
|
||||||
|
|
||||||
require_relative "expressions/test_all"
|
|
||||||
|
|
||||||
require_relative "method_compiler/test_all"
|
require_relative "method_compiler/test_all"
|
||||||
|
|
||||||
require_relative "test_to_code"
|
require_relative "test_to_code"
|
||||||
|
Loading…
Reference in New Issue
Block a user