diff options
author | Yusuke Endoh <[email protected]> | 2024-08-02 21:44:43 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2024-08-02 23:29:28 +0900 |
commit | 3f93ef06a852af3f44d3c7a2ed62a670f9c3ff29 (patch) | |
tree | 042401b929f282aab0aa61c6b1b91593576b23ba /test/ruby/test_string_memory.rb | |
parent | 303d2319f04b7d46ad3dbf28035b83a06fdba5b3 (diff) |
Show what objects were actually allocated on allocation count tests
According to Launchable, these tests fail randomly
```
Failure:
TestStringMemory#test_byteslice_prefix [D:/a/ruby/ruby/src/test/ruby/test_string_memory.rb:33]:
<1> expected but was
<2>.
```
https://app.launchableinc.com/organizations/ruby/workspaces/ruby/data/test-paths/file%3Dtest%2Fruby%2Ftest_string_memory.rb%23%23%23class%3DTestStringMemory%23%23%23testcase%3Dtest_byteslice_prefix?testSessionStatus=flake
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11295
Diffstat (limited to 'test/ruby/test_string_memory.rb')
-rw-r--r-- | test/ruby/test_string_memory.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_string_memory.rb b/test/ruby/test_string_memory.rb index 3b4694f36f..3952d10343 100644 --- a/test/ruby/test_string_memory.rb +++ b/test/ruby/test_string_memory.rb @@ -30,7 +30,7 @@ class TestStringMemory < Test::Unit::TestCase string.byteslice(0, 50_000) end - assert_equal 1, allocations.size + assert_equal 1, allocations.size, "One object allocation is expected, but allocated: #{ allocations.inspect }" end def test_byteslice_postfix @@ -40,7 +40,7 @@ class TestStringMemory < Test::Unit::TestCase string.byteslice(50_000, 100_000) end - assert_equal 1, allocations.size + assert_equal 1, allocations.size, "One object allocation is expected, but allocated: #{ allocations.inspect }" end def test_byteslice_postfix_twice @@ -50,6 +50,6 @@ class TestStringMemory < Test::Unit::TestCase string.byteslice(50_000, 100_000).byteslice(25_000, 50_000) end - assert_equal 2, allocations.size + assert_equal 2, allocations.size, "Two object allocations are expected, but allocated: #{ allocations.inspect }" end end |