From aae54bed6b9327c71e0589cd46e911d6db2df82d Mon Sep 17 00:00:00 2001 From: fallenoak Date: Thu, 20 Nov 2025 21:31:02 -0600 Subject: [PATCH] chore(style): clean up line endings in core tests --- test/Core.cpp | 79 +++++++++++++++++++++++++-------------------------- test/Test.cpp | 4 +-- 2 files changed, 41 insertions(+), 42 deletions(-) diff --git a/test/Core.cpp b/test/Core.cpp index c6703d1..c3382b4 100644 --- a/test/Core.cpp +++ b/test/Core.cpp @@ -1,40 +1,39 @@ -#include "test/Test.hpp" -#include "EventTest.hpp" -#include "storm/Core.hpp" - - -TEST_CASE("StormDestroy", "[core]") { - SECTION("always returns 1") { - CHECK(StormDestroy() == 1); - } - - SECTION("SEvt") { - EventHandlerTest test; - - SECTION("destroys all event handlers") { - SEvtRegisterHandler(1, 1, 1, 0, &TestEventHandler1); - CHECK(SEvtDispatch(1, 1, 1, nullptr) == 1); - CHECK(test.NumCalls() == 1); - - CHECK(SEvtDispatch(1, 1, 1, nullptr) == 1); - CHECK(test.NumCalls() == 2); - - CHECK(StormDestroy() == 1); - - // Can't increment calls since the handler was destroyed - CHECK(SEvtDispatch(1, 1, 1, nullptr) == 0); - CHECK(test.NumCalls() == 2); - } - - SECTION("doesn't destroy break data") { - // not ideal but it's official behaviour - SEvtBreakHandlerChain(nullptr); - - CHECK(StormDestroy() == 1); - - SEvtRegisterHandler(0, 0, 0, 0, &TestEventHandler1); - CHECK(SEvtDispatch(0, 0, 0, nullptr) == 0); - CHECK(SEvtDispatch(0, 0, 0, nullptr) == 1); - } - } -} +#include "test/Test.hpp" +#include "EventTest.hpp" +#include "storm/Core.hpp" + +TEST_CASE("StormDestroy", "[core]") { + SECTION("always returns 1") { + CHECK(StormDestroy() == 1); + } + + SECTION("SEvt") { + EventHandlerTest test; + + SECTION("destroys all event handlers") { + SEvtRegisterHandler(1, 1, 1, 0, &TestEventHandler1); + CHECK(SEvtDispatch(1, 1, 1, nullptr) == 1); + CHECK(test.NumCalls() == 1); + + CHECK(SEvtDispatch(1, 1, 1, nullptr) == 1); + CHECK(test.NumCalls() == 2); + + CHECK(StormDestroy() == 1); + + // Can't increment calls since the handler was destroyed + CHECK(SEvtDispatch(1, 1, 1, nullptr) == 0); + CHECK(test.NumCalls() == 2); + } + + SECTION("doesn't destroy break data") { + // not ideal but it's official behaviour + SEvtBreakHandlerChain(nullptr); + + CHECK(StormDestroy() == 1); + + SEvtRegisterHandler(0, 0, 0, 0, &TestEventHandler1); + CHECK(SEvtDispatch(0, 0, 0, nullptr) == 0); + CHECK(SEvtDispatch(0, 0, 0, nullptr) == 1); + } + } +} diff --git a/test/Test.cpp b/test/Test.cpp index c5af3d8..14d382f 100644 --- a/test/Test.cpp +++ b/test/Test.cpp @@ -1,2 +1,2 @@ -#define CATCH_CONFIG_MAIN -#include "test/Test.hpp" +#define CATCH_CONFIG_MAIN +#include "test/Test.hpp"