C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
ui_conformance_test.c File Reference

Compile-time and smoke-test conformance test for the UALUI API. More...

#include "ui_backend.h"
#include "ui_layout.h"
#include <stdio.h>
#include <string.h>
Include dependency graph for ui_conformance_test.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE

Functions

int main (void)

Detailed Description

Compile-time and smoke-test conformance test for the UALUI API.

This program verifies that:

  1. All public types and function signatures in ui_backend.h compile correctly against the compiled-in backend.
  2. The init/shutdown lifecycle works (when run from a terminal).
  3. Surface creation, movement, sizing, and destruction work.
  4. ui_get_backend() and ui_get_caps() return sensible values.
  5. The escape-hatch headers compile (included but not called at runtime since they require the matching backend).

Build with the NCurses backend: gcc -std=c23 -I../include -I. \ ui_conformance_test.c ui_ncurses.c ui_ncurses_draw.c \ ui_ncurses_input.c ../ual/ui_layout.c \ $(pkg-config –cflags –libs panelw ncursesw) -o conformance_ncurses

Build with the NotCurses backend: gcc -std=c23 -I../include -I. \ ui_conformance_test.c ui_notcurses.c ui_notcurses_draw.c \ ui_notcurses_input.c ../ual/ui_layout.c \ $(pkg-config –cflags –libs notcurses) -o conformance_notcurses

Definition in file ui_conformance_test.c.

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 27 of file ui_conformance_test.c.

Function Documentation

◆ main()

int main ( void )

Definition at line 155 of file ui_conformance_test.c.

155 {
156 compile_time_checks();
157 printf("PASS: compile-time type checks\n");
158 return test_lifecycle();
159}