diff options
author | Peter Zhu <[email protected]> | 2025-01-21 11:56:57 -0500 |
---|---|---|
committer | git <[email protected]> | 2025-01-21 17:02:17 +0000 |
commit | 6d806031edb14ffe19d80973ea5668decebccac5 (patch) | |
tree | 9f43bf7d74c1b51f9ee9f970ec2edb7aa2b73545 | |
parent | b8a2b1068a3305aa74b126d5254d72264b2dd96b (diff) |
[ruby/mmtk] Add tests for MMTK_HEAP_MIN
https://github.com/ruby/mmtk/commit/a725b95f51
-rw-r--r-- | test/mmtk/test_configuration.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mmtk/test_configuration.rb b/test/mmtk/test_configuration.rb index 0f60eb62f0..88ae429e90 100644 --- a/test/mmtk/test_configuration.rb +++ b/test/mmtk/test_configuration.rb @@ -29,6 +29,11 @@ module MMTk end def test_MMTK_HEAP_MIN + # Defaults to 1MiB + assert_separately([], <<~RUBY) + assert_equal(1 * 1024 * 1024, GC.config[:mmtk_heap_min]) + RUBY + # TODO: uncomment this test when the infinite loop is fixed # assert_separately([{ "MMTK_HEAP_MODE" => "dynamic", "MMTK_HEAP_MIN" => "1" }], <<~RUBY) # assert_equal(1, GC.config[:mmtk_heap_min]) @@ -39,6 +44,12 @@ module MMTk RUBY end + def test_MMTK_HEAP_MIN_is_ignored_for_fixed_heaps + assert_separately([{ "MMTK_HEAP_MODE" => "fixed", "MMTK_HEAP_MIN" => "1" }], <<~RUBY) + assert_nil(GC.config[:mmtk_heap_min]) + RUBY + end + def test_MMTK_HEAP_MAX assert_separately([{ "MMTK_HEAP_MODE" => "fixed", "MMTK_HEAP_MAX" => "100MiB" }], <<~RUBY) assert_equal(100 * 1024 * 1024, GC.config[:mmtk_heap_max]) |