Testing Dear ImGui - ocornut/imgui_test_engine GitHub Wiki
The imgui_test_suite part of the test engine is used to test Dear ImGui itself. These instructions help you to easily check your work against the standard suite of tests.
Building
The repositories imgui and imgui_test_engine should be cloned side-by-side into the same directory:
$ ls
imgui/ imgui_test_engine/
We build the test suite with make:
$ cd imgui_test_engine/imgui_test_suite/
$ make -f Makefile
Testing
You will need to run imgui_test_suite in a debugger, otherwise the SIGTRAPs (breakpoints) will terminate the program.
$ gdb ./imgui_test_suite
...
(gdb) run
...
(gdb) continue
If breakpoints are not handled, some tests WILL cause the program to crash. Here are example outputs so this page turns up in searches:
Trace/breakpoint trap (core dumped) ./imgui_test_suite
# "/usr/bin/ffmpeg" -hide_banner -loglevel error -r 30 -f rawvideo -pix_fmt rgba -s 332x192 -i - -threads 0 -y -filter_complex "split=2 [a] [b]; [a] palettegen [pal]; [b] [pal] paletteuse" output/captures/capture_readme_gif_0000.gif
[rawvideo @ 0x564e09c38d40] Invalid buffer size, packet size 253952 < expected frame_size 254976
[vist#0:0/rawvideo @ 0x564e09bf6d80] [dec:rawvideo @ 0x564e09c38440] Error submitting packet to decoder: Invalid argument
Trace/breakpoint trap (core dumped) ./imgui_test_suite
# "/usr/bin/ffmpeg" -hide_banner -loglevel error -r 30 -f rawvideo -pix_fmt rgba -s 312x393 -i - -threads 0 -y -filter_complex "split=2 [a] [b]; [a] palettegen [pal]; [b] [pal] paletteuse" output/captures/capture_faq_idstack_gif_0000.gif
[rawvideo @ 0x55fd9ed18540] Invalid buffer size, packet size 488640 < expected frame_size 490464
[vist#0:0/rawvideo @ 0x55fd9ecd6580] [dec:rawvideo @ 0x55fd9ed17c40] Error submitting packet to decoder: Invalid argument
Trace/breakpoint trap (core dumped) ./imgui_test_suite