diff options
| author | 2015-03-12 15:40:53 -0700 | |
|---|---|---|
| committer | 2015-03-13 10:59:50 -0700 | |
| commit | db1c9ac2c28f7c52d4081dc42fc4f10efed953f9 (patch) | |
| tree | 403b286b6f609fa9cbd97af41357b7d0c26d63b2 /runtime/gc/heap_test.cc | |
| parent | b1e63900ab0637875adcb77eeb7ff5af532293a1 (diff) | |
Exercise Heap::PreZygoteFork() in a test.
Change-Id: If41c931ffdbb0310536799b4515557770f2cd4b9
Diffstat (limited to 'runtime/gc/heap_test.cc')
| -rw-r--r-- | runtime/gc/heap_test.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/gc/heap_test.cc b/runtime/gc/heap_test.cc index 73196b20a2..14d78d8710 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 |