rubyx/test
Torsten Ruger 8322fca7b3 give labels an integer that will end up being the position at runtime
Since integers are first class objects, we need to use an integer object
as the return address. The actual address can not be stored in an
instance variable since it is not an object.
The address is unique to the label and never changes after positioning
(using the int is next up)
2018-05-29 20:26:00 +03:00
..
arm fix binary code offset when calling 2018-05-29 17:03:20 +03:00
bench fix mod4 name 2018-04-19 10:00:55 +03:00
elf fix binary code offset when calling 2018-05-29 17:03:20 +03:00
lib use modified opal logger 2018-05-20 14:45:48 +03:00
mom busy fixing tests 2018-05-24 19:38:48 +03:00
parfait make ints compile time mutable 2018-05-29 17:03:55 +03:00
risc give labels an integer that will end up being the position at runtime 2018-05-29 20:26:00 +03:00
support fix all test 2018-05-25 20:40:39 +03:00
vool assemble risc to it's position (not itself) 2018-05-17 09:49:01 +03:00
helper.rb more remote debugging 2017-04-14 14:38:23 +03:00
README.md remove traces of salama 2017-08-29 18:38:51 +03:00
test_all.rb restrict tests to test dir 2017-04-14 20:37:47 +03:00

Testing

Testing is off course great, and well practised in the ruby community. Good tests exists in the parts where functionality is clear: Parsing and binary generation.

But it is difficult to write tests when you don't know what the functionality is. Also TDD does not really help as it assumes you know what you're doing.

I used minitest as the framework, just because it is lighter and thus when the time comes to move to rubyx, less work.

All

'''' ruby test/test_all.rb ''''

Parfait

Well, test Parfait. Not perfect, but growing as bugs appear. Basics are ok though.

Compiler

Different kinds of quite minimal tests that ensure we can go from parsed to code.

Fragments

Much more elaborate tests of the compling functionality. All code constructs and their output in terms of instructions are tested.

vm

Mostly tests about the Parfait compatibility layer and padding (for assmenbly). Slightly bad name ... wip