diff options
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 |
