summaryrefslogtreecommitdiff
path: root/tools/slang-test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/slang-test')
-rw-r--r--tools/slang-test/slang-test-main.cpp18
-rw-r--r--tools/slang-test/slangc-tool.cpp2
2 files changed, 10 insertions, 10 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index 7c511a01a..f2b51562e 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -346,7 +346,7 @@ TestResult gatherTestsForFile(
{
fileContents = Slang::File::readAllText(filePath);
}
- catch (Slang::IOException)
+ catch (const Slang::IOException&)
{
return TestResult::Fail;
}
@@ -1142,7 +1142,7 @@ TestResult runSimpleTest(TestContext* context, TestInput& input)
{
expectedOutput = Slang::File::readAllText(expectedOutputPath);
}
- catch (Slang::IOException)
+ catch (const Slang::IOException&)
{
}
@@ -1291,7 +1291,7 @@ TestResult runReflectionTest(TestContext* context, TestInput& input)
{
expectedOutput = Slang::File::readAllText(expectedOutputPath);
}
- catch (Slang::IOException)
+ catch (const Slang::IOException&)
{
}
@@ -1332,7 +1332,7 @@ String getExpectedOutput(String const& outputStem)
{
expectedOutput = Slang::File::readAllText(expectedOutputPath);
}
- catch (Slang::IOException)
+ catch (const Slang::IOException&)
{
}
@@ -1479,7 +1479,7 @@ static TestResult runCPPCompilerSharedLibrary(TestContext* context, TestInput& i
String expectedOutputPath = outputStem + ".expected";
expectedOutput = Slang::File::readAllText(expectedOutputPath);
}
- catch (Slang::IOException)
+ catch (const Slang::IOException&)
{
}
@@ -1619,7 +1619,7 @@ static TestResult runCPPCompilerExecute(TestContext* context, TestInput& input)
String expectedOutputPath = outputStem + ".expected";
expectedOutput = Slang::File::readAllText(expectedOutputPath);
}
- catch (Slang::IOException)
+ catch (const Slang::IOException&)
{
}
@@ -1709,7 +1709,7 @@ TestResult runCrossCompilerTest(TestContext* context, TestInput& input)
{
Slang::File::writeAllText(expectedOutputPath, expectedOutput);
}
- catch (Slang::IOException)
+ catch (const Slang::IOException&)
{
return TestResult::Fail;
}
@@ -1794,7 +1794,7 @@ TestResult generateHLSLBaseline(
{
Slang::File::writeAllText(expectedOutputPath, expectedOutput);
}
- catch (Slang::IOException)
+ catch (const Slang::IOException&)
{
return TestResult::Fail;
}
@@ -1875,7 +1875,7 @@ static TestResult _runHLSLComparisonTest(
{
expectedOutput = Slang::File::readAllText(expectedOutputPath);
}
- catch (Slang::IOException)
+ catch (const Slang::IOException&)
{
}
diff --git a/tools/slang-test/slangc-tool.cpp b/tools/slang-test/slangc-tool.cpp
index da810fa88..d7043001a 100644
--- a/tools/slang-test/slangc-tool.cpp
+++ b/tools/slang-test/slangc-tool.cpp
@@ -38,7 +38,7 @@ static SlangResult _compile(SlangCompileRequest* compileRequest, int argc, const
res = SLANG_FAILED(res) ? SLANG_E_INTERNAL_FAIL : res;
}
#ifndef _DEBUG
- catch (Exception & e)
+ catch (const Exception& e)
{
StdWriters::getOut().print("internal compiler error: %S\n", e.Message.toWString().begin());
res = SLANG_FAIL;