diff options
author | crupest <crupest@outlook.com> | 2022-05-10 19:18:32 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-05-10 19:18:32 +0800 |
commit | 891bf38d8580b83cdf6ae315cb2650dae7d79006 (patch) | |
tree | 3e7714df65147489c88dfc00a656339b29097d90 /test/common/HandlerRegistryTest.cpp | |
parent | b846a16e42b30418fe91ba3f06771fad57100624 (diff) | |
download | cru-891bf38d8580b83cdf6ae315cb2650dae7d79006.tar.gz cru-891bf38d8580b83cdf6ae315cb2650dae7d79006.tar.bz2 cru-891bf38d8580b83cdf6ae315cb2650dae7d79006.zip |
...
Diffstat (limited to 'test/common/HandlerRegistryTest.cpp')
-rw-r--r-- | test/common/HandlerRegistryTest.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/common/HandlerRegistryTest.cpp b/test/common/HandlerRegistryTest.cpp index cf64ef4d..03e190e3 100644 --- a/test/common/HandlerRegistryTest.cpp +++ b/test/common/HandlerRegistryTest.cpp @@ -1,9 +1,10 @@ #include "cru/common/HandlerRegistry.h" -#include <gtest/gtest.h> +#include <catch2/catch_test_macros.hpp> + #include <algorithm> -TEST(HandlerRegistry, Work) { +TEST_CASE("HandlerRegistry", "[handler_registry]") { using namespace cru; HandlerRegistry<void()> registry; @@ -16,7 +17,7 @@ TEST(HandlerRegistry, Work) { handler(); } - ASSERT_EQ(counter, 3); + REQUIRE(counter == 3); registry.RemoveHandler(tag1); @@ -24,7 +25,7 @@ TEST(HandlerRegistry, Work) { handler(); } - ASSERT_EQ(counter, 4); + REQUIRE(counter == 4); registry.RemoveHandler(tag2); @@ -32,5 +33,5 @@ TEST(HandlerRegistry, Work) { handler(); } - ASSERT_EQ(counter, 4); + REQUIRE(counter == 4); } |