Skip to content

Commit

Permalink
Skip test in old g++ which fails due to non-compliant Copy-On-Write
Browse files Browse the repository at this point in the history
std::string implementation. Failure of this test doesn't indicate a
problem with Madara, anway, and is primarily meant as demonstration.
  • Loading branch information
dskyle-shieldai committed Jun 22, 2018
1 parent 717e8ae commit c41a408
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_shared_record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ void test_unshared_record (void)
std::string str_out = rec.to_string();

TEST_NE(orig_ptr, str_out.c_str());

#if defined(__GNUC__) && (__GNUC__ < 5)
std::cout << "This test ignored in old versions of g++ with COW strings\n";
#else
if (orig_ptr == str_out.c_str ())
++num_fails;
#endif

std::cerr << "test_unshared_record: num_fails: " << num_fails << "\n";
}
Expand Down

0 comments on commit c41a408

Please sign in to comment.