1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/objspace/test_objspace.rb: check stderr before stdout

When `require "objspace/trace"` fails, previously the failure says:
```
  1) Failure:
TestObjSpace#test_objspace_trace [/tmp/ruby/v3/src/trunk-mjit/test/objspace/test_objspace.rb:621]:
<3> expected but was
<0>.
```
but this is hard to debug.
This commit is contained in:
Yusuke Endoh 2021-05-14 18:07:58 +09:00
parent 702961a88b
commit f210d456a8

View file

@ -625,11 +625,11 @@ class TestObjSpace < Test::Unit::TestCase
c = 42
p a, b, c
end;
assert_equal ["objspace/trace is enabled"], err
assert_equal 3, out.size
assert_equal '"foo" @ -:2', out[0]
assert_equal '"bar" @ -:3', out[1]
assert_equal '42', out[2]
assert_equal ["objspace/trace is enabled"], err
end
end
end