diff options
Diffstat (limited to 'tools/unit-test/slang-unit-test.cpp')
| -rw-r--r-- | tools/unit-test/slang-unit-test.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
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<SlangUnitTest> 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}); } |
