summaryrefslogtreecommitdiff
path: root/testing/gmock
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-22 05:19:14 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-22 05:19:14 +0000
commitc5514276094022c62373a8a908f72754366d15e8 (patch)
tree933bb996873663c41af2bc6e6a506b6e12c93c54 /testing/gmock
parent0ad1b2e3e8e0f3bb22c5b96a9cfc9a3d011a56df (diff)
downloadpdfium-c5514276094022c62373a8a908f72754366d15e8.tar.xz
Update gtest and gmock to 1.8.x.
This applies parts of https://crrev.com/469551 and https://crrev.com/471303 to PDFium. Change-Id: Ifbb8e4c300bd276fe3c6fe60d19ebb1618be8936 Reviewed-on: https://pdfium-review.googlesource.com/28791 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/gmock')
-rw-r--r--testing/gmock/BUILD.gn48
-rw-r--r--testing/gmock/include/gmock/DEPS3
-rw-r--r--testing/gmock/include/gmock/gmock-actions.h10
-rw-r--r--testing/gmock/include/gmock/gmock-generated-function-mockers.h10
-rw-r--r--testing/gmock/include/gmock/gmock-matchers.h10
-rw-r--r--testing/gmock/include/gmock/gmock.h10
6 files changed, 91 insertions, 0 deletions
diff --git a/testing/gmock/BUILD.gn b/testing/gmock/BUILD.gn
new file mode 100644
index 0000000000..a22d8929e6
--- /dev/null
+++ b/testing/gmock/BUILD.gn
@@ -0,0 +1,48 @@
+# Copyright 2018 The PDFium 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 MUST use this target instead of reaching directly
+# into //third_party/googletest.
+
+import("//build_overrides/build.gni")
+
+source_set("gmock") {
+ testonly = true
+ sources = [
+ "include/gmock/gmock-actions.h",
+ "include/gmock/gmock-generated-function-mockers.h",
+ "include/gmock/gmock-matchers.h",
+ "include/gmock/gmock.h",
+ ]
+ deps = [
+ "//third_party/googletest:gmock",
+ ]
+
+ # TODO(crbug.com/806952): Depending on gmock_mutant only if build_with_chromium,
+ # because gmock_mutant depends on //base which uses C++14. Since gmock is a
+ # third_party library used by other projects it should not include C++14 only code.
+ if (build_with_chromium) {
+ # Allow Chromium targets depending on gmock to #include testing/gmock_mutant.h
+ # without triggering a `gn check` error.
+ public_deps = [
+ "//testing:gmock_mutant",
+ ]
+ }
+
+ public_configs = [
+ "//third_party/googletest:gmock_config",
+ "//third_party/googletest:gtest_config",
+ ]
+}
+
+# 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("gmock_main") {
+ testonly = true
+ deps = [
+ "//third_party/googletest:gmock_main",
+ ]
+}
diff --git a/testing/gmock/include/gmock/DEPS b/testing/gmock/include/gmock/DEPS
new file mode 100644
index 0000000000..c817a8474e
--- /dev/null
+++ b/testing/gmock/include/gmock/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+ '+third_party/googletest/src/googlemock/include/gmock',
+]
diff --git a/testing/gmock/include/gmock/gmock-actions.h b/testing/gmock/include/gmock/gmock-actions.h
new file mode 100644
index 0000000000..fb193e5dd9
--- /dev/null
+++ b/testing/gmock/include/gmock/gmock-actions.h
@@ -0,0 +1,10 @@
+// Copyright 2018 The PDFium 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/googlemock/include/gmock/gmock-actions.h"
diff --git a/testing/gmock/include/gmock/gmock-generated-function-mockers.h b/testing/gmock/include/gmock/gmock-generated-function-mockers.h
new file mode 100644
index 0000000000..57cbc0a044
--- /dev/null
+++ b/testing/gmock/include/gmock/gmock-generated-function-mockers.h
@@ -0,0 +1,10 @@
+// Copyright 2018 The PDFium 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/googlemock/include/gmock/gmock-generated-function-mockers.h"
diff --git a/testing/gmock/include/gmock/gmock-matchers.h b/testing/gmock/include/gmock/gmock-matchers.h
new file mode 100644
index 0000000000..25d25e9080
--- /dev/null
+++ b/testing/gmock/include/gmock/gmock-matchers.h
@@ -0,0 +1,10 @@
+// Copyright 2018 The PDFium 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/googlemock/include/gmock/gmock-matchers.h"
diff --git a/testing/gmock/include/gmock/gmock.h b/testing/gmock/include/gmock/gmock.h
new file mode 100644
index 0000000000..a344bcbf55
--- /dev/null
+++ b/testing/gmock/include/gmock/gmock.h
@@ -0,0 +1,10 @@
+// Copyright 2018 The PDFium 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/googlemock/include/gmock/gmock.h"