mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
TestTime#test_memsize: skip when on GC_DEBUG
GC_DEBUG=1 makes this test fail because it changes the size of struct RVALUE. I don't think the test is useful then. Let's just skip.
This commit is contained in:
parent
6788c375b1
commit
984e0233fe
2 changed files with 2 additions and 0 deletions
1
gc.c
1
gc.c
|
@ -11851,6 +11851,7 @@ Init_GC(void)
|
|||
rb_mGC = rb_define_module("GC");
|
||||
|
||||
gc_constants = rb_hash_new();
|
||||
rb_hash_aset(gc_constants, ID2SYM(rb_intern("DEBUG")), GC_DEBUG ? Qtrue : Qfalse);
|
||||
rb_hash_aset(gc_constants, ID2SYM(rb_intern("RVALUE_SIZE")), SIZET2NUM(sizeof(RVALUE)));
|
||||
rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_OBJ_LIMIT")), SIZET2NUM(HEAP_PAGE_OBJ_LIMIT));
|
||||
rb_hash_aset(gc_constants, ID2SYM(rb_intern("HEAP_PAGE_BITMAP_SIZE")), SIZET2NUM(HEAP_PAGE_BITMAP_SIZE));
|
||||
|
|
|
@ -1256,6 +1256,7 @@ class TestTime < Test::Unit::TestCase
|
|||
def test_memsize
|
||||
# Time objects are common in some code, try to keep them small
|
||||
skip "Time object size test" if /^(?:i.?86|x86_64)-linux/ !~ RUBY_PLATFORM
|
||||
skip "GC is in debug" if GC::INTERNAL_CONSTANTS[:DEBUG]
|
||||
require 'objspace'
|
||||
t = Time.at(0)
|
||||
size = GC::INTERNAL_CONSTANTS[:RVALUE_SIZE]
|
||||
|
|
Loading…
Reference in a new issue