完善V1.4踢乒乓球版本

This commit is contained in:
myperworld committed 2026-01-20 22:15:03 +08:00
1 parent d14fe6c37b
commit 72455a5e76
1864 files changed
+19294 -218

No files matched your search

@@ -0,0 +1,51 @@
// Fix INPUT macro conflict between Arduino and Windows headers
#ifdef INPUT
#define ARDUINO_INPUT_BACKUP INPUT
#undef INPUT
#endif
#define DOCTEST_CONFIG_IMPLEMENT
#include "doctest.h"
// Restore Arduino INPUT macro after Windows headers
#ifdef ARDUINO_INPUT_BACKUP
#define INPUT ARDUINO_INPUT_BACKUP
#undef ARDUINO_INPUT_BACKUP
#endif
#ifdef ENABLE_CRASH_HANDLER
#include "crash_handler.h"
#endif
// This file contains the main function for doctest
// It will be compiled once and linked to all test executables
#ifdef _WIN32
// Windows-specific entry point
#include <windows.h>
// Define the main entry point for Windows
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow) {
(void)hInstance; (void)hPrevInstance; (void)lpCmdLine; (void)nCmdShow; // Suppress unused parameter warnings
#ifdef ENABLE_CRASH_HANDLER
setup_crash_handler();
#endif
return doctest::Context().run();
}
// Also provide a standard main for compatibility
int main(int argc, char** argv) {
#ifdef ENABLE_CRASH_HANDLER
setup_crash_handler();
#endif
return doctest::Context(argc, argv).run();
}
#else
// Standard entry point for non-Windows platforms
int main(int argc, char** argv) {
#ifdef ENABLE_CRASH_HANDLER
setup_crash_handler();
#endif
return doctest::Context(argc, argv).run();
}
#endif