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]") ...@@ -24,11 +24,13 @@ TEST_CASE("SymbolTable", "[language]")
std::stringstream st_output; std::stringstream st_output;
st_output << '\n' << *root_st; st_output << '\n' << *root_st;
REQUIRE(st_output.str() == R"( std::stringstream expected_output;
-- Symbol table state -- parent : 0 expected_output << '\n'
a: -- << "-- Symbol table state -- parent : " << static_cast<SymbolTable*>(nullptr) << '\n'
------------------------ << " a: --\n"
)"); << "------------------------\n";
REQUIRE(st_output.str() == expected_output.str());
} }
SECTION("Attributes") SECTION("Attributes")
...@@ -68,11 +70,13 @@ TEST_CASE("SymbolTable", "[language]") ...@@ -68,11 +70,13 @@ TEST_CASE("SymbolTable", "[language]")
std::stringstream st_output; std::stringstream st_output;
st_output << '\n' << *root_st; st_output << '\n' << *root_st;
REQUIRE(st_output.str() == R"( std::stringstream expected_output;
-- Symbol table state -- parent : 0 expected_output << '\n'
a: 2.3 << "-- 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