diff options
author | jmpoep <OriginalEntryPoint@qq.com> | 2023-12-07 16:51:07 +0800 |
---|---|---|
committer | jmpoep <OriginalEntryPoint@qq.com> | 2023-12-07 16:51:07 +0800 |
commit | 28008a746a31abb7909dd86cb0cd413ac8943b0b (patch) | |
tree | a30b74b8cad548048c3c1551d652828ab76fa9bd /win_runtime.Tests/main.cc | |
download | vmprotect-3.5.1-28008a746a31abb7909dd86cb0cd413ac8943b0b.tar vmprotect-3.5.1-28008a746a31abb7909dd86cb0cd413ac8943b0b.tar.gz vmprotect-3.5.1-28008a746a31abb7909dd86cb0cd413ac8943b0b.tar.bz2 vmprotect-3.5.1-28008a746a31abb7909dd86cb0cd413ac8943b0b.zip |
Diffstat (limited to 'win_runtime.Tests/main.cc')
-rw-r--r-- | win_runtime.Tests/main.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/win_runtime.Tests/main.cc b/win_runtime.Tests/main.cc new file mode 100644 index 0000000..26100b0 --- /dev/null +++ b/win_runtime.Tests/main.cc @@ -0,0 +1,26 @@ +#ifdef WIN +#include <crtdbg.h> /* Heap verifying */ +#elif MACOSX +#define __ICONS__ +#include <Cocoa/Cocoa.h> +#endif + + +int main(int argc, char **argv) +{ +#ifdef WIN + /* Set up heap verifying. */ + _CrtSetDbgFlag(_CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ) | _CRTDBG_LEAK_CHECK_DF); +#elif MACOSX + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; +#endif + + testing::InitGoogleTest(&argc, argv); + int rc = RUN_ALL_TESTS(); + +#ifdef MACOSX + [pool release]; +#endif + + return rc; +} |