add a statistics command to compiler

just to see how many objects make up a binary
This commit is contained in:
2019-09-05 13:25:40 +03:00
parent 91995dc1b3
commit 7d92ee9e6a
4 changed files with 59 additions and 15 deletions

View File

@ -20,5 +20,14 @@ module RubyX
def test_interpret
assert_output(/interpreting/) {RubyXC.start(["interpret" , "test/mains/source/add__4.rb"])}
end
def test_execute
assert_output(/Running/) {RubyXC.start(["execute" , "test/mains/source/add__4.rb"])}
end
def test_stats
out, err = capture_io {RubyXC.start(["stats" , "test/mains/source/add__4.rb"])}
assert out.include?("Space") , out
assert out.include?("Total") , out
assert out.include?("Objects=") , out
end
end
end