Testing a program

A program's window logic can be tested on any machine, without a window system, on the headless test backend. It exists in builds with MAUL_WINDOW_TEST_BACKEND (on with the library's own tests) and only in a context whose def sets backend = mwin_backendTest; it is never a fallback for a native backend.

How it behaves

A request the test platform answered with another outcome leaves what these readers tell unchanged, as a platform that refused would.

A test

A test runs the program's own init and frame through mwinRun with the test backend in the def, posts what it needs between frames, and checks what the program drained and asked for. The library's contract tests in test/ work this way; test/test_program.h is the small harness they share, and test/test_input.c and test/test_clipboard.c are short examples.