From efa2c8f41aa5cd2c27990fd9b57ea0eff06976e7 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 21 Dec 2018 11:00:28 -0500 Subject: Feature/remove app context (#765) * Remove AppContext. Use StdChannels to hold writers, and TestToolUtil to hold test tool specific functionality. * StdChannels -> StdWriters * getStdOut -> getOut, getStdError -> getError --- source/core/slang-test-tool-util.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 source/core/slang-test-tool-util.cpp (limited to 'source/core/slang-test-tool-util.cpp') 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; +} + +} + -- cgit v1.2.3