# Some simple tests of RubyVM::InstructionSequence#disasm, and # #disasm_nochildren require 'test/unit' class TestDisasmClass < Test::Unit::TestCase def test_basic assert_equal(RubyVM::InstructionSequence.compile('1+2').disassemble, RubyVM::InstructionSequence.compile('1+2').disasm) p='def five; 5 end; five' s1=RubyVM::InstructionSequence.compile(p).disasm assert_equal String, s1.class, 'disasm output should be a string' s2=RubyVM::InstructionSequence.compile(p).disasm_nochildren assert_equal true, s1.size > s2.size end end