doctest

FORK: The fastest feature-rich C++11/14/17/20 single-header testing framework
git clone https://git.neptards.moe/neptards/doctest.git
Log | Files | Refs | README

namespace3.cpp (469B)


      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 user3 {
      9 struct label
     10 {
     11     label()
     12             : i(0) {}
     13     int  i;
     14     bool operator==(const user3::label& rhs) const { return i == rhs.i; }
     15 };
     16 } // namespace user3
     17 
     18 TEST_CASE("namespace 3 member operator") {
     19     user3::label a;
     20     user3::label b;
     21     REQUIRE(a == b);
     22 }