diff options
Diffstat (limited to 'deps/v8/test/cctest/cctest.cc')
-rw-r--r-- | deps/v8/test/cctest/cctest.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/deps/v8/test/cctest/cctest.cc b/deps/v8/test/cctest/cctest.cc index a2caf0f3ba..616c6a3a6b 100644 --- a/deps/v8/test/cctest/cctest.cc +++ b/deps/v8/test/cctest/cctest.cc @@ -100,16 +100,22 @@ v8::Isolate* CcTest::default_isolate_; class CcTestArrayBufferAllocator : public v8::ArrayBuffer::Allocator { virtual void* Allocate(size_t length) { return malloc(length); } + virtual void* AllocateUninitialized(size_t length) { return malloc(length); } virtual void Free(void* data, size_t length) { free(data); } // TODO(dslomov): Remove when v8:2823 is fixed. virtual void Free(void* data) { UNREACHABLE(); } }; +static void SuggestTestHarness(int tests) { + if (tests == 0) return; + printf("Running multiple tests in sequence is deprecated and may cause " + "bogus failure. Consider using tools/run-tests.py instead.\n"); +} + + int main(int argc, char* argv[]) { v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true); - v8::internal::FLAG_harmony_array_buffer = true; - v8::internal::FLAG_harmony_typed_arrays = true; CcTestArrayBufferAllocator array_buffer_allocator; v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); @@ -138,8 +144,8 @@ int main(int argc, char* argv[]) { if (test->enabled() && strcmp(test->file(), file) == 0 && strcmp(test->name(), name) == 0) { + SuggestTestHarness(tests_run++); test->Run(); - tests_run++; } test = test->prev(); } @@ -152,8 +158,8 @@ int main(int argc, char* argv[]) { if (test->enabled() && (strcmp(test->file(), file_or_name) == 0 || strcmp(test->name(), file_or_name) == 0)) { + SuggestTestHarness(tests_run++); test->Run(); - tests_run++; } test = test->prev(); } |