SlotLanguage reborn in the Machine
Just added the compiler, that can parse Slot directly into SlotMachine code (no language layer in between) Still unclear wheather the Maker is a thing, but since it was in the Language layer i did not remove it (yet) Otherwise just the compiler and all the tests, moved from the slot_language.
This commit is contained in:
17
test/slot_machine/compiler/test_slot_compiler.rb
Normal file
17
test/slot_machine/compiler/test_slot_compiler.rb
Normal file
@ -0,0 +1,17 @@
|
||||
require_relative "../helper"
|
||||
|
||||
module SlotMachine
|
||||
class TestSlotCompiler < MiniTest::Test
|
||||
include SlotHelper
|
||||
|
||||
def test_init
|
||||
assert SlotCompiler.new
|
||||
end
|
||||
def test_labels
|
||||
assert SlotCompiler.new.labels.empty?
|
||||
end
|
||||
def test_basic_compile
|
||||
assert_equal SlottedMessage , compile("a").class
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user