From: Morgan Deters Date: Wed, 20 Apr 2011 08:07:07 +0000 (+0000) Subject: incorrect usage of C++ std::string caused a test to fail X-Git-Tag: cvc5-1.0.0~8584 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a98094e8eee680d4f489e901107dfc484a1679f;p=cvc5.git incorrect usage of C++ std::string caused a test to fail --- diff --git a/test/unit/util/assert_white.h b/test/unit/util/assert_white.h index 75006ed12..6a8438136 100644 --- a/test/unit/util/assert_white.h +++ b/test/unit/util/assert_white.h @@ -60,7 +60,8 @@ public: // we don't want to match on the entire string, because it may // have an absolute path to the unit test binary, line number // info, etc. - const char* theString = e.toString().c_str(); + std::string s = e.toString(); + const char* theString = s.c_str(); const char* firstPart = "Assertion failure\nvoid AssertWhite::testReallyLongAssert()\n"; string lastPartStr = "\n\n false\n" + msg; @@ -84,7 +85,8 @@ public: // we don't want to match on the entire string, because it may // have an absolute path to the unit test binary, line number // info, etc. - const char* theString = e.toString().c_str(); + std::string s = e.toString(); + const char* theString = s.c_str(); const char* firstPart = "Assertion failure\nvoid AssertWhite::testReallyLongAssert()\n"; string lastPartStr = "\n\n false\n" + string(200, 'x') + " " +