Skip to content

Commit

Permalink
Add debug output on failing assertions
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <michael@openrobotics.org>
  • Loading branch information
mjcarroll committed Feb 9, 2022
1 parent 354a04a commit 6138199
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/TempDirectory_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ TEST(TempDirectory, createTempDirectoryEmptyBase)
{
// OS TMPDIR should never be empty
auto tmpDir = ignition::common::tempDirectoryPath();
ASSERT_FALSE(tmpDir.empty());
ASSERT_FALSE(tmpDir.empty()) << tmpDir;

// Create with an empty basename (eg /tmp/XXXXXX)
auto tmp = ignition::common::createTempDirectory("", tmpDir);
ASSERT_FALSE(tmp.empty());
EXPECT_EQ(std::string::npos, tmp.find("foo"));
EXPECT_NE(std::string::npos, tmp.find(tmpDir));
ASSERT_FALSE(tmp.empty()) << tmp;
EXPECT_EQ(std::string::npos, tmp.find("foo")) << tmp;
EXPECT_NE(std::string::npos, tmp.find(tmpDir)) << tmp;
}

/////////////////////////////////////////////////
Expand Down

0 comments on commit 6138199

Please sign in to comment.