@@ -12,15 +12,22 @@ binary CLI.
1212** Key features:**
1313
1414- Unity-style assertion macros (full set: INT, HEX, FLOAT, STRING, MEMORY, ARRAY)
15- - Header-only function mocks (MOCK_DEFINE / MOCK_EXPECT _ * / MOCK_VERIFY)
15+ - Header-only function mocks with argument matchers, callbacks, throw, return-thru-ptr
1616- Try / Catch / Throw exception handling
1717- Virtual peripherals: SPI, UART, GPIO, ADC (stateful, register-bank backed)
18- - On-target execution support (same source builds for host SIL and MCU PIL)
19- - Pluggable trace transport (ITM, RTT, UART, host-printf, ring-buffer)
18+ - On-target execution support — same source compiles for host SIL and Cortex-M PIL
19+ (see [ ` examples/cortex_m/ ` ] ( examples/cortex_m/README.md ) for a QEMU runner)
20+ - Pluggable trace transport: host-printf, UART, RTT, ITM, semihosting, ring-buffer
21+ - Parametric ` TEST_CASE(...) ` annotations + property-based ` TEST_PROPERTY `
22+ - Snapshot / golden-byte assertions for protocol & codec tests
23+ - Deterministic test order shuffle (` --shuffle --seed ` ) for flake hunting
2024- Auto test discovery + runner generation (` ceedless test ` )
21- - gcov coverage, JUnit XML output, file-watch mode
25+ - gcov coverage, JUnit XML + TAP output, HTML aggregate report
26+ - Sanitizer flag passthrough (` --asan/--ubsan/--msan ` ) and ` ceedless fuzz `
27+ libFuzzer harness generator
28+ - Build integrations: GNU Make, ** CMake** (` add_ceedless_test ` ), ** PlatformIO**
2229
23- Zero dynamic allocation. ~ 1500 LOC of portable C11.
30+ Zero dynamic allocation in the core . ~ 2000 LOC of portable C11.
2431
2532---
2633
@@ -52,6 +59,57 @@ OK: negative test failed as expected
5259ceedless: 1/1 test programs passed
5360```
5461
62+ ### CMake
63+
64+ ``` cmake
65+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
66+ set(CEEDLESS_HOME "${CMAKE_SOURCE_DIR}/external/ceedless")
67+ include(ceedless)
68+
69+ enable_testing()
70+ add_ceedless_test(test_packet
71+ SOURCES test/test_packet.c src/packet.c
72+ INCLUDE include
73+ )
74+ ```
75+
76+ Run with ` cmake -B build && ctest --test-dir build --output-on-failure ` .
77+
78+ ### Parametric tests
79+
80+ ``` c
81+ TEST_CASE (0 , 0 , 0 )
82+ TEST_CASE (1 , 2 , 3 )
83+ TEST_CASE (-5 , 5 , 0 )
84+ static void test_add (int a, int b, int expected)
85+ {
86+ TEST_ASSERT_EQUAL_INT(expected, a + b);
87+ }
88+ ```
89+
90+ The runner generator emits one `RUN_TEST_CASE` call per `TEST_CASE` line —
91+ no manual dispatch needed.
92+
93+ ### Property-based tests
94+
95+ ```c
96+ TEST_PROPERTY(x, 256, {
97+ uint32_t y = ceedless_rand_u32();
98+ TEST_ASSERT_EQUAL_UINT32(x + y, y + x);
99+ });
100+ ```
101+
102+ Use ` --seed N ` (or ` CEEDLESS_SEED=N ` ) for reproducible failures.
103+
104+ ### Cortex-M PIL
105+
106+ ``` bash
107+ cd examples/cortex_m && make qemu
108+ ```
109+
110+ Runs the same assertion suite on an ARM Cortex-M3 under QEMU with
111+ semihosting output. See [ ` examples/cortex_m/README.md ` ] ( examples/cortex_m/README.md ) .
112+
55113---
56114
57115## Layout
0 commit comments