Fix number-string cache test case.
authorYang Guo <yangguo@chromium.org>
Thu, 15 Jan 2015 11:48:57 +0000 (12:48 +0100)
committerYang Guo <yangguo@chromium.org>
Thu, 15 Jan 2015 11:49:10 +0000 (11:49 +0000)
TBR=jochen@chromium.org

Review URL: https://codereview.chromium.org/843913008

Cr-Commit-Position: refs/heads/master@{#26073}

test/cctest/test-heap.cc

index 11aee2e..5a01e12 100644 (file)
@@ -36,6 +36,7 @@
 #include "src/global-handles.h"
 #include "src/ic/ic.h"
 #include "src/macro-assembler.h"
+#include "src/snapshot.h"
 #include "test/cctest/cctest.h"
 
 using namespace v8::internal;
@@ -5090,10 +5091,11 @@ TEST(Regress442710) {
 
 
 TEST(NumberStringCacheSize) {
+  if (!Snapshot::HaveASnapshotToStartFrom()) return;
+  // Test that the number-string cache has not been resized in the snapshot.
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   Heap* heap = isolate->heap();
-  // Test that the number-string cache has not been resized.
   CHECK_EQ(TestHeap::kInitialNumberStringCacheSize * 2,
            heap->number_string_cache()->length());
 }