diff --git a/tests/test_Exceptions.cpp b/tests/test_Exceptions.cpp index 739046f44aa8349364ce16f074dc05d0a0a886eb..99b03b55bac75cd6c2fb515d02aec6c3e22cc9ef 100644 --- a/tests/test_Exceptions.cpp +++ b/tests/test_Exceptions.cpp @@ -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()); } }