summaryrefslogtreecommitdiffstats
path: root/runtime/gc
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2015-03-12 15:40:53 -0700
committerHiroshi Yamauchi <yamauchi@google.com>2015-03-13 10:59:50 -0700
commitdb1c9ac2c28f7c52d4081dc42fc4f10efed953f9 (patch)
tree403b286b6f609fa9cbd97af41357b7d0c26d63b2 /runtime/gc
parentb1e63900ab0637875adcb77eeb7ff5af532293a1 (diff)
downloadart-db1c9ac2c28f7c52d4081dc42fc4f10efed953f9.zip
art-db1c9ac2c28f7c52d4081dc42fc4f10efed953f9.tar.gz
art-db1c9ac2c28f7c52d4081dc42fc4f10efed953f9.tar.bz2
Exercise Heap::PreZygoteFork() in a test.
Change-Id: If41c931ffdbb0310536799b4515557770f2cd4b9
Diffstat (limited to 'runtime/gc')
-rw-r--r--runtime/gc/heap_test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/gc/heap_test.cc b/runtime/gc/heap_test.cc
index 73196b2..14d78d8 100644
--- a/runtime/gc/heap_test.cc
+++ b/runtime/gc/heap_test.cc
@@ -71,5 +71,17 @@ TEST_F(HeapTest, HeapBitmapCapacityTest) {
bitmap->Set(fake_end_of_heap_object);
}
+class ZygoteHeapTest : public CommonRuntimeTest {
+ void SetUpRuntimeOptions(RuntimeOptions* options) {
+ CommonRuntimeTest::SetUpRuntimeOptions(options);
+ options->push_back(std::make_pair("-Xzygote", nullptr));
+ }
+};
+
+TEST_F(ZygoteHeapTest, PreZygoteFork) {
+ // Exercise Heap::PreZygoteFork() to check it does not crash.
+ Runtime::Current()->GetHeap()->PreZygoteFork();
+}
+
} // namespace gc
} // namespace art