diff --git a/test/fragments/helper.rb b/test/fragments/helper.rb index cb8eab60..707c25c2 100644 --- a/test/fragments/helper.rb +++ b/test/fragments/helper.rb @@ -1,10 +1,15 @@ require_relative '../helper' +require 'parslet/convenience' #test the generation of code fragments. # ie parse assumes @string_input # compile # assemble/write assume a @should array with the bytes in it +# since the bytes are store, the test can be run on any machine. + +# but to get the bytes, one needs to link and run the object file to confirm correctness (to be automated) + module Fragments # need a code generator, for arm def setup diff --git a/test/fragments/test_all.rb b/test/fragments/test_all.rb new file mode 100644 index 00000000..5a442e2d --- /dev/null +++ b/test/fragments/test_all.rb @@ -0,0 +1,3 @@ + +require_relative "test_hello" +require_relative "test_foo" diff --git a/test/fragments/test_foo.rb b/test/fragments/test_foo.rb new file mode 100644 index 00000000..b2eb14fa --- /dev/null +++ b/test/fragments/test_foo.rb @@ -0,0 +1,18 @@ +require_relative 'helper' + +class TestFoo < MiniTest::Test + include Fragments + + def test_foo + @string_input = <