summaryrefslogtreecommitdiff
path: root/tools/slang-unit-test/unit-test-find-type-by-name.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-29 14:49:26 +0800
committerGitHub <noreply@github.com>2024-10-29 14:49:26 +0800
commitf65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch)
treeea1d61342cd29368e19135000ec2948813096205 /tools/slang-unit-test/unit-test-find-type-by-name.cpp
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'tools/slang-unit-test/unit-test-find-type-by-name.cpp')
-rw-r--r--tools/slang-unit-test/unit-test-find-type-by-name.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/slang-unit-test/unit-test-find-type-by-name.cpp b/tools/slang-unit-test/unit-test-find-type-by-name.cpp
index ee6ba3516..a42b08ade 100644
--- a/tools/slang-unit-test/unit-test-find-type-by-name.cpp
+++ b/tools/slang-unit-test/unit-test-find-type-by-name.cpp
@@ -1,21 +1,19 @@
// unit-test-find-type-by-name.cpp
#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"
-
using namespace Slang;
SLANG_UNIT_TEST(findTypeByName)
{
- const char* testSource =
- "struct TestStruct {"
- " int member0;"
- " Texture2D texture1;"
- "};";
+ const char* testSource = "struct TestStruct {"
+ " int member0;"
+ " Texture2D texture1;"
+ "};";
auto session = spCreateSession();
auto request = spCreateCompileRequest(session);
spAddCodeGenTarget(request, SLANG_DXBC);
@@ -44,7 +42,8 @@ SLANG_UNIT_TEST(findTypeByName)
auto paramBlockElementType = paramBlockType->getElementType();
SLANG_CHECK_ABORT(paramBlockElementType != nullptr);
auto paramBlockElementTypeName = paramBlockElementType->getName();
- SLANG_CHECK_ABORT(paramBlockElementTypeName && strcmp(paramBlockElementTypeName, "TestStruct") == 0);
+ SLANG_CHECK_ABORT(
+ paramBlockElementTypeName && strcmp(paramBlockElementTypeName, "TestStruct") == 0);
};
testBody();
@@ -52,4 +51,3 @@ SLANG_UNIT_TEST(findTypeByName)
spDestroyCompileRequest(request);
spDestroySession(session);
}
-