Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: test/unittests/unittests.cc

Issue 439863004: Initial import of unittests using GTest/GMock. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix invalid EXPECT_EQ Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
+}

Powered by Google App Engine
This is Rietveld 408576698