mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-28 07:47:02 -05:00
tests: Disable imhex checks in unit tests
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
#ifndef __IMHEX__
|
||||
#error This library is only available in the ImHex Hex editor
|
||||
#ifndef __PL_UNIT_TESTS__
|
||||
#ifndef __IMHEX__
|
||||
|
||||
#error This library is only available in the ImHex Hex editor
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -46,6 +46,8 @@ int main(int argc, char **argv) {
|
||||
runtime.addPragma("eval_depth", DummyPragmaHandler);
|
||||
runtime.addPragma("array_limit", DummyPragmaHandler);
|
||||
runtime.addPragma("pattern_limit", DummyPragmaHandler);
|
||||
|
||||
runtime.addDefine("__PL_UNIT_TESTS__");
|
||||
}
|
||||
|
||||
// Execute pattern
|
||||
|
||||
@@ -48,6 +48,7 @@ int main(int argc, char **argv) {
|
||||
runtime.setDangerousFunctionCallHandler([]{ return true; });
|
||||
runtime.setIncludePaths({ includePath });
|
||||
runtime.addPragma("MIME", DummyPragmaHandler);
|
||||
runtime.addDefine("__PL_UNIT_TESTS__");
|
||||
}
|
||||
|
||||
// Execute pattern
|
||||
|
||||
Reference in New Issue
Block a user