proxygen
PropagateConstTest.cpp File Reference
#include <folly/lang/PropagateConst.h>
#include <memory>
#include <folly/portability/GTest.h>

Go to the source code of this file.

Classes

class  PropagateConstTest
 

Typedefs

template<typename T >
using pc = propagate_const< T >
 

Functions

template<typename T >
static bool is_const (T &&)
 
 TEST_F (PropagateConstTest, construct_assign)
 
 TEST_F (PropagateConstTest, op_assign_move)
 
 TEST_F (PropagateConstTest, get)
 
 TEST_F (PropagateConstTest, op_indirect)
 
 TEST_F (PropagateConstTest, op_element_type_ptr)
 
 TEST_F (PropagateConstTest, op_bool)
 
 TEST_F (PropagateConstTest, get_underlying)
 
 TEST_F (PropagateConstTest, swap)
 
 TEST_F (PropagateConstTest, op_equal_to)
 
 TEST_F (PropagateConstTest, op_not_equal_to)
 
 TEST_F (PropagateConstTest, op_less)
 
 TEST_F (PropagateConstTest, op_greater)
 
 TEST_F (PropagateConstTest, op_less_equal)
 
 TEST_F (PropagateConstTest, op_greater_equal)
 
 TEST_F (PropagateConstTest, hash)
 
 TEST_F (PropagateConstTest, equal_to)
 
 TEST_F (PropagateConstTest, not_equal_to)
 
 TEST_F (PropagateConstTest, less)
 
 TEST_F (PropagateConstTest, greater)
 
 TEST_F (PropagateConstTest, less_equal)
 
 TEST_F (PropagateConstTest, greater_equal)
 

Typedef Documentation

template<typename T >
using pc = propagate_const<T>

Definition at line 38 of file PropagateConstTest.cpp.

Function Documentation

template<typename T >
static bool is_const ( T &&  )
static

Definition at line 33 of file PropagateConstTest.cpp.

References folly::value().

Referenced by TEST_F().

33  {
34  return std::is_const<_t<std::remove_reference<T>>>::value;
35 }
static const char *const value
Definition: Conv.cpp:50
TEST_F ( PropagateConstTest  ,
construct_assign   
)

Definition at line 40 of file PropagateConstTest.cpp.

References EXPECT_FALSE, EXPECT_TRUE, and folly::value().

40  {
41  struct Source {
42  int& operator*();
43  int* get();
44  };
45  struct Implicit {
46  int& operator*();
47  int* get();
48  /* implicit */ Implicit(Source) {}
49  };
50  struct Explicit {
51  int& operator*();
52  int* get();
53  explicit Explicit(Source) {}
54  };
55 
56  EXPECT_TRUE((std::is_constructible<pc<Implicit>, Source>::value));
57  EXPECT_TRUE((std::is_constructible<pc<Explicit>, Source>::value));
58  EXPECT_TRUE((std::is_convertible<Source, pc<Implicit>>::value));
59  EXPECT_FALSE((std::is_convertible<Source, pc<Explicit>>::value));
60  EXPECT_TRUE((std::is_assignable<pc<Implicit>, Source>::value));
61  EXPECT_FALSE((std::is_assignable<pc<Explicit>, Source>::value));
62 
63  EXPECT_TRUE((std::is_constructible<pc<Implicit>, pc<Source>>::value));
64  EXPECT_TRUE((std::is_constructible<pc<Explicit>, pc<Source>>::value));
65  EXPECT_TRUE((std::is_convertible<pc<Source>, pc<Implicit>>::value));
66  EXPECT_FALSE((std::is_convertible<pc<Source>, pc<Explicit>>::value));
67  EXPECT_TRUE((std::is_assignable<pc<Implicit>, pc<Source>>::value));
68  EXPECT_FALSE((std::is_assignable<pc<Explicit>, pc<Source>>::value));
69 }
static const char *const value
Definition: Conv.cpp:50
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
TEST_F ( PropagateConstTest  ,
op_assign_move   
)

Definition at line 71 of file PropagateConstTest.cpp.

References EXPECT_EQ, and ptr.

71  {
72  auto ptr = pc<std::unique_ptr<int>>{std::make_unique<int>(1)};
73  EXPECT_EQ(*ptr, 1);
74 
75  ptr = std::make_unique<int>(2);
76  EXPECT_EQ(*ptr, 2);
77 }
void * ptr
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
TEST_F ( PropagateConstTest  ,
get   
)

Definition at line 79 of file PropagateConstTest.cpp.

References a, folly::as_const(), folly::data(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, and is_const().

79  {
80  int data[1] = {3};
81  auto a = data + 0;
82  auto pc_a = pc<int*>(a);
83 
84  EXPECT_EQ(a, pc_a.get());
85  EXPECT_EQ(a, as_const(pc_a).get());
86  EXPECT_FALSE(is_const(*pc_a.get()));
87  EXPECT_TRUE(is_const(*as_const(pc_a).get()));
88 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
PUSHMI_INLINE_VAR constexpr struct folly::pushmi::detail::as_const_fn as_const
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
static bool is_const(T &&)
TEST_F ( PropagateConstTest  ,
op_indirect   
)

Definition at line 90 of file PropagateConstTest.cpp.

References a, folly::as_const(), folly::data(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, and is_const().

90  {
91  int data[1] = {3};
92  auto a = data + 0;
93  auto pc_a = pc<int*>(a);
94 
95  EXPECT_EQ(a, &*pc_a);
96  EXPECT_EQ(a, &*as_const(pc_a));
97  EXPECT_FALSE(is_const(*pc_a));
98  EXPECT_TRUE(is_const(*as_const(pc_a)));
99 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
PUSHMI_INLINE_VAR constexpr struct folly::pushmi::detail::as_const_fn as_const
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
static bool is_const(T &&)
TEST_F ( PropagateConstTest  ,
op_element_type_ptr   
)

Definition at line 101 of file PropagateConstTest.cpp.

References a, folly::as_const(), folly::data(), and EXPECT_EQ.

101  {
102  int data[1] = {3};
103  auto a = data + 0;
104  auto pc_a = pc<int*>(a);
105 
106  EXPECT_EQ(a, static_cast<int*>(pc_a));
107  EXPECT_EQ(a, static_cast<int const*>(as_const(pc_a)));
108 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
char a
PUSHMI_INLINE_VAR constexpr struct folly::pushmi::detail::as_const_fn as_const
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
op_bool   
)

Definition at line 110 of file PropagateConstTest.cpp.

References a, folly::data(), EXPECT_FALSE, and EXPECT_TRUE.

110  {
111  int data[1] = {3};
112  auto a = data + 0;
113  auto pc_a = pc<int*>(a);
114  auto pc_0 = pc<int*>(nullptr);
115 
116  EXPECT_TRUE(pc_a);
117  EXPECT_FALSE(pc_0);
118 }
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
get_underlying   
)

Definition at line 120 of file PropagateConstTest.cpp.

References a, folly::as_const(), folly::data(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::get_underlying(), and is_const().

120  {
121  int data[1] = {3};
122  auto a = data + 0;
123  auto pc_a = pc<int*>(a);
124 
125  EXPECT_EQ(a, get_underlying(pc_a));
130 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
constexpr Pointer & get_underlying(propagate_const< Pointer > &obj)
PUSHMI_INLINE_VAR constexpr struct folly::pushmi::detail::as_const_fn as_const
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
static bool is_const(T &&)
TEST_F ( PropagateConstTest  ,
swap   
)

Definition at line 132 of file PropagateConstTest.cpp.

References a, b, folly::data(), EXPECT_EQ, and folly::swap().

132  {
133  int data[2] = {3, 4};
134  auto a = data + 0;
135  auto b = data + 1;
136  auto pc_a = pc<int*>(a);
137  auto pc_b = pc<int*>(b);
138 
139  swap(pc_a, pc_b);
140  EXPECT_EQ(3, *pc_b);
141  EXPECT_EQ(4, *pc_a);
142 
143  swap(pc_a, pc_b);
144  EXPECT_EQ(3, *pc_a);
145  EXPECT_EQ(4, *pc_b);
146 }
char b
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
char a
void swap(SwapTrackingAlloc< T > &, SwapTrackingAlloc< T > &)
Definition: F14TestUtil.h:414
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
op_equal_to   
)

Definition at line 148 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, EXPECT_TRUE, and x.

148  {
149  int data[2] = {3, 4};
150  auto a = data + 0;
151  auto b = data + 1;
152  auto pc_a = pc<int*>(a);
153  auto pc_b = pc<int*>(b);
154 
155  auto _ = [](auto&& x, auto&& y) { return x == y; };
156  EXPECT_TRUE(_(pc_a, pc_a));
157  EXPECT_FALSE(_(pc_a, pc_b));
158  EXPECT_FALSE(_(pc_a, nullptr));
159  EXPECT_TRUE(_(pc_a, a));
160  EXPECT_FALSE(_(pc_a, b));
161  EXPECT_TRUE(_(a, pc_a));
162  EXPECT_FALSE(_(b, pc_a));
163 }
Definition: InvokeTest.cpp:58
char b
const int x
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
Definition: InvokeTest.cpp:65
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
op_not_equal_to   
)

Definition at line 165 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, EXPECT_TRUE, and x.

165  {
166  int data[2] = {3, 4};
167  auto a = data + 0;
168  auto b = data + 1;
169  auto pc_a = pc<int*>(a);
170  auto pc_b = pc<int*>(b);
171 
172  auto _ = [](auto&& x, auto&& y) { return x != y; };
173  EXPECT_FALSE(_(pc_a, pc_a));
174  EXPECT_TRUE(_(pc_a, pc_b));
175  EXPECT_TRUE(_(pc_a, nullptr));
176  EXPECT_FALSE(_(pc_a, a));
177  EXPECT_TRUE(_(pc_a, b));
178  EXPECT_FALSE(_(a, pc_a));
179  EXPECT_TRUE(_(b, pc_a));
180 }
Definition: InvokeTest.cpp:58
char b
const int x
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
Definition: InvokeTest.cpp:65
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
op_less   
)

Definition at line 182 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, EXPECT_TRUE, and x.

182  {
183  int data[2] = {3, 4};
184  auto a = data + 0;
185  auto b = data + 1;
186  auto pc_a = pc<int*>(a);
187  auto pc_b = pc<int*>(b);
188 
189  auto _ = [](auto&& x, auto&& y) { return x < y; };
190  EXPECT_FALSE(_(pc_a, pc_a));
191  EXPECT_FALSE(_(pc_a, a));
192  EXPECT_FALSE(_(a, pc_a));
193  EXPECT_TRUE(_(pc_a, pc_b));
194  EXPECT_TRUE(_(pc_a, b));
195  EXPECT_TRUE(_(a, pc_b));
196  EXPECT_FALSE(_(pc_b, pc_a));
197  EXPECT_FALSE(_(pc_b, a));
198  EXPECT_FALSE(_(b, pc_a));
199  EXPECT_FALSE(_(pc_b, pc_b));
200  EXPECT_FALSE(_(pc_b, b));
201  EXPECT_FALSE(_(b, pc_b));
202 }
Definition: InvokeTest.cpp:58
char b
const int x
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
Definition: InvokeTest.cpp:65
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
op_greater   
)

Definition at line 204 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, EXPECT_TRUE, and x.

204  {
205  int data[2] = {3, 4};
206  auto a = data + 0;
207  auto b = data + 1;
208  auto pc_a = pc<int*>(a);
209  auto pc_b = pc<int*>(b);
210 
211  auto _ = [](auto&& x, auto&& y) { return x > y; };
212  EXPECT_FALSE(_(pc_a, pc_a));
213  EXPECT_FALSE(_(pc_a, a));
214  EXPECT_FALSE(_(a, pc_a));
215  EXPECT_FALSE(_(pc_a, pc_b));
216  EXPECT_FALSE(_(pc_a, b));
217  EXPECT_FALSE(_(a, pc_b));
218  EXPECT_TRUE(_(pc_b, pc_a));
219  EXPECT_TRUE(_(pc_b, a));
220  EXPECT_TRUE(_(b, pc_a));
221  EXPECT_FALSE(_(pc_b, pc_b));
222  EXPECT_FALSE(_(pc_b, b));
223  EXPECT_FALSE(_(b, pc_b));
224 }
Definition: InvokeTest.cpp:58
char b
const int x
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
Definition: InvokeTest.cpp:65
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
op_less_equal   
)

Definition at line 226 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, EXPECT_TRUE, and x.

226  {
227  int data[2] = {3, 4};
228  auto a = data + 0;
229  auto b = data + 1;
230  auto pc_a = pc<int*>(a);
231  auto pc_b = pc<int*>(b);
232 
233  auto _ = [](auto&& x, auto&& y) { return x <= y; };
234  EXPECT_TRUE(_(pc_a, pc_a));
235  EXPECT_TRUE(_(pc_a, a));
236  EXPECT_TRUE(_(a, pc_a));
237  EXPECT_TRUE(_(pc_a, pc_b));
238  EXPECT_TRUE(_(pc_a, b));
239  EXPECT_TRUE(_(a, pc_b));
240  EXPECT_FALSE(_(pc_b, pc_a));
241  EXPECT_FALSE(_(pc_b, a));
242  EXPECT_FALSE(_(b, pc_a));
243  EXPECT_TRUE(_(pc_b, pc_b));
244  EXPECT_TRUE(_(pc_b, b));
245  EXPECT_TRUE(_(b, pc_b));
246 }
Definition: InvokeTest.cpp:58
char b
const int x
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
Definition: InvokeTest.cpp:65
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
op_greater_equal   
)

Definition at line 248 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, EXPECT_TRUE, and x.

248  {
249  int data[2] = {3, 4};
250  auto a = data + 0;
251  auto b = data + 1;
252  auto pc_a = pc<int*>(a);
253  auto pc_b = pc<int*>(b);
254 
255  auto _ = [](auto&& x, auto&& y) { return x >= y; };
256  EXPECT_TRUE(_(pc_a, pc_a));
257  EXPECT_TRUE(_(pc_a, a));
258  EXPECT_TRUE(_(a, pc_a));
259  EXPECT_FALSE(_(pc_a, pc_b));
260  EXPECT_FALSE(_(pc_a, b));
261  EXPECT_FALSE(_(a, pc_b));
262  EXPECT_TRUE(_(pc_b, pc_a));
263  EXPECT_TRUE(_(pc_b, a));
264  EXPECT_TRUE(_(b, pc_a));
265  EXPECT_TRUE(_(pc_b, pc_b));
266  EXPECT_TRUE(_(pc_b, b));
267  EXPECT_TRUE(_(b, pc_b));
268 }
Definition: InvokeTest.cpp:58
char b
const int x
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
Definition: InvokeTest.cpp:65
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
hash   
)

Definition at line 270 of file PropagateConstTest.cpp.

References a, folly::data(), and EXPECT_EQ.

270  {
271  int data[1] = {3};
272  auto a = data + 0;
273  auto pc_a = pc<int*>(a);
274 
275  EXPECT_EQ(std::hash<int*>()(a), std::hash<pc<int*>>()(pc_a));
276 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
char a
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
equal_to   
)

Definition at line 278 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, and EXPECT_TRUE.

278  {
279  int data[2] = {3, 4};
280  auto a = data + 0;
281  auto b = data + 1;
282  auto pc_a = pc<int*>(a);
283  auto pc_b = pc<int*>(b);
284 
285  auto _ = std::equal_to<pc<int*>>{};
286  EXPECT_TRUE(_(pc_a, pc_a));
287  EXPECT_FALSE(_(pc_a, pc_b));
288 }
char b
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
not_equal_to   
)

Definition at line 290 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, and EXPECT_TRUE.

290  {
291  int data[2] = {3, 4};
292  auto a = data + 0;
293  auto b = data + 1;
294  auto pc_a = pc<int*>(a);
295  auto pc_b = pc<int*>(b);
296 
297  auto _ = std::not_equal_to<pc<int*>>{};
298  EXPECT_FALSE(_(pc_a, pc_a));
299  EXPECT_TRUE(_(pc_a, pc_b));
300 }
char b
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
less   
)

Definition at line 302 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, and EXPECT_TRUE.

302  {
303  int data[2] = {3, 4};
304  auto a = data + 0;
305  auto b = data + 1;
306  auto pc_a = pc<int*>(a);
307  auto pc_b = pc<int*>(b);
308 
309  auto _ = std::less<pc<int*>>{};
310  EXPECT_FALSE(_(pc_a, pc_a));
311  EXPECT_TRUE(_(pc_a, pc_b));
312  EXPECT_FALSE(_(pc_b, pc_a));
313  EXPECT_FALSE(_(pc_b, pc_b));
314 }
char b
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
greater   
)

Definition at line 316 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, and EXPECT_TRUE.

316  {
317  int data[2] = {3, 4};
318  auto a = data + 0;
319  auto b = data + 1;
320  auto pc_a = pc<int*>(a);
321  auto pc_b = pc<int*>(b);
322 
323  auto _ = std::greater<pc<int*>>{};
324  EXPECT_FALSE(_(pc_a, pc_a));
325  EXPECT_FALSE(_(pc_a, pc_b));
326  EXPECT_TRUE(_(pc_b, pc_a));
327  EXPECT_FALSE(_(pc_b, pc_b));
328 }
char b
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
less_equal   
)

Definition at line 330 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, and EXPECT_TRUE.

330  {
331  int data[2] = {3, 4};
332  auto a = data + 0;
333  auto b = data + 1;
334  auto pc_a = pc<int*>(a);
335  auto pc_b = pc<int*>(b);
336 
337  auto _ = std::less_equal<pc<int*>>{};
338  EXPECT_TRUE(_(pc_a, pc_a));
339  EXPECT_TRUE(_(pc_a, pc_b));
340  EXPECT_FALSE(_(pc_b, pc_a));
341  EXPECT_TRUE(_(pc_b, pc_b));
342 }
char b
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43
TEST_F ( PropagateConstTest  ,
greater_equal   
)

Definition at line 344 of file PropagateConstTest.cpp.

References testing::_, a, b, folly::data(), EXPECT_FALSE, and EXPECT_TRUE.

344  {
345  int data[2] = {3, 4};
346  auto a = data + 0;
347  auto b = data + 1;
348  auto pc_a = pc<int*>(a);
349  auto pc_b = pc<int*>(b);
350 
351  auto _ = std::greater_equal<pc<int*>>{};
352  EXPECT_TRUE(_(pc_a, pc_a));
353  EXPECT_FALSE(_(pc_a, pc_b));
354  EXPECT_TRUE(_(pc_b, pc_a));
355  EXPECT_TRUE(_(pc_b, pc_b));
356 }
char b
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
const internal::AnythingMatcher _
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43