order test requires

easier to spot missed tests (when guard and cmd-line differ)
This commit is contained in:
Torsten Ruger 2017-04-02 22:42:51 +03:00
parent 16a55d9f95
commit ffbe39d571
6 changed files with 17 additions and 41 deletions

View File

@ -1,10 +1,10 @@
require_relative "test_attributes"
require_relative "test_class"
require_relative "test_dictionary"
require_relative "test_named_list"
require_relative "test_list"
require_relative "test_message"
require_relative "test_typed_method"
require_relative "test_named_list"
require_relative "test_object"
require_relative "test_space"
require_relative "test_typed_method"
require_relative "test_word"

View File

@ -1,9 +1,9 @@
require_relative "test_add"
require_relative "test_change"
require_relative "test_byte_to_reg"
require_relative "test_called_if"
require_relative "test_simple_if"
require_relative "test_puts"
require_relative "test_plus"
require_relative "test_change"
require_relative "test_mult"
require_relative "test_plus"
require_relative "test_puts"
require_relative "test_reg_to_byte"
require_relative "test_simple_if"

View File

@ -1,3 +1,4 @@
require_relative "test_type_collector"
require_relative "test_method_collector"
require_relative "test_locals_collector"
require_relative "test_method_collector"
require_relative "test_normalizer"
require_relative "test_type_collector"

View File

@ -1,4 +1,4 @@
require_relative "passes/test_all"
require_relative "fragments/test_all"
require_relative "passes/test_all"
require_relative "test_ruby_method"
require_relative "test_ruby_compiler"

View File

@ -4,12 +4,12 @@ require_relative "elf/test_all"
require_relative "lib/test_all"
require_relative "rubyx/test_all"
require_relative "vool/test_all"
require_relative "parfait/test_all"
require_relative "risc/test_all"
require_relative "rubyx/test_all"
require_relative "vm/test_all"
require_relative "vool/test_all"

View File

@ -6,12 +6,10 @@ module Vool
def basic_if
"if(10 < 12) ; true ; end"
end
def test_if_basic
lst = Compiler.compile( basic_if )
assert_equal IfStatement , lst.class
end
def test_if_basic_cond
lst = Compiler.compile( basic_if )
assert_equal SendStatement , lst.condition.class
@ -22,33 +20,10 @@ module Vool
assert_nil lst.if_false
end
def pest_if_basicr
@input = s(:statements, s(:if_statement, :plus, s(:condition, s(:operator_value, :-, s(:int, 10), s(:int, 12))), s(:true_statements, s(:return, s(:int, 3))), s(:false_statements, s(:return, s(:int, 4)))))
@expect = [Label, LoadConstant, LoadConstant, OperatorInstruction, IsPlus, LoadConstant ,
RegToSlot, Branch, Label, LoadConstant, RegToSlot, Label ,
LoadConstant, SlotToReg, RegToSlot, Label, FunctionReturn]
assert_nil msg = check_nil , msg
def test_if_double
lst = Compiler.compile( "if(false) ; true ; else ; false; end" )
assert_equal IfStatement , lst.class
end
def pest_if_small_minus
@input = s(:statements, s(:if_statement, :minus, s(:condition, s(:operator_value, :-, s(:int, 10), s(:int, 12))), s(:true_statements, s(:return, s(:int, 3))), s(:false_statements, nil)))
@expect = [Label, LoadConstant, LoadConstant, OperatorInstruction, IsMinus, Branch ,
Label, LoadConstant, RegToSlot, Label, LoadConstant, SlotToReg ,
RegToSlot, Label, FunctionReturn]
assert_nil msg = check_nil , msg
end
def pest_if_small_zero
@input = s(:statements, s(:if_statement, :zero, s(:condition, s(:operator_value, :-, s(:int, 10), s(:int, 12))), s(:true_statements, s(:return, s(:int, 3))), s(:false_statements, nil)))
@expect = [Label, LoadConstant, LoadConstant, OperatorInstruction, IsZero, Branch ,
Label, LoadConstant, RegToSlot, Label, LoadConstant, SlotToReg ,
RegToSlot, Label, FunctionReturn]
assert_nil msg = check_nil , msg
end
end
end