Navin P | 318e1df | 2021-03-21 19:15:46 +0530 | [diff] [blame] | 1 | #include <doctest/doctest.h> |
| 2 | |
| 3 | DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN |
| 4 | #include <cstdint> |
| 5 | #include <sstream> |
| 6 | DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END |
| 7 | |
| 8 | namespace user4 { |
| 9 | struct label |
| 10 | { |
| 11 | label() |
| 12 | : i(0) {} |
| 13 | int i; |
| 14 | bool operator==(const user4::label& rhs) const { return i == rhs.i; } |
| 15 | }; |
| 16 | } // namespace user4 |
| 17 | |
| 18 | namespace user5 { |
| 19 | struct label |
| 20 | { |
| 21 | label() |
| 22 | : i(0) {} |
| 23 | int i; |
| 24 | bool operator==(const user5::label& rhs) const { return i == rhs.i; } |
| 25 | }; |
| 26 | } // namespace user5 |
| 27 | |
| 28 | TEST_CASE("namespace 4 member vs member") { |
| 29 | user4::label a4; |
| 30 | user4::label b4; |
| 31 | |
| 32 | user5::label a5; |
| 33 | user5::label b5; |
| 34 | |
| 35 | REQUIRE(a4 == b4); |
| 36 | REQUIRE(a5 == b5); |
| 37 | } |