diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-10-29 14:49:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 14:49:26 +0800 |
| commit | f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch) | |
| tree | ea1d61342cd29368e19135000ec2948813096205 /tools/unit-test/slang-unit-test.cpp | |
| parent | a729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff) | |
format
* format
* Minor test fixes
* enable checking cpp format in ci
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}); } |
