[ruby/mmtk] Add tests for MMTK_HEAP_MIN
https://github.com/ruby/mmtk/commit/a725b95f51
This commit is contained in:
parent
b8a2b1068a
commit
6d806031ed
@ -29,6 +29,11 @@ module MMTk
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_MMTK_HEAP_MIN
|
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
|
# TODO: uncomment this test when the infinite loop is fixed
|
||||||
# assert_separately([{ "MMTK_HEAP_MODE" => "dynamic", "MMTK_HEAP_MIN" => "1" }], <<~RUBY)
|
# assert_separately([{ "MMTK_HEAP_MODE" => "dynamic", "MMTK_HEAP_MIN" => "1" }], <<~RUBY)
|
||||||
# assert_equal(1, GC.config[:mmtk_heap_min])
|
# assert_equal(1, GC.config[:mmtk_heap_min])
|
||||||
@ -39,6 +44,12 @@ module MMTk
|
|||||||
RUBY
|
RUBY
|
||||||
end
|
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
|
def test_MMTK_HEAP_MAX
|
||||||
assert_separately([{ "MMTK_HEAP_MODE" => "fixed", "MMTK_HEAP_MAX" => "100MiB" }], <<~RUBY)
|
assert_separately([{ "MMTK_HEAP_MODE" => "fixed", "MMTK_HEAP_MAX" => "100MiB" }], <<~RUBY)
|
||||||
assert_equal(100 * 1024 * 1024, GC.config[:mmtk_heap_max])
|
assert_equal(100 * 1024 * 1024, GC.config[:mmtk_heap_max])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user