blob: 078e62359c4665bdc25632f663f4f4b769aad56e [file] [log] [blame]
Navin P318e1df2021-03-21 19:15:46 +05301#include <doctest/doctest.h>
2
3DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN
4#include <cstdint>
5#include <sstream>
6DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END
7
8namespace user9a {
9struct label
10{
11 label()
12 : i(0) {}
13 int i;
14};
15} // namespace user9a
16
17DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-declarations")
18DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-prototypes")
19bool operator==(const user9a::label& lhs, const user9a::label& rhs) { return lhs.i == rhs.i; }
20
21namespace user9b {
22struct label
23{
24 label()
25 : i(0) {}
26 int i;
27};
28} // namespace user9b
29
30DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-declarations")
31DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-prototypes")
32
33bool operator==(const user9b::label& lhs, const user9b::label& rhs) { return lhs.i == rhs.i; }
34
35TEST_CASE("namespace 9 both global") {
36 user9a::label a1;
37 user9a::label a2;
38
39 user9b::label b1;
40 user9b::label b2;
41
42 REQUIRE(a1 == a2);
43 REQUIRE(b1 == b2);
44}