summaryrefslogtreecommitdiff
path: root/deps/v8/testing/gtest
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/testing/gtest')
-rw-r--r--deps/v8/testing/gtest/BUILD.gn100
-rw-r--r--deps/v8/testing/gtest/OWNERS2
-rw-r--r--deps/v8/testing/gtest/empty.cc3
-rw-r--r--deps/v8/testing/gtest/include/DEPS3
-rw-r--r--deps/v8/testing/gtest/include/gtest/gtest-death-test.h10
-rw-r--r--deps/v8/testing/gtest/include/gtest/gtest-message.h10
-rw-r--r--deps/v8/testing/gtest/include/gtest/gtest-param-test.h10
-rw-r--r--deps/v8/testing/gtest/include/gtest/gtest-spi.h10
-rw-r--r--deps/v8/testing/gtest/include/gtest/gtest.h10
-rw-r--r--deps/v8/testing/gtest/include/gtest/gtest_prod.h64
10 files changed, 166 insertions, 56 deletions
diff --git a/deps/v8/testing/gtest/BUILD.gn b/deps/v8/testing/gtest/BUILD.gn
new file mode 100644
index 0000000000..fe7ba6d483
--- /dev/null
+++ b/deps/v8/testing/gtest/BUILD.gn
@@ -0,0 +1,100 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build_overrides/gtest.gni")
+if (is_ios) {
+ import("//build/config/coverage/coverage.gni")
+ import("//build/config/ios/ios_sdk.gni")
+ import("//build/buildflag_header.gni")
+}
+
+config("gtest_direct_config") {
+ visibility = [ ":*" ]
+ defines = [ "UNIT_TEST" ]
+}
+
+# The file/directory layout of Google Test is not yet considered stable. Until
+# it stabilizes, Chromium code MUST use this target instead of reaching directly
+# into //third_party/googletest.
+static_library("gtest") {
+ testonly = true
+
+ sources = [
+ "include/gtest/gtest-death-test.h",
+ "include/gtest/gtest-message.h",
+ "include/gtest/gtest-param-test.h",
+ "include/gtest/gtest-spi.h",
+ "include/gtest/gtest.h",
+ "include/gtest/gtest_prod.h",
+
+ # This is a workaround for the issues below.
+ #
+ # 1) This target needs to be a static_library (not a source set) on Mac to
+ # avoid the build errors in
+ # https://codereview.chromium.org/2779193002#msg82.
+ # 2) A static_library must have at least one source file, to avoid build
+ # errors on Mac and Windows. https://crbug.com/710334
+ # 3) A static_library with complete_static_lib = true, which would not
+ # require adding the empty file, will result in duplicate symbols on
+ # Android. https://codereview.chromium.org/2852613002/#ps20001
+ "empty.cc",
+ ]
+ public_deps = [
+ "//third_party/googletest:gtest",
+ ]
+
+ public_configs = [ ":gtest_direct_config" ]
+
+ if (gtest_include_multiprocess) {
+ sources += [
+ "../multiprocess_func_list.cc",
+ "../multiprocess_func_list.h",
+ ]
+ }
+
+ if (gtest_include_platform_test) {
+ sources += [ "../platform_test.h" ]
+ }
+
+ if ((is_mac || is_ios) && gtest_include_objc_support) {
+ if (is_ios) {
+ set_sources_assignment_filter([])
+ }
+ sources += [
+ "../gtest_mac.h",
+ "../gtest_mac.mm",
+ ]
+ if (gtest_include_platform_test) {
+ sources += [ "../platform_test_mac.mm" ]
+ }
+ set_sources_assignment_filter(sources_assignment_filter)
+ }
+
+ if (is_ios && gtest_include_ios_coverage) {
+ sources += [
+ "../coverage_util_ios.h",
+ "../coverage_util_ios.mm",
+ ]
+ deps = [
+ ":ios_enable_coverage",
+ ]
+ }
+}
+
+# The file/directory layout of Google Test is not yet considered stable. Until
+# it stabilizes, Chromium code MUST use this target instead of reaching directly
+# into //third_party/googletest.
+source_set("gtest_main") {
+ testonly = true
+ deps = [
+ "//third_party/googletest:gtest_main",
+ ]
+}
+
+if (is_ios) {
+ buildflag_header("ios_enable_coverage") {
+ header = "ios_enable_coverage.h"
+ flags = [ "IOS_ENABLE_COVERAGE=$use_clang_coverage" ]
+ }
+}
diff --git a/deps/v8/testing/gtest/OWNERS b/deps/v8/testing/gtest/OWNERS
new file mode 100644
index 0000000000..d5fa70ced5
--- /dev/null
+++ b/deps/v8/testing/gtest/OWNERS
@@ -0,0 +1,2 @@
+thakis@chromium.org
+pwnall@chromium.org
diff --git a/deps/v8/testing/gtest/empty.cc b/deps/v8/testing/gtest/empty.cc
new file mode 100644
index 0000000000..7487e66ecb
--- /dev/null
+++ b/deps/v8/testing/gtest/empty.cc
@@ -0,0 +1,3 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
diff --git a/deps/v8/testing/gtest/include/DEPS b/deps/v8/testing/gtest/include/DEPS
new file mode 100644
index 0000000000..e67416c517
--- /dev/null
+++ b/deps/v8/testing/gtest/include/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+ '+third_party/googletest/src/googletest/include/gtest',
+]
diff --git a/deps/v8/testing/gtest/include/gtest/gtest-death-test.h b/deps/v8/testing/gtest/include/gtest/gtest-death-test.h
new file mode 100644
index 0000000000..d2fead05b2
--- /dev/null
+++ b/deps/v8/testing/gtest/include/gtest/gtest-death-test.h
@@ -0,0 +1,10 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The file/directory layout of Google Test is not yet considered stable. Until
+// it stabilizes, Chromium code will use forwarding headers in testing/gtest
+// and testing/gmock, instead of directly including files in
+// third_party/googletest.
+
+#include "third_party/googletest/src/googletest/include/gtest/gtest-death-test.h"
diff --git a/deps/v8/testing/gtest/include/gtest/gtest-message.h b/deps/v8/testing/gtest/include/gtest/gtest-message.h
new file mode 100644
index 0000000000..4ec1e0ebec
--- /dev/null
+++ b/deps/v8/testing/gtest/include/gtest/gtest-message.h
@@ -0,0 +1,10 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The file/directory layout of Google Test is not yet considered stable. Until
+// it stabilizes, Chromium code will use forwarding headers in testing/gtest
+// and testing/gmock, instead of directly including files in
+// third_party/googletest.
+
+#include "third_party/googletest/src/googletest/include/gtest/gtest-message.h"
diff --git a/deps/v8/testing/gtest/include/gtest/gtest-param-test.h b/deps/v8/testing/gtest/include/gtest/gtest-param-test.h
new file mode 100644
index 0000000000..e85c2f3593
--- /dev/null
+++ b/deps/v8/testing/gtest/include/gtest/gtest-param-test.h
@@ -0,0 +1,10 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The file/directory layout of Google Test is not yet considered stable. Until
+// it stabilizes, Chromium code will use forwarding headers in testing/gtest
+// and testing/gmock, instead of directly including files in
+// third_party/googletest.
+
+#include "third_party/googletest/src/googletest/include/gtest/gtest-param-test.h"
diff --git a/deps/v8/testing/gtest/include/gtest/gtest-spi.h b/deps/v8/testing/gtest/include/gtest/gtest-spi.h
new file mode 100644
index 0000000000..87af65ccdd
--- /dev/null
+++ b/deps/v8/testing/gtest/include/gtest/gtest-spi.h
@@ -0,0 +1,10 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The file/directory layout of Google Test is not yet considered stable. Until
+// it stabilizes, Chromium code will use forwarding headers in testing/gtest
+// and testing/gmock, instead of directly including files in
+// third_party/googletest.
+
+#include "third_party/googletest/src/googletest/include/gtest/gtest-spi.h"
diff --git a/deps/v8/testing/gtest/include/gtest/gtest.h b/deps/v8/testing/gtest/include/gtest/gtest.h
new file mode 100644
index 0000000000..b026e3a6df
--- /dev/null
+++ b/deps/v8/testing/gtest/include/gtest/gtest.h
@@ -0,0 +1,10 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The file/directory layout of Google Test is not yet considered stable. Until
+// it stabilizes, Chromium code will use forwarding headers in testing/gtest
+// and testing/gmock, instead of directly including files in
+// third_party/googletest.
+
+#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
diff --git a/deps/v8/testing/gtest/include/gtest/gtest_prod.h b/deps/v8/testing/gtest/include/gtest/gtest_prod.h
index da80ddc6c7..b6f81aa76b 100644
--- a/deps/v8/testing/gtest/include/gtest/gtest_prod.h
+++ b/deps/v8/testing/gtest/include/gtest/gtest_prod.h
@@ -1,58 +1,10 @@
-// Copyright 2006, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-//
-// Google C++ Testing Framework definitions useful in production code.
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
-#ifndef GTEST_INCLUDE_GTEST_GTEST_PROD_H_
-#define GTEST_INCLUDE_GTEST_GTEST_PROD_H_
+// The file/directory layout of Google Test is not yet considered stable. Until
+// it stabilizes, Chromium code will use forwarding headers in testing/gtest
+// and testing/gmock, instead of directly including files in
+// third_party/googletest.
-// When you need to test the private or protected members of a class,
-// use the FRIEND_TEST macro to declare your tests as friends of the
-// class. For example:
-//
-// class MyClass {
-// private:
-// void MyMethod();
-// FRIEND_TEST(MyClassTest, MyMethod);
-// };
-//
-// class MyClassTest : public testing::Test {
-// // ...
-// };
-//
-// TEST_F(MyClassTest, MyMethod) {
-// // Can call MyClass::MyMethod() here.
-// }
-
-#define FRIEND_TEST(test_case_name, test_name)\
-friend class test_case_name##_##test_name##_Test
-
-#endif // GTEST_INCLUDE_GTEST_GTEST_PROD_H_
+#include "third_party/googletest/src/googletest/include/gtest/gtest_prod.h"