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-rtti.cpp | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'tools/slang-unit-test/unit-test-rtti.cpp') diff --git a/tools/slang-unit-test/unit-test-rtti.cpp b/tools/slang-unit-test/unit-test-rtti.cpp index f72cfbde2..485d58aea 100644 --- a/tools/slang-unit-test/unit-test-rtti.cpp +++ b/tools/slang-unit-test/unit-test-rtti.cpp @@ -1,12 +1,12 @@ // unit-test-rtti.cpp #include "../../source/core/slang-rtti-info.h" - #include "tools/unit-test/slang-unit-test.h" using namespace Slang; -namespace { // anonymous +namespace +{ // anonymous struct SomeStruct { @@ -18,7 +18,7 @@ struct SomeStruct static const StructRttiInfo g_rttiInfo; }; -} // anonymous +} // namespace static const StructRttiInfo _makeSomeStructRtti() { @@ -32,14 +32,13 @@ static const StructRttiInfo _makeSomeStructRtti() return builder.make(); } -/* static */const StructRttiInfo SomeStruct::g_rttiInfo = _makeSomeStructRtti(); +/* static */ const StructRttiInfo SomeStruct::g_rttiInfo = _makeSomeStructRtti(); SLANG_UNIT_TEST(Rtti) { using namespace Slang; - const RttiInfo* types[] = - { + const RttiInfo* types[] = { GetRttiInfo::get(), GetRttiInfo::get(), GetRttiInfo::get(), @@ -48,7 +47,7 @@ SLANG_UNIT_TEST(Rtti) GetRttiInfo::get(), GetRttiInfo::get(), GetRttiInfo::get(), - GetRttiInfo::get(), + GetRttiInfo::get(), }; StringBuilder buf; @@ -59,16 +58,15 @@ SLANG_UNIT_TEST(Rtti) buf << "\n"; } - const char expected[] = - "int32_t\n" - "int32_t[10]\n" - "String\n" - "List\n" - "List>\n" - "int32_t[2][3]\n" - "SomeStruct\n" - "SomeStruct*\n" - "float*\n"; + const char expected[] = "int32_t\n" + "int32_t[10]\n" + "String\n" + "List\n" + "List>\n" + "int32_t[2][3]\n" + "SomeStruct\n" + "SomeStruct*\n" + "float*\n"; SLANG_CHECK(buf == expected) } -- cgit v1.2.3