Skip to content

Commit

Permalink
Testing/Errors: add test for Exception::what()
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidB137 committed Sep 17, 2024
1 parent f1cda2d commit 62d5b51
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/tests/errors.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* @file errors.cpp
* @author Dávid Benko (davidbenko@davidbenko.dev)
* @copyright Copyright (c) 2024
*/

#include <catch2/catch_test_macros.hpp>

#include "kvik/errors.hpp"

using namespace kvik;

TEST_CASE("Exception::what()", "[LocalPeer]")
{
Exception exc("abc");
CHECK(std::string(exc.what()) == "abc");
}

0 comments on commit 62d5b51

Please sign in to comment.