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

Add missing tests for Exceptions

parent c6207918
No related branches found
No related tags found
1 merge request!199Integrate checkpointing
......@@ -2,6 +2,7 @@
#include <catch2/matchers/catch_matchers_all.hpp>
#include <utils/Exceptions.hpp>
#include <utils/SourceLocation.hpp>
// clazy:excludeall=non-pod-global-static
......@@ -14,8 +15,10 @@ TEST_CASE("Exceptions", "[utils]")
UnexpectedError unexpected_error{"an unexpected error"};
REQUIRE(std::string{unexpected_error.what()} == "unexpected error: an unexpected error");
REQUIRE(std::string{unexpected_error.sourceLocation().file_name()} == SourceLocation{}.filename());
NotImplementedError not_implemented_error{"not implemented error"};
REQUIRE(std::string{not_implemented_error.what()} == "not implemented yet: not implemented error");
REQUIRE(std::string{not_implemented_error.sourceLocation().file_name()} == SourceLocation{}.filename());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment