More rename cleanp

This commit is contained in:
2019-10-03 21:07:55 +03:00
parent c43436f35a
commit aa9fc8bc81
57 changed files with 130 additions and 140 deletions

View File

@ -1,18 +1,7 @@
## Pre - testing builtin
In the process of moving builtin from mom to parfait. Considering we started at risc, this
is progress.
Builtin methods should (will) use the Macro idea to actually become code and land in
the parfait code.
On the way there, we start by Testing and moving the old ones. Since we want to be able
to test some methods even after the move, without parsing/processing the whole of parfait
we have to have a method of "injecting" the single? methods.
## SlotMachine level
There a re two test levels to every method. SlotMachine being the first, where we basically just
There are two test levels to every method. SlotMachine being the first, where we basically just
see if the right SlotMachine instruction has been generated
## Risc

View File

@ -4,13 +4,13 @@ module RubyX
module MacroHelper
def setup
whole ="class Space;def main(arg);return;end;end;" + source
@mom = RubyXCompiler.new(RubyX.default_test_options).ruby_to_slot(whole)
@mom.method_compilers
assert_equal SlotMachine::SlotCollection , @mom.class
@slot = RubyXCompiler.new(RubyX.default_test_options).ruby_to_slot(whole)
@slot.method_compilers
assert_equal SlotMachine::SlotCollection , @slot.class
assert_equal SlotMachine::MethodCompiler , compiler.class
end
def compiler
@mom.method_compilers.last_compiler
@slot.method_compilers.last_compiler
end
end

View File

@ -11,7 +11,7 @@ means testing every layer for every file.
Rather than create parfait tests for every layer (ie in the vool/slot_machine/risc directories)
we have one file per parfait file here. Each file tests all layers.
The usual workflow is to start with a new file and create tests for vool, mom, risc,binary
The usual workflow is to start with a new file and create tests for vool, slot_machine, risc,binary
in that order. Possibly fixing the compiler on the way. Then adding the file to
the RubyXCompiler parfait load list.

View File

@ -28,8 +28,8 @@ module RubyX
assert_equal :Data8 , vool[3].name
end
def test_slot
mom = @compiler.ruby_to_slot source
assert_equal SlotMachine::SlotCollection , mom.class
slot = @compiler.ruby_to_slot source
assert_equal SlotMachine::SlotCollection , slot.class
end
def test_risc
risc = compiler.ruby_to_risc( get_preload("Space.main") + source)

View File

@ -29,8 +29,8 @@ module RubyX
vool = @compiler.ruby_to_vool source
vool.to_parfait
#puts vool
mom = vool.to_slot(nil)
assert_equal SlotMachine::SlotCollection , mom.class
slot = vool.to_slot(nil)
assert_equal SlotMachine::SlotCollection , slot.class
end
def est_risc
risc = compiler.ruby_to_risc source

View File

@ -19,8 +19,8 @@ module RubyX
assert_equal :Object , vool.name
end
def test_slot
mom = compiler.ruby_to_slot source
assert_equal SlotMachine::SlotCollection , mom.class
slot = compiler.ruby_to_slot source
assert_equal SlotMachine::SlotCollection , slot.class
end
def test_risc
risc = compiler.ruby_to_risc( get_preload("Space.main") + source)

View File

@ -13,8 +13,8 @@ module RubyX
end
def test_creates_class_deriviation
mom = ruby_to_slot "class Testing ; end"
assert mom , "No classes created"
slot = ruby_to_slot "class Testing ; end"
assert slot , "No classes created"
end
def test_creates_class_with_deriviation