summaryrefslogtreecommitdiffstats
path: root/source/core/slang-test-tool-util.h
blob: 615bbe10d8de7d00c769112cd3bf814a9463d640 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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