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/test-process/test-process-main.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'tools/test-process') diff --git a/tools/test-process/test-process-main.cpp b/tools/test-process/test-process-main.cpp index ea8f30c11..31e7f3ef5 100644 --- a/tools/test-process/test-process-main.cpp +++ b/tools/test-process/test-process-main.cpp @@ -1,19 +1,16 @@ // test-process-main.cpp -#include -#include -#include - - -#include "slang-com-helper.h" - -#include "../../source/core/slang-string.h" +#include "../../source/core/slang-http.h" #include "../../source/core/slang-io.h" -#include "../../source/core/slang-string-util.h" #include "../../source/core/slang-process-util.h" - +#include "../../source/core/slang-string-util.h" +#include "../../source/core/slang-string.h" #include "../../source/core/slang-test-tool-util.h" -#include "../../source/core/slang-http.h" +#include "slang-com-helper.h" + +#include +#include +#include namespace TestProcess { @@ -80,7 +77,7 @@ static SlangResult _outputReflect() List buffer; - Index startIndex = 0; + Index startIndex = 0; while (true) { @@ -88,7 +85,9 @@ static SlangResult _outputReflect() while (true) { - UnownedStringSlice slice((const char*)buffer.begin() + startIndex, (const char*)buffer.end()); + UnownedStringSlice slice( + (const char*)buffer.begin() + startIndex, + (const char*)buffer.end()); UnownedStringSlice line; if (!StringUtil::extractLine(slice, line) || slice.begin() == nullptr) @@ -107,7 +106,9 @@ static SlangResult _outputReflect() fputc('\n', fileOut); // Move the start index forward - const Index newStartIndex = slice.begin() ? Index(slice.begin() - (const char*)buffer.getBuffer()) : buffer.getCount(); + const Index newStartIndex = slice.begin() + ? Index(slice.begin() - (const char*)buffer.getBuffer()) + : buffer.getCount(); SLANG_ASSERT(newStartIndex > startIndex); startIndex = newStartIndex; } @@ -157,7 +158,7 @@ static SlangResult _httpReflect(int argc, const char* const* argv) return SLANG_OK; } -static SlangResult execute(int argc, const char*const* argv) +static SlangResult execute(int argc, const char* const* argv) { if (argc < 2) { -- cgit v1.2.3