What and where is unity.h for

After 2 years I happy to start my hobby again.
I try to fiddle with ArduinoFake this wonderful Project to debug
I tried the example from Github and get the Error
Linking .pio\build\native\program.exe
c:/mingw/bin/…/lib/gcc/mingw32/8.2.0/…/…/…/…/mingw32/bin/ld.exe: c:/mingw/bin/…/lib/gcc/mingw32/8.2.0/…/…/…/libmingw32.a(main.o):(.text.startup+0xc0): undefined reference to `WinMain@16’
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\native\program.exe] Error 1
and I wonder where is unity.h

#include <Arduino.h>
#include <cstdlib>
#include <unity.h>

using namespace fakeit;
#include "test_context.h"
#include "test_function.h"
#include "test_print.h"
#include "test_stream.h"
#include "test_serial.h"
#include "test_wire.h"
#include "test_spi.h"
#include "test_client.h"
#include "test_arduino_string.h"
#include "test_include.h"

I don’t understand what I miss

If you get this error it mains you have not defined the main() function of the program.

^-- for test/ code.

When I move the main.cpp into the src folder all files starting with "test_ are missing.

The main.cpp file of the arduino-mock example is not meant to be compilable for platform = native, since it does not define a main() function.

The example only shows how to compile the tests for the native platform, not how to also make it compile when using “Build” on the native platform. For that, you would have to conditionally define a main function as shown.

Thank you for the fast answer
With void loop() it does not work
it should be like this

void setup()


int main()


My intention was to print somethin on the Terminal
I tried this

    const char char_array_var[] = "char_array_var";

    Print* print = ArduinoFakeMock(Print);

but here print->print(char_array_var); the Program conuter gets lost in the Nirvana
any clue how to print a Message to the Terminal window, would be nice by the way

Sorry I did not wait the Text Output with printf comes on the Debug Console
So we have to wait until the Program finished the Code. Thank yo for helping.

That’s a problem with buffering, you can turn it off and see the output instantly, see An error information appeared when debugging the native C example of platformio - #14 by wgt