Index: test/unittests/unittests.cc |
diff --git a/test/unittests/unittests.cc b/test/unittests/unittests.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9771935b34a0d42c09e1efd70f26cf8db6ecb466 |
--- /dev/null |
+++ b/test/unittests/unittests.cc |
@@ -0,0 +1,25 @@ |
+// Copyright 2014 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include <cstdlib> |
+#include <cstring> |
+#include <memory> |
+ |
+#include "include/libplatform/libplatform.h" |
+#include "include/v8.h" |
+#include "testing/gmock/include/gmock/gmock.h" |
+ |
+int main(int argc, char** argv) { |
+ testing::InitGoogleMock(&argc, argv); |
+ std::auto_ptr<v8::Platform> platform((v8::platform::CreateDefaultPlatform())); |
+ v8::V8::InitializePlatform(platform.get()); |
+ v8::V8::SetFlagsFromCommandLine(&argc, argv, true); |
+ int result = 127; |
+ if (v8::V8::Initialize()) { |
jochen (gone - plz use gerrit)
2014/08/05 07:36:19
consider doing less here as unit tests for base or
Benedikt Meurer
2014/08/05 08:01:53
Done.
|
+ result = RUN_ALL_TESTS(); |
+ v8::V8::Dispose(); |
+ } |
+ v8::V8::ShutdownPlatform(); |
+ return result; |
+} |