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-process.cpp | |
| parent | a729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff) | |
format
* format
* Minor test fixes
* enable checking cpp format in ci
Diffstat (limited to 'tools/slang-unit-test/unit-test-process.cpp')
| -rw-r--r-- | tools/slang-unit-test/unit-test-process.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/slang-unit-test/unit-test-process.cpp b/tools/slang-unit-test/unit-test-process.cpp index d24120716..8866f4a9e 100644 --- a/tools/slang-unit-test/unit-test-process.cpp +++ b/tools/slang-unit-test/unit-test-process.cpp @@ -1,17 +1,19 @@ // unit-test-process.cpp -#include "../../source/core/slang-string-util.h" -#include "../../source/core/slang-process-util.h" - -#include "../../source/core/slang-io.h" #include "../../source/core/slang-http.h" +#include "../../source/core/slang-io.h" +#include "../../source/core/slang-process-util.h" #include "../../source/core/slang-random-generator.h" - +#include "../../source/core/slang-string-util.h" #include "tools/unit-test/slang-unit-test.h" using namespace Slang; -static SlangResult _createProcess(UnitTestContext* context, const char* toolName, const List<String>* optArgs, RefPtr<Process>& outProcess) +static SlangResult _createProcess( + UnitTestContext* context, + const char* toolName, + const List<String>* optArgs, + RefPtr<Process>& outProcess) { CommandLine cmdLine; cmdLine.setExecutableLocation(ExecutableLocation(context->executableDirectory, "test-process")); @@ -34,7 +36,8 @@ static SlangResult _httpReflectTest(UnitTestContext* context) SLANG_RETURN_ON_FAIL(_createProcess(context, "http-reflect", nullptr, process)); Stream* writeStream = process->getStream(StdStreamType::In); - RefPtr<BufferedReadStream> readStream( new BufferedReadStream(process->getStream(StdStreamType::Out))); + RefPtr<BufferedReadStream> readStream( + new BufferedReadStream(process->getStream(StdStreamType::Out))); RefPtr<HTTPPacketConnection> connection = new HTTPPacketConnection(readStream, writeStream); RefPtr<RandomGenerator> rand = RandomGenerator::create(10000); @@ -91,7 +94,8 @@ static SlangResult _httpReflectTest(UnitTestContext* context) static SlangResult _countTest(UnitTestContext* context, Index size, Index crashIndex = -1) { /* Here we are trying to test what happens if the server produces a large amount of data, and - we just wait for termination. Do we receive all of the data irrespective of how much there is? */ + we just wait for termination. Do we receive all of the data irrespective of how much there is? + */ List<String> args; { @@ -147,7 +151,7 @@ static SlangResult _countTest(UnitTestContext* context, Index size, Index crashI static SlangResult _countTests(UnitTestContext* context) { - const Index sizes[] = { 1, 10, 1000, 1000, 10000, 100000 }; + const Index sizes[] = {1, 10, 1000, 1000, 10000, 100000}; for (auto size : sizes) { SLANG_RETURN_ON_FAIL(_countTest(context, size)); |
