Skip to content

Commit

Permalink
See if this covers more branches
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston authored Sep 16, 2023
1 parent d39f54e commit 113dcd3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/util/demangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ SCENARIO("Test the demangle function correctly demangles symbols", "[util][deman
}
}

GIVEN("A nullptr as the symbol") {
const char* symbol = nullptr;

WHEN("Demangle is called") {
std::string result = demangle(symbol);

THEN("It should return an empty string") {
REQUIRE(result.empty());
}
}
}

GIVEN("A symbol from a struct") {
const char* symbol = typeid(TestSymbol).name();
const std::string expected = "TestSymbol";
Expand Down

0 comments on commit 113dcd3

Please sign in to comment.