diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2018-12-21 11:00:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-21 11:00:28 -0500 |
| commit | efa2c8f41aa5cd2c27990fd9b57ea0eff06976e7 (patch) | |
| tree | 4c1a4d8e6e71e81c42cfbf315610e380d75527bf /source/core/slang-test-tool-util.h | |
| parent | b5bda9b3d155234be079debe6997cbc900773cf2 (diff) | |
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
Diffstat (limited to 'source/core/slang-test-tool-util.h')
| -rw-r--r-- | source/core/slang-test-tool-util.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/core/slang-test-tool-util.h b/source/core/slang-test-tool-util.h new file mode 100644 index 000000000..615bbe10d --- /dev/null +++ b/source/core/slang-test-tool-util.h @@ -0,0 +1,25 @@ +#ifndef SLANG_TEST_TOOL_UTIL_H +#define SLANG_TEST_TOOL_UTIL_H + +#include "slang-std-writers.h" + +namespace Slang { + +#ifdef SLANG_SHARED_LIBRARY_TOOL +# define SLANG_TEST_TOOL_API SLANG_EXTERN_C SLANG_DLL_EXPORT +#else +# define SLANG_TEST_TOOL_API +#endif + +/* Utility functions for 'test tools' */ +struct TestToolUtil +{ + typedef SlangResult(*InnerMainFunc)(Slang::StdWriters* stdWriters, SlangSession* session, int argc, const char*const* argv); + + /// Given a slang result, returns a return code that can be returned from an executable + static int getReturnCode(SlangResult res); +}; + +} // namespace Slang + +#endif // SLANG_TEST_TOOL_H |
