Starting to build detailed mom to risc test

so we can get rid of brittle risc folder tests
All of those tests rely on many many implementation details
should just test result through interpreter, no chain.
This commit is contained in:
2019-09-15 17:44:35 +03:00
parent d913bb01de
commit 6f108f67d7
4 changed files with 79 additions and 9 deletions

View File

@ -22,5 +22,13 @@ module Minitest
assert_equal from , transfer.from.symbol
assert_equal to , transfer.to.symbol
end
def assert_label( label , name )
assert_equal Risc::Label , label.class
if(name[-1] == "_")
assert label.name.start_with?(name) , "Label does not start with #{name}:#{label.name}"
else
assert_equal name , label.name
end
end
end
end