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
Родитель 702961a88b
Коммит f210d456a8
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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