Skip to content

Commit 65b34b5

Browse files
committed
Add tests for when MMTK_HEAP_MIN >= MMTK_HEAP_MAX
1 parent 90f1aa8 commit 65b34b5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/mmtk/test_configuration.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,25 @@ class TestConfiguration < TestCase
1414
assert_equal(1, exit_code.exitstatus)
1515
end
1616
end
17+
18+
def test_MMTK_HEAP_MIN_greater_than_or_equal_to_MMTK_HEAP_MAX
19+
exit_code = assert_in_out_err(
20+
[{ "MMTK_HEAP_MIN" => "100MiB", "MMTK_HEAP_MAX" => "10MiB" }, "--"],
21+
"",
22+
[],
23+
["[FATAL] MMTK_HEAP_MIN(104857600) >= MMTK_HEAP_MAX(10485760)"]
24+
)
25+
26+
assert_equal(1, exit_code.exitstatus)
27+
28+
exit_code = assert_in_out_err(
29+
[{ "MMTK_HEAP_MIN" => "10MiB", "MMTK_HEAP_MAX" => "10MiB" }, "--"],
30+
"",
31+
[],
32+
["[FATAL] MMTK_HEAP_MIN(10485760) >= MMTK_HEAP_MAX(10485760)"]
33+
)
34+
35+
assert_equal(1, exit_code.exitstatus)
36+
end
1737
end
1838
end

0 commit comments

Comments
 (0)