Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeplf committed May 16, 2024
1 parent 47e0ba1 commit dcb649b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_immutable_morphology.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <morphio/section.h>
#include <morphio/soma.h>
#include <morphio/vector_types.h>
#include <stdexcept>

namespace {

Expand Down Expand Up @@ -348,4 +349,11 @@ TEST_CASE("warnings-collection") {
const auto expected_end_of_msg = std::string("Warning: no soma found in file");
REQUIRE(std::equal(expected_end_of_msg.rbegin(), expected_end_of_msg.rend(), msg.rbegin()));
}
{
auto warningHandler = std::make_shared<morphio::WarningHandlerCollector>();
CHECK_THROWS_AS(warningHandler->getMaxWarningCount(), std::runtime_error);
CHECK_THROWS_AS(warningHandler->setMaxWarningCount(1), std::runtime_error);
CHECK_THROWS_AS(warningHandler->getRaiseWarnings(), std::runtime_error);
CHECK_THROWS_AS(warningHandler->setRaiseWarnings(true), std::runtime_error);
}
}

0 comments on commit dcb649b

Please sign in to comment.