aboutsummaryrefslogtreecommitdiffstats
path: root/community/wlcs/0001-Fix-build-when-using-GTest-1.11.patch
blob: c5fd4db78b8b402f2b0253d17ff900701291845f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From f6ff93f7b7db154b7899f415ec67677e6ddd7ff5 Mon Sep 17 00:00:00 2001
From: Victor Berger <victor.berger@m4x.org>
Date: Thu, 8 Jul 2021 19:39:30 +0200
Subject: [PATCH] Fix build when using GTest-1.11

Some change in GTest 1.11 headers caused a conflict on the name
`Pointer`. Removing the unconditional import of namespace `testing`
in favor of individual imports of the used items fixes it.

cc #205
---
 tests/pointer_constraints.cpp | 6 +++++-
 tests/relative_pointer.cpp    | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/pointer_constraints.cpp b/tests/pointer_constraints.cpp
index d306710..6ee856f 100644
--- a/tests/pointer_constraints.cpp
+++ b/tests/pointer_constraints.cpp
@@ -24,7 +24,11 @@
 
 #include <memory>
 
-using namespace testing;
+using testing::AnyNumber;
+using testing::Eq;
+using testing::Ne;
+using testing::NotNull;
+
 using namespace wlcs;
 
 namespace
diff --git a/tests/relative_pointer.cpp b/tests/relative_pointer.cpp
index c33316c..c5c5358 100644
--- a/tests/relative_pointer.cpp
+++ b/tests/relative_pointer.cpp
@@ -22,7 +22,11 @@
 
 #include <gmock/gmock.h>
 
-using namespace testing;
+using testing::AnyNumber;
+using testing::IsTrue;
+using testing::NotNull;
+using testing::_;
+
 using namespace wlcs;
 
 namespace
-- 
2.32.0