[前][次][番号順一覧][スレッド一覧]

ruby-changes:66207

From: Yusuke <ko1@a...>
Date: Fri, 14 May 2021 18:10:11 +0900 (JST)
Subject: [ruby-changes:66207] f210d456a8 (master): test/objspace/test_objspace.rb: check stderr before stdout

https://git.ruby-lang.org/ruby.git/commit/?id=f210d456a8

From f210d456a8a3ab29085bd811494c3bdf36dd6f69 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Fri, 14 May 2021 18:07:58 +0900
Subject: 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.
---
 test/objspace/test_objspace.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 7797d19..8ed04f5 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -625,11 +625,11 @@ class TestObjSpace < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/objspace/test_objspace.rb#L625
         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
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]