summaryrefslogtreecommitdiffstats
path: root/tools/slang-test/options.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-test/options.cpp
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'tools/slang-test/options.cpp')
-rw-r--r--tools/slang-test/options.cpp30
1 files changed, 23 insertions, 7 deletions
diff --git a/tools/slang-test/options.cpp b/tools/slang-test/options.cpp
index 0f3abfdf2..10f98f3a2 100644
--- a/tools/slang-test/options.cpp
+++ b/tools/slang-test/options.cpp
@@ -1,8 +1,9 @@
// test-context.cpp
#include "options.h"
-#include "../../source/core/slang-string-util.h"
#include "../../source/core/slang-io.h"
+#include "../../source/core/slang-string-util.h"
+
#include <stdio.h>
#include <stdlib.h>
@@ -58,7 +59,12 @@ static bool _isSubCommand(const char* arg)
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!! Options !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-/* static */Result Options::parse(int argc, char** argv, TestCategorySet* categorySet, Slang::WriterHelper stdError, Options* optionsOut)
+/* static */ Result Options::parse(
+ int argc,
+ char** argv,
+ TestCategorySet* categorySet,
+ Slang::WriterHelper stdError,
+ Options* optionsOut)
{
// Reset the options
*optionsOut = Options();
@@ -200,7 +206,7 @@ static bool _isSubCommand(const char* arg)
stdError.print("error: expected operand for '%s'\n", arg);
return SLANG_FAIL;
}
- optionsOut->serverCount = stringToInt(* argCursor++);
+ optionsOut->serverCount = stringToInt(*argCursor++);
if (optionsOut->serverCount <= 0)
{
optionsOut->serverCount = 1;
@@ -258,12 +264,17 @@ static bool _isSubCommand(const char* arg)
{
if (argCursor == argEnd)
{
- stdError.print("error: expecting an api expression (eg 'vk+dx12' or '+dx11') '%s'\n", arg);
+ stdError.print(
+ "error: expecting an api expression (eg 'vk+dx12' or '+dx11') '%s'\n",
+ arg);
return SLANG_FAIL;
}
const char* apiList = *argCursor++;
- SlangResult res = RenderApiUtil::parseApiFlags(UnownedStringSlice(apiList), optionsOut->enabledApis, &optionsOut->enabledApis);
+ SlangResult res = RenderApiUtil::parseApiFlags(
+ UnownedStringSlice(apiList),
+ optionsOut->enabledApis,
+ &optionsOut->enabledApis);
if (SLANG_FAILED(res))
{
stdError.print("error: unable to parse api expression '%s'\n", apiList);
@@ -274,12 +285,17 @@ static bool _isSubCommand(const char* arg)
{
if (argCursor == argEnd)
{
- stdError.print("error: expected an api expression (eg 'vk+dx12' or '+dx11') '%s'\n", arg);
+ stdError.print(
+ "error: expected an api expression (eg 'vk+dx12' or '+dx11') '%s'\n",
+ arg);
return SLANG_FAIL;
}
const char* apiList = *argCursor++;
- SlangResult res = RenderApiUtil::parseApiFlags(UnownedStringSlice(apiList), optionsOut->synthesizedTestApis, &optionsOut->synthesizedTestApis);
+ SlangResult res = RenderApiUtil::parseApiFlags(
+ UnownedStringSlice(apiList),
+ optionsOut->synthesizedTestApis,
+ &optionsOut->synthesizedTestApis);
if (SLANG_FAILED(res))
{
stdError.print("error: unable to parse api expression '%s'\n", apiList);