Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Jun 24, 2024
1 parent f268d0d commit f123f8e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/SDF_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ TEST(SDF, ErrorOutput)

// Test findFile
EXPECT_EQ(sdf::findFile(errors, "adfjialkas31", false, true), "");
EXPECT_EQ(errors.size(), 1);
EXPECT_EQ(errors.size(), 1) << errors;
EXPECT_NE(std::string::npos,
errors[0].Message().find("Tried to use callback in sdf::findFile(), "
"but the callback is empty. Did you call "
Expand All @@ -771,10 +771,13 @@ TEST(SDF, ErrorOutput)

sdf::SDF sdf;
sdf.SetFromString(errors, "banana");
EXPECT_EQ(errors.size(), 1);
EXPECT_EQ(errors.size(), 2) << errors;
EXPECT_NE(std::string::npos,
errors[0].Message().find("Unable to parse sdf string[banana]"))
errors[0].Message().find("Error parsing XML from string"))
<< errors[0].Message();
EXPECT_NE(std::string::npos,
errors[1].Message().find("Unable to parse sdf string[banana]"))
<< errors[1].Message();
// Check nothing has been printed
EXPECT_TRUE(buffer.str().empty()) << buffer.str();
}
Expand Down

0 comments on commit f123f8e

Please sign in to comment.