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/slang-unit-test/unit-test-parameter-usage-reflection.cpp | |
| parent | a729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff) | |
format
* format
* Minor test fixes
* enable checking cpp format in ci
Diffstat (limited to 'tools/slang-unit-test/unit-test-parameter-usage-reflection.cpp')
| -rw-r--r-- | tools/slang-unit-test/unit-test-parameter-usage-reflection.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/tools/slang-unit-test/unit-test-parameter-usage-reflection.cpp b/tools/slang-unit-test/unit-test-parameter-usage-reflection.cpp index 911bdc5a4..c437ae2a2 100644 --- a/tools/slang-unit-test/unit-test-parameter-usage-reflection.cpp +++ b/tools/slang-unit-test/unit-test-parameter-usage-reflection.cpp @@ -1,15 +1,14 @@ // unit-test-parameter-usage-reflection.cpp +#include "../../source/core/slang-io.h" +#include "../../source/core/slang-process.h" +#include "slang-com-ptr.h" #include "slang.h" +#include "tools/unit-test/slang-unit-test.h" #include <stdio.h> #include <stdlib.h> -#include "tools/unit-test/slang-unit-test.h" -#include "slang-com-ptr.h" -#include "../../source/core/slang-io.h" -#include "../../source/core/slang-process.h" - using namespace Slang; // Test that the isParameterLocationUsed API works. @@ -40,16 +39,28 @@ SLANG_UNIT_TEST(isParameterLocationUsedReflection) SLANG_CHECK(globalSession->createSession(sessionDesc, session.writeRef()) == SLANG_OK); ComPtr<slang::IBlob> diagnosticBlob; - auto module = session->loadModuleFromSourceString("m", "m.slang", userSourceBody, diagnosticBlob.writeRef()); + auto module = session->loadModuleFromSourceString( + "m", + "m.slang", + userSourceBody, + diagnosticBlob.writeRef()); SLANG_CHECK(module != nullptr); ComPtr<slang::IEntryPoint> entryPoint; - module->findAndCheckEntryPoint("fragMain", SLANG_STAGE_FRAGMENT, entryPoint.writeRef(), diagnosticBlob.writeRef()); + module->findAndCheckEntryPoint( + "fragMain", + SLANG_STAGE_FRAGMENT, + entryPoint.writeRef(), + diagnosticBlob.writeRef()); SLANG_CHECK(entryPoint != nullptr); ComPtr<slang::IComponentType> compositeProgram; - slang::IComponentType* components[] = { module, entryPoint.get() }; - session->createCompositeComponentType(components, 2, compositeProgram.writeRef(), diagnosticBlob.writeRef()); + slang::IComponentType* components[] = {module, entryPoint.get()}; + session->createCompositeComponentType( + components, + 2, + compositeProgram.writeRef(), + diagnosticBlob.writeRef()); SLANG_CHECK(compositeProgram != nullptr); ComPtr<slang::IComponentType> linkedProgram; @@ -65,4 +76,3 @@ SLANG_UNIT_TEST(isParameterLocationUsedReflection) metadata->isParameterLocationUsed(SLANG_PARAMETER_CATEGORY_DESCRIPTOR_TABLE_SLOT, 0, 1, isUsed); SLANG_CHECK(!isUsed); } - |
