blob: c2c273226a750abde629722e17392592df367360 [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 user6 {
9struct label
10{
11 label()
12 : i(0) {}
13 int i;
14 bool operator==(const user6::label& rhs) const { return i == rhs.i; }
15};
16} // namespace user6
17
18namespace user7 {
19struct label
20{
21 label()
22 : i(0) {}
23 int i;
24};
25} // namespace user7
26
27DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-declarations")
28DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-prototypes")
29
30bool operator==(const user7::label& lhs, const user7::label& rhs) { return lhs.i == rhs.i; }
31
32TEST_CASE("namespace 7 member vs global") {
33 user6::label a6;
34 user6::label b6;
35
36 user7::label a7;
37 user7::label b7;
38
39 REQUIRE(a6 == b6);
40 REQUIRE(a7 == b7);
41}