Complete Arduino API mock (mock_arduino.h/cpp) enabling application code to compile and run on PC without hardware. Includes MockSerial, String class, GPIO/analog/timing/interrupt mocks with state tracking and test control API. - Arduino.h, Wire.h, SPI.h shims intercept includes in test builds - System test template (test_system.cpp) using SimHal - CMakeLists.txt builds mock_arduino as static lib, links both suites - Root test.sh/test.bat with --unit/--system/--clean/--verbose flags - test.bat auto-detects MSVC via vswhere + vcvarsall.bat - Doctor reports nuanced compiler status (on PATH vs installed) - Refresh pulls mock infrastructure into existing projects - 15 tests passing: 7 unit (MockHal) + 8 system (SimHal)
15 lines
407 B
C
15 lines
407 B
C
/*
|
|
* Arduino.h -- shim for host-side test builds.
|
|
*
|
|
* When compiling tests on x86_64, this file sits in the mocks/ include
|
|
* path and intercepts #include <Arduino.h> so that student code (or
|
|
* future libraries) that reference Arduino directly still compiles.
|
|
*
|
|
* Generated by Anvil.
|
|
*/
|
|
#ifndef ARDUINO_H_MOCK_SHIM
|
|
#define ARDUINO_H_MOCK_SHIM
|
|
|
|
#include "mock_arduino.h"
|
|
|
|
#endif // ARDUINO_H_MOCK_SHIM
|