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/slang-unit-test/unit-test-find-type-by-name.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'tools/slang-unit-test/unit-test-find-type-by-name.cpp') 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 #include -#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); } - -- cgit v1.2.3