Skip to content

Commit

Permalink
Change tests to output generated string first
Browse files Browse the repository at this point in the history
  • Loading branch information
cscjlan committed Aug 30, 2024
1 parent c5f58e7 commit 78c8762
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions tests/mpi_tests/grid_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ TEST(FsGridTest, compareConstructedFsGridDisplayStringToReference1) {

const auto str = makeTestStringFromGrid(grid);
if (rank == 0) {
ASSERT_EQ(0, refStr.compare(str)) << "Reference string\n"
<< refStr << "\nand generated string\n"
<< str << "are not equal";
ASSERT_EQ(0, refStr.compare(str)) << "Generated string\n"
<< str << "\nand ref string\n"
<< refStr << "are not equal";
} else {
ASSERT_EQ(0, refStr.compare(str));
}
Expand All @@ -87,9 +87,9 @@ TEST(FsGridTest, compareConstructedFsGridDisplayStringToReference2) {

const auto str = makeTestStringFromGrid(grid);
if (rank == 0) {
ASSERT_EQ(0, refStr.compare(str)) << "Reference string\n"
<< refStr << "\nand generated string\n"
<< str << "are not equal";
ASSERT_EQ(0, refStr.compare(str)) << "Generated string\n"
<< str << "\nand ref string\n"
<< refStr << "are not equal";
} else {
ASSERT_EQ(0, refStr.compare(str));
}
Expand All @@ -108,9 +108,9 @@ TEST(FsGridTest, compareConstructedFsGridDisplayStringToReference3) {

const auto str = makeTestStringFromGrid(grid);
if (rank == 0) {
ASSERT_EQ(0, refStr.compare(str)) << "Reference string\n"
<< refStr << "\nand generated string\n"
<< str << "are not equal";
ASSERT_EQ(0, refStr.compare(str)) << "Generated string\n"
<< str << "\nand ref string\n"
<< refStr << "are not equal";
} else {
ASSERT_EQ(0, refStr.compare(str));
}
Expand All @@ -126,9 +126,9 @@ TEST(FsGridTest, compareConstructedFsGridDisplayStringToReference4) {

const auto str = makeTestStringFromGrid(grid);
if (rank == 0) {
ASSERT_EQ(0, refStr.compare(str)) << "Reference string\n"
<< refStr << "\nand generated string\n"
<< str << "are not equal";
ASSERT_EQ(0, refStr.compare(str)) << "Generated string\n"
<< str << "\nand ref string\n"
<< refStr << "are not equal";
} else {
ASSERT_EQ(0, refStr.compare(str));
}
Expand All @@ -144,9 +144,9 @@ TEST(FsGridTest, compareConstructedFsGridDisplayStringToReference5) {

const auto str = makeTestStringFromGrid(grid);
if (rank == 0) {
ASSERT_EQ(0, refStr.compare(str)) << "Reference string\n"
<< refStr << "\nand generated string\n"
<< str << "are not equal";
ASSERT_EQ(0, refStr.compare(str)) << "Generated string\n"
<< str << "\nand ref string\n"
<< refStr << "are not equal";
} else {
ASSERT_EQ(0, refStr.compare(str));
}
Expand Down

0 comments on commit 78c8762

Please sign in to comment.