summaryrefslogtreecommitdiffstats
path: root/source/core/slang-test-tool-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-test-tool-util.cpp')
-rw-r--r--source/core/slang-test-tool-util.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/core/slang-test-tool-util.cpp b/source/core/slang-test-tool-util.cpp
new file mode 100644
index 000000000..7ecfacefa
--- /dev/null
+++ b/source/core/slang-test-tool-util.cpp
@@ -0,0 +1,21 @@
+
+#include "slang-test-tool-util.h"
+
+namespace Slang
+{
+
+/* static */int TestToolUtil::getReturnCode(SlangResult res)
+{
+ if (SLANG_SUCCEEDED(res))
+ {
+ return 0;
+ }
+ else if (res == SLANG_E_INTERNAL_FAIL)
+ {
+ return -1;
+ }
+ return 1;
+}
+
+}
+