From 91fd65a215c5e72b3e3d4cdb82d6ab849aa5718f Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Fri, 1 Nov 2024 13:34:57 +0100 Subject: [PATCH] Add missing tests for Exceptions --- tests/test_Exceptions.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_Exceptions.cpp b/tests/test_Exceptions.cpp index 739046f44..99b03b55b 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()); } } -- GitLab