Added test for debug_level:
option of RubyVM::InstructionSequence.compile
This commit is contained in:
parent
1dad9fa5e1
commit
a9567cc2bf
Notes:
git
2020-04-15 16:07:13 +09:00
@ -438,3 +438,8 @@ tests.compact.each {|(insn, expr, *a)|
|
|||||||
assert_equal 'true', progn, 'trace_' + insn, *a
|
assert_equal 'true', progn, 'trace_' + insn, *a
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert_normal_exit("#{<<-"begin;"}\n#{<<-'end;'}")
|
||||||
|
begin;
|
||||||
|
RubyVM::InstructionSequence.compile("", debug_level: 5)
|
||||||
|
end;
|
||||||
|
@ -571,4 +571,12 @@ class TestISeq < Test::Unit::TestCase
|
|||||||
assert_not_nil(invokebuiltin)
|
assert_not_nil(invokebuiltin)
|
||||||
assert_equal([:func_ptr, :argc, :index, :name], invokebuiltin[1].keys)
|
assert_equal([:func_ptr, :argc, :index, :name], invokebuiltin[1].keys)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_iseq_option_debug_level
|
||||||
|
assert_raise(TypeError) {ISeq.compile("", debug_level: "")}
|
||||||
|
assert_ruby_status([], "#{<<~"begin;"}\n#{<<~'end;'}")
|
||||||
|
begin;
|
||||||
|
RubyVM::InstructionSequence.compile("", debug_level: 5)
|
||||||
|
end;
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user