@@ -58,6 +58,33 @@ cmake --build .
5858sudo cmake --install .
5959```
6060
61+ ## Helper Scripts
62+
63+ The project includes several helper scripts for common tasks:
64+
65+ - ** ` rebuild.sh ` ** - Clean and rebuild the entire project from scratch
66+ - ** ` run_demos.sh ` ** - Execute all demo programs sequentially with detailed output and summary
67+ - ** ` run_tests.sh ` ** - Run all test executables with summary reporting (use ` --detailed ` for full output)
68+ - ** ` build_docs.sh ` ** - Generate Doxygen documentation in HTML format
69+
70+ Usage examples:
71+ ``` bash
72+ # Quick rebuild
73+ ./rebuild.sh
74+
75+ # Run all demos with colored output
76+ ./run_demos.sh
77+
78+ # Run tests with summary only
79+ ./run_tests.sh
80+
81+ # Run tests with detailed output
82+ ./run_tests.sh --detailed
83+
84+ # Generate documentation
85+ ./build_docs.sh
86+ ```
87+
6188## CMake Options
6289
6390- ` UTEST_BUILD_DEMO ` : Build the demo project (ON by default)
@@ -139,24 +166,68 @@ See tests in "tests" subdirectory and the "demo" directory for more examples.
139166
140167## Demo Project
141168
142- The demo project demonstrates various aspects of the library:
143- - Basic assertions (equality, true/false)
144- - Assertions with custom error messages
145- - Testing exceptions
146- - Complex test scenarios with collections
169+ The demo project demonstrates various aspects of the library across multiple executable demos:
170+
171+ ### Available Demos
172+
173+ #### 1. Core Features Demo (` utest_demo ` )
174+ - ** File** : ` demo_core_features.cpp `
175+ - ** Executable** : ` ./bin/utest_demo `
176+ - ** Features demonstrated** :
177+ - Basic assertions (equality, true/false)
178+ - Assertions with custom error messages
179+ - Exception testing with lambda functions
180+ - Complex test scenarios with collections and vectors
181+ - String comparisons and container operations
182+
183+ #### 2. Unicode Checkmarks Demo (` demo_unicode_checkmarks ` )
184+ - ** File** : ` demo_unicode_checkmarks.cpp `
185+ - ** Executable** : ` ./bin/demo_unicode_checkmarks `
186+ - ** Features demonstrated** :
187+ - Default Unicode checkmark output format
188+ - Test grouping with ` UTEST_FUNC_DEF2 ` syntax
189+ - Multiple grouped test scenarios
190+ - Various assertion types (GT, GTE, NEQ, etc.)
191+
192+ #### 3. Verbose Mode Demo (` demo_verbose_mode ` )
193+ - ** File** : ` demo_verbose_mode.cpp `
194+ - ** Executable** : ` ./bin/demo_verbose_mode `
195+ - ** Features demonstrated** :
196+ - Verbose output mode showing test names before execution
197+ - Performance timing measurements
198+ - Grouped test organization and display
199+ - Test progress tracking
200+
201+ #### 4. Failure Handling Demo (` demo_with_failure ` )
202+ - ** File** : ` demo_with_failure.cpp `
203+ - ** Executable** : ` ./bin/demo_with_failure `
204+ - ** Features demonstrated** :
205+ - Intentional test failures for error reporting demonstration
206+ - Comprehensive error messages with file/line information
207+ - Mixed passing and failing tests in the same runner
208+ - Error handling and exit code behavior
209+
210+ #### 5. No Tests Scenario Demo (` demo_no_tests ` )
211+ - ** File** : ` demo_no_tests.cpp `
212+ - ** Executable** : ` ./bin/demo_no_tests `
213+ - ** Features demonstrated** :
214+ - Behavior when no tests are registered or executed
215+ - Default failure handling for empty test suites
216+ - Use of ` UTEST_ALLOW_EMPTY_TESTS() ` for conditional testing
147217
148218To run all demos:
149219``` bash
150220mkdir _build && cd _build
151221cmake ..
152222cmake --build .
153- ./run_all_demos .sh
223+ ./run_demos .sh
154224```
155225
156226To run individual demos:
157227``` bash
158228./bin/utest_demo # Core features demo
159- ./bin/demo_unicode_checkmarks # Unicode checkmarks demo
229+ ./bin/demo_unicode_checkmarks # Unicode checkmarks demo
230+ ./bin/demo_verbose_mode # Verbose mode demo
160231./bin/demo_with_failure # Failure handling demo
161232./bin/demo_no_tests # No tests scenario demo
162233```
@@ -208,7 +279,7 @@ make: *** [Makefile:84: test] Error 8
208279
209280### Configuration Macros
210281- ` UTEST_ALLOW_EMPTY_TESTS() ` - Allow test runner to succeed even when no tests are run
211- - ` UTEST_USE_ASCII_CHECKMARKS() ` - Use ASCII [ OK] /[ FAIL] instead of Unicode ✓/✗
282+ - ` UTEST_USE_ASCII_CHECKMARKS() ` - Use ASCII [ OK] /[ FAIL] instead of Unicode checkmarks
212283- ` UTEST_SHOW_PERFORMANCE() ` - Enable performance timing for each test
213284- ` UTEST_ENABLE_VERBOSE_MODE() ` - Show test names before execution (useful for debugging)
214285
@@ -246,9 +317,9 @@ make: *** [Makefile:84: test] Error 8
246317
247318## Build Organization
248319
249- The build system now organizes binaries into dedicated subdirectories:
320+ The build system organizes binaries into dedicated subdirectories:
250321- Main demo: ` bin/utest_demo `
251- - Additional demos: ` bin/demo_with_failure ` , ` bin/demo_no_tests `
322+ - Additional demos: ` bin/demo_unicode_checkmarks ` , ` bin/demo_verbose_mode ` , ` bin/ demo_with_failure` , ` bin/demo_no_tests `
252323- Tests: ` bin/tests/test_* `
253324
254325## Handling No Tests Scenario
@@ -290,8 +361,8 @@ UTEST_FUNC2(ModuleA, Feature2);
290361In the test summary, tests with the same group name will be displayed together:
291362```
292363ModuleA:
293- ✓ Feature1
294- ✓ Feature2
364+ [ OK ] Feature1
365+ [ OK ] Feature2
295366```
296367
297368### Performance Timing
@@ -306,7 +377,7 @@ UTEST_EPILOG();
306377
307378Output will show timing information:
308379```
309- ✓ Test [my_test] succeeded (1.234ms)
380+ [OK] Test [my_test] succeeded (1.234ms)
310381```
311382
312383### Verbose Mode
@@ -322,21 +393,21 @@ UTEST_EPILOG();
322393Output will show test names before execution:
323394```
324395Running test: my_test
325- ✓ Test [ my_test] succeeded (1.234ms)
396+ [ OK ] Test [ my_test] succeeded (1.234ms)
326397```
327398
328399For grouped tests:
329400```
330401Running test: GroupName::TestName
331- ✓ Test [ GroupName::TestName] succeeded (1.234ms)
402+ [ OK ] Test [ GroupName::TestName] succeeded (1.234ms)
332403```
333404
334405### ASCII Checkmarks
335406For environments that don't support Unicode characters:
336407
337408```cpp
338409UTEST_PROLOG();
339- UTEST_USE_ASCII_CHECKMARKS(); // Use [OK]/[FAIL] instead of ✓/✗
410+ UTEST_USE_ASCII_CHECKMARKS(); // Use [OK]/[FAIL] instead of Unicode checkmarks
340411UTEST_FUNC(my_test);
341412UTEST_EPILOG();
342413```
0 commit comments