diff options
author | 2024-04-11 00:16:51 +0700 | |
---|---|---|
committer | 2024-04-11 03:16:51 +1000 | |
commit | 2c566627a1fc0ab21cc0399e8ad0ce134e36b53f (patch) | |
tree | 8eb19fad727675c673de8e59a7fd6137e14f2cfd /3rdparty/asmjit/test/asmjit_test_compiler.h | |
parent | 4bcbfac11f352eabcae33b203c026ce02b3fd4ba (diff) |
3rdparty/asmjit: Updated to upstream version 1.13.0. (#12228)
From revision asmjit/asmjit@e5d7c0bd5d9aec44d68830187138149e6a8c4e32
Diffstat (limited to '3rdparty/asmjit/test/asmjit_test_compiler.h')
-rw-r--r-- | 3rdparty/asmjit/test/asmjit_test_compiler.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/3rdparty/asmjit/test/asmjit_test_compiler.h b/3rdparty/asmjit/test/asmjit_test_compiler.h index e694b379e11..433d47953dd 100644 --- a/3rdparty/asmjit/test/asmjit_test_compiler.h +++ b/3rdparty/asmjit/test/asmjit_test_compiler.h @@ -29,33 +29,41 @@ public: //! A test case interface for testing AsmJit's Compiler. class TestCase { public: - TestCase(const char* name = nullptr) { + TestCase(const char* name, asmjit::Arch arch) { if (name) _name.assign(name); + _arch = arch; } virtual ~TestCase() {} inline const char* name() const { return _name.data(); } + inline asmjit::Arch arch() const { return _arch; } virtual void compile(asmjit::BaseCompiler& cc) = 0; virtual bool run(void* func, asmjit::String& result, asmjit::String& expect) = 0; asmjit::String _name; + asmjit::Arch _arch; }; class TestApp { public: std::vector<std::unique_ptr<TestCase>> _tests; - unsigned _nFailed = 0; - size_t _outputSize = 0; - + const char* _arch = nullptr; + const char* _filter = nullptr; + bool _helpOnly = false; bool _verbose = false; bool _dumpAsm = false; bool _dumpHex = false; - TestApp() noexcept {} + unsigned _numTests = 0; + unsigned _numFailed = 0; + size_t _outputSize = 0; + + TestApp() noexcept + : _arch("all") {} ~TestApp() noexcept {} void add(TestCase* test) noexcept { @@ -67,6 +75,8 @@ public: int handleArgs(int argc, const char* const* argv); void showInfo(); + + bool shouldRun(const TestCase* tc); int run(); }; |