blob: e8c66e2aa2c9b26c1b0283a4f1c049605e2a888e [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 friend bool operator==(const user6::label& lhs, const user6::label& rhs) {
15 return lhs.i == rhs.i;
16 }
17};
18} // namespace user6
19
20namespace user7 {
21struct label
22{
23 label()
24 : i(0) {}
25 int i;
26 friend bool operator==(const user7::label& lhs, const user7::label& rhs) {
27 return lhs.i == rhs.i;
28 }
29};
30} // namespace user7
31
32TEST_CASE("namespace 6 friend vs friend") {
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}