diff options
-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]) |