Skip to content
Snippets Groups Projects
Commit 32abd3af authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Fix test reference for SymbolTable output

clang-8 may write '(nil)' instead of '0' in output
parent a2df548d
No related branches found
No related tags found
1 merge request!37Feature/language
......@@ -24,11 +24,13 @@ TEST_CASE("SymbolTable", "[language]")
std::stringstream st_output;
st_output << '\n' << *root_st;
REQUIRE(st_output.str() == R"(
-- Symbol table state -- parent : 0
a: --
------------------------
)");
std::stringstream expected_output;
expected_output << '\n'
<< "-- Symbol table state -- parent : " << static_cast<SymbolTable*>(nullptr) << '\n'
<< " a: --\n"
<< "------------------------\n";
REQUIRE(st_output.str() == expected_output.str());
}
SECTION("Attributes")
......@@ -68,11 +70,13 @@ TEST_CASE("SymbolTable", "[language]")
std::stringstream st_output;
st_output << '\n' << *root_st;
REQUIRE(st_output.str() == R"(
-- Symbol table state -- parent : 0
a: 2.3
------------------------
)");
std::stringstream expected_output;
expected_output << '\n'
<< "-- Symbol table state -- parent : " << static_cast<SymbolTable*>(nullptr) << '\n'
<< " a: 2.3\n"
<< "------------------------\n";
REQUIRE(st_output.str() == expected_output.str());
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment