From f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 14:49:26 +0800 Subject: format * format * Minor test fixes * enable checking cpp format in ci --- tools/unit-test/slang-unit-test.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'tools/unit-test/slang-unit-test.cpp') diff --git a/tools/unit-test/slang-unit-test.cpp b/tools/unit-test/slang-unit-test.cpp index 8b57b375b..61f778c9a 100644 --- a/tools/unit-test/slang-unit-test.cpp +++ b/tools/unit-test/slang-unit-test.cpp @@ -1,4 +1,5 @@ #include "slang-unit-test.h" + #include "slang.h" #include "source/core/slang-basic.h" @@ -14,10 +15,7 @@ public: Slang::List tests; ITestReporter* testReporter = nullptr; - virtual SLANG_NO_THROW SlangInt SLANG_MCALL getTestCount() override - { - return tests.getCount(); - } + virtual SLANG_NO_THROW SlangInt SLANG_MCALL getTestCount() override { return tests.getCount(); } virtual SLANG_NO_THROW const char* SLANG_MCALL getTestName(SlangInt index) override { return tests[index].name; @@ -33,11 +31,7 @@ public: testReporter = reporter; } - virtual SLANG_NO_THROW void SLANG_MCALL destroy() override - { - tests = decltype(tests)(); - } - + virtual SLANG_NO_THROW void SLANG_MCALL destroy() override { tests = decltype(tests)(); } }; SlangUnitTestModule* _getTestModule() @@ -53,13 +47,13 @@ ITestReporter* getTestReporter() extern "C" { -SLANG_DLL_EXPORT IUnitTestModule* slangUnitTestGetModule() -{ - return _getTestModule(); -} + SLANG_DLL_EXPORT IUnitTestModule* slangUnitTestGetModule() + { + return _getTestModule(); + } } UnitTestRegisterHelper::UnitTestRegisterHelper(const char* name, UnitTestFunc testFunc) { - _getTestModule()->tests.add(SlangUnitTest{ name, testFunc }); + _getTestModule()->tests.add(SlangUnitTest{name, testFunc}); } -- cgit v1.2.3