@micro-os-plus/micro-test-plus 3.3.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +412 -2
  2. package/CMakeLists.txt +134 -28
  3. package/README.md +3 -2
  4. package/config/xcdl-build.json +11 -4
  5. package/include/micro-os-plus/micro-test-plus/README.md +6 -0
  6. package/include/micro-os-plus/micro-test-plus/deferred-reporter.h +267 -0
  7. package/include/micro-os-plus/micro-test-plus/detail.h +272 -1425
  8. package/include/micro-os-plus/micro-test-plus/exceptions.h +125 -0
  9. package/include/micro-os-plus/micro-test-plus/expression-formatter.h +669 -0
  10. package/include/micro-os-plus/micro-test-plus/function-comparators.h +15 -7
  11. package/include/micro-os-plus/micro-test-plus/inlines/{details-inlines.h → deferred-reporter-inlines.h} +66 -44
  12. package/include/micro-os-plus/micro-test-plus/inlines/detail-inlines.h +711 -0
  13. package/include/micro-os-plus/micro-test-plus/inlines/exceptions-inline.h +137 -0
  14. package/include/micro-os-plus/micro-test-plus/inlines/{test-reporter-inlines.h → expression-formatter-inlines.h} +232 -198
  15. package/include/micro-os-plus/micro-test-plus/inlines/function-comparators-inlines.h +24 -20
  16. package/include/micro-os-plus/micro-test-plus/inlines/literals-inlines.h +50 -31
  17. package/include/micro-os-plus/micro-test-plus/inlines/math-inlines.h +25 -19
  18. package/include/micro-os-plus/micro-test-plus/inlines/operators-inlines.h +275 -0
  19. package/include/micro-os-plus/micro-test-plus/inlines/reflection-inlines.h +39 -21
  20. package/include/micro-os-plus/micro-test-plus/inlines/reporter-inlines.h +205 -0
  21. package/include/micro-os-plus/micro-test-plus/inlines/runner-inlines.h +151 -0
  22. package/include/micro-os-plus/micro-test-plus/inlines/runner-totals-inlines.h +152 -0
  23. package/include/micro-os-plus/micro-test-plus/inlines/test-inlines.h +555 -0
  24. package/include/micro-os-plus/micro-test-plus/inlines/timings-inlines.h +120 -0
  25. package/include/micro-os-plus/micro-test-plus/inlines/type-traits-inlines.h +231 -0
  26. package/include/micro-os-plus/micro-test-plus/inlines/utility-inlines.h +126 -0
  27. package/include/micro-os-plus/micro-test-plus/literals.h +12 -17
  28. package/include/micro-os-plus/micro-test-plus/math.h +14 -6
  29. package/include/micro-os-plus/micro-test-plus/operators.h +53 -209
  30. package/include/micro-os-plus/micro-test-plus/reflection.h +8 -4
  31. package/include/micro-os-plus/micro-test-plus/{test-reporter-basic.h → reporter-human.h} +80 -74
  32. package/include/micro-os-plus/micro-test-plus/{test-reporter-tap.h → reporter-tap.h} +77 -71
  33. package/include/micro-os-plus/micro-test-plus/reporter.h +619 -0
  34. package/include/micro-os-plus/micro-test-plus/runner-totals.h +250 -0
  35. package/include/micro-os-plus/micro-test-plus/runner.h +472 -0
  36. package/include/micro-os-plus/micro-test-plus/test.h +1013 -0
  37. package/include/micro-os-plus/micro-test-plus/timings.h +363 -0
  38. package/include/micro-os-plus/micro-test-plus/type-traits.h +223 -577
  39. package/include/micro-os-plus/micro-test-plus/utility.h +136 -0
  40. package/include/micro-os-plus/micro-test-plus.h +42 -236
  41. package/meson.build +11 -6
  42. package/package.json +11 -3
  43. package/src/deferred-reporter.cpp +137 -0
  44. package/src/expression-formatter.cpp +289 -0
  45. package/src/reflection.cpp +97 -0
  46. package/src/reporter-human.cpp +816 -0
  47. package/src/reporter-tap.cpp +772 -0
  48. package/src/reporter.cpp +481 -0
  49. package/src/runner-totals.cpp +98 -0
  50. package/src/runner.cpp +669 -0
  51. package/src/test.cpp +503 -0
  52. package/src/timings.cpp +210 -0
  53. package/src/utility.cpp +163 -0
  54. package/.cmake-format.yaml +0 -11
  55. package/include/micro-os-plus/micro-test-plus/inlines/micro-test-plus-inlines.h +0 -313
  56. package/include/micro-os-plus/micro-test-plus/inlines/test-suite-inlines.h +0 -115
  57. package/include/micro-os-plus/micro-test-plus/test-reporter.h +0 -846
  58. package/include/micro-os-plus/micro-test-plus/test-runner.h +0 -281
  59. package/include/micro-os-plus/micro-test-plus/test-suite.h +0 -492
  60. package/src/micro-test-plus.cpp +0 -316
  61. package/src/test-reporter-basic.cpp +0 -466
  62. package/src/test-reporter-tap.cpp +0 -530
  63. package/src/test-reporter.cpp +0 -399
  64. package/src/test-runner.cpp +0 -311
  65. package/src/test-suite.cpp +0 -304
package/CHANGELOG.md CHANGED
@@ -6,10 +6,420 @@ Please check
6
6
  [GitHub](https://github.com/micro-os-plus/micro-test-plus-xpack/issues/)
7
7
  and close existing issues and pull requests.
8
8
 
9
+ ## 2026-05-11
10
+
11
+ * v4.1.0 published on npmjs.com
12
+ * 353d2a1 CmakeLists.txt add CXX
13
+ * 68c840b CMake cosmetics in comments
14
+ * 6ba1ac4 CMakeLists.txt duplicate fix
15
+ * 4ea4a84 website doxygen update
16
+ * 5810287 prepare v4.1.0
17
+ * 496bf98 re-generate website commons
18
+ * 4f3a2b9 use local cmake-format & reformat
19
+
20
+ ## 2026-05-10
21
+
22
+ * fe8d5ac use local clang-format & reformat
23
+ * 9239eca #31: move the top default suite name to initialise()
24
+ * 478a667 website/package*.json update
25
+ * d69a6be re-generate website commons
26
+ * 7e0d3f9 config.doxyfile: add EXCLUDE_PATTERNS
27
+ * 86596a2 update .dox files to remove repetitions
28
+ * dded41a copilot-instructions.md update
29
+ * fbe0cd9 detail.h: add @details
30
+
31
+ ## 2026-05-09
32
+
33
+ * 597515f website update
34
+ * 88dd73c detail::indent_t
35
+ * a835441 doxygen update
36
+ * a903306 cleanups for includes
37
+ * 8a6ab9f cmake: disable coverage
38
+ * d4216c5 #28: fix circular dependency
39
+ * 8004f37 #28: more includes reworks
40
+
41
+ ## 2026-05-08
42
+
43
+ * 5b55e3f #28: more inlines fixed, only test-inlines.h remaining
44
+ * 9dd8012 fix illegal character
45
+ * 26675c5 #30: Move internal classes to details namespace
46
+ * cbf8e4c extract exceptions-inline.h
47
+ * fbca56c remove nodiscard from definitions
48
+ * 4ed019a #29: Extract expression formatting code from reporter
49
+ * 9b1369d Merge branch 'xpack-development' of https://github.com/micro-os-plus/micro-test-plus-xpack into xpack-development
50
+ * 4ef8a04 #29: Extract expression formatting code from reporter
51
+ * c9bf9b1 #29: Extract expression formatting code from reporter
52
+
53
+ ## 2026-05-07
54
+
55
+ * d25e887 #28: Re-organise inlines
56
+
57
+ ## 2026-05-06
58
+
59
+ * 5c2c832 tests: use add_compile_common_private_options
60
+ * 404fdd2 test-inlines.h: silence warning
61
+ * ee30572 re-generate commons
62
+ * ab9c415 re-generate top commons
63
+ * e8f23ee #27: Split definitions from declarations
64
+ * f6aaa8a tests: use add_compile_common_private_options
65
+
66
+ ## 2026-05-04
67
+
68
+ * 536e327 website update
69
+
70
+ ## 2026-04-30
71
+
72
+ * aca5767 platforms/native: remove -stdlib=libc++ from non clang
73
+ * 0cef14e more guards & guard cosmetics
74
+ * e15b6d7 guard include diag/trace.h
75
+ * 0ad8f72 tests: include platform.h
76
+ * 8775c7f website user update
77
+ * 953cc21 includes: add guard to prevent direct includes
78
+
79
+ ## 2026-04-29
80
+
81
+ * 8f330f5 re-generate tests commons
82
+ * 7c3b63d fix again blog autoformat
83
+ * e2ddd82 website updates
84
+ * f9a1b1a website: update last blog posts
85
+ * 730a42c website: add link to TAP
86
+ * 08aeb97 website: fix blog posts code block
87
+ * 88273bf .vscode/settings.json: do not reformat mdx
88
+ * 88107e3 re-generate website commons
89
+ * 14309a9 website: blog post release 4.0.0 published
90
+ * 07f01d3 blog posts cosmetics
91
+ * 6e72885 4.0.0
92
+ * cfd4b34 CHANGELOG: publish npm v4.0.0
93
+ * v4.0.0 published on npmjs.com
94
+ * 1105af3 re-format
95
+ * ac64933 CHANGELOG update for v4.0.0
96
+ * bdb8f37 workflow update
97
+ * v4.0.0 prepared
98
+ * 1bec407 website update
99
+ * 4015c5b remove website/static/.gitignore
100
+ * 4219430 #26: remove variables templates, use concepts
101
+
102
+ ## 2026-04-27
103
+
104
+ * febd39a more doxygen comments
105
+
106
+ ## 2026-04-25
107
+
108
+ * 5b35a79 website update
109
+
110
+ ## 2026-04-24
111
+
112
+ * 0772248 remove code-review.md
113
+ * a983f70 fix doxygen. remove @defgroup micro-test-plus-config
114
+
115
+ ## 2026-04-21
116
+
117
+ * 5456f4d reporter.h: fix verbosity() return type
118
+ * c848bad add comments with explanations
119
+ * 5280cf8 doxygen updates
120
+ * 5981d7c detail.h: auto get()
121
+ * e7016eb math.h: add more noexcept
122
+ * d7ac669 math-inlines.h: add static_asserts
123
+ * a1584b5 operators.h: heterogenous container operators
124
+ * b7498d4 reporter.h: remove verbosity_t
125
+ * 47e497b deferred-reporter-inlines.h: static_assert buffer size
126
+ * cc5e566 deferred-reporter: reference to location
127
+ * 4d0d7f4 micro-test-plus.h: add Doxygen config section
128
+ * 5db7865 runner.cpp: copy argvs
129
+ * ddfe9f1 type-traits.h: more cosmetics
130
+ * 29c2c82 type-traits.h: value_base_ used consistently
131
+ * d34ce29 type-traits.h reorder concepts
132
+ * 52b9c16 add type_traits::printable
133
+ * 5189513 add is_op and checkable concepts
134
+ * aaadf34 add type_traits::any_op
135
+ * 1d0a231 detail.h: extract common binary_op_ & co
136
+
137
+ ## 2026-04-20
138
+
139
+ * 3ba1539 README update
140
+ * f1cd9c7 runner.cpp: validate reporter initialised
141
+ * 5fafa76 website update - no concepts ref yet
142
+
143
+ ## 2026-04-17
144
+
145
+ * 98e0f4d website/doxygen updates
146
+ * 2edb5bb doxygen examples update
147
+ * 7434174 split exceptions.h and utility.h
148
+ * d3646d6 sample-test update ts
149
+ * 9897a58 doxygen comments updated
150
+ * f641190 copilot-instructions.md update
151
+
152
+ ## 2026-04-16
153
+
154
+ * d1c27e2 tests: update platforms without exceptions
155
+ * fc71cf6 cortex-a72: noexcept
156
+ * 505edd2 compare-files.sh: reverse diff order
157
+ * aacfa73 reporter: confirm written output file.
158
+ * acc8fb1 platforms: add compare to qemu tests
159
+ * 17e52a5 compare-files.sh exit if missing files
160
+ * b41c0c1 cortex-m0: add compare test
161
+ * 9fb3604 reporter.cpp: fix double link on mingw
162
+ * 7e5f9b4 compare-files.sh update sed
163
+ * 6ce71a8 reporter-inlines.h print long double on mingw
164
+ * 95474b7 reporter-inlines.h print long double on mingw
165
+ * 0a9376e reporter-inlines.h print long double on mingw
166
+ * 57194e3 reporter-inlines.h print long double via snprintf
167
+ * 0405cb6 platforms cmake objects explanations
168
+ * 027fe7c top CMakeLists.txt re-work OBJECTS
169
+ * 83a0dc9 cmake rename xpack_global_common_options
170
+ * ca04d0f platforms compile options for micro-test-plus-objects
171
+ * f79e4eb adjust timings for testing
172
+
173
+ ## 2026-04-15
174
+
175
+ * b87ae24 add clang coverage to native
176
+ * b646da4 unit-tests: add more tests
177
+ * 7eaa090 CMakeLists.txt: add micro-test-plus-objects
178
+ * 111067e project-functions.cmake: use micro-test-plus-objects
179
+ * e40981e common-functions.cmake: add coverage functions
180
+ * 840eba3 timings.h: add has_begin and has_end
181
+
182
+ ## 2026-04-14
183
+
184
+ * 5c59ecb reporter-tap.cpp: fix suite summary
185
+ * 2a705db compare-files.sh update
186
+ * 7bbcf79 more #if defined(__GNUC__)
187
+ * d69cffc rename compare-files.sh
188
+ * 8f3ea5e compare-tap-files.sh updates
189
+ * 6a01d04 #25: implement --output-file for the human reporter
190
+ * 75074d8 reporter-tap.cpp cosmetise messages \n
191
+ * b28b3eb #25: implement --output-file for the human reporter
192
+ * 71215d3 fix own_index after sort
193
+ * e768f02 utility.cpp: avoid unsafe buffer
194
+ * 3c0efcd utility: add extract_file_name()
195
+ * 6ffb82b runner.cpp: rework sort without aggregate return
196
+ * 9a6e461 more #if defined(__GNUC__)
197
+ * 205a0e4 silence warnings
198
+ * ff4d28c reorder pragmas
199
+ * 4858d46 sort suites
200
+ * caef2b0 sort suites
201
+ * 43898b5 sort suites
202
+
203
+ ## 2026-04-13
204
+
205
+ * 3536099 split unit-test
206
+
207
+ ## 2026-04-12
208
+
209
+ * 88c6837 fix cmake a72 syntax
210
+ * 82a5dc9 tests-ci add a72
211
+ * 3a4abb7 tests TRACE buffer 512
212
+
213
+ ## 2026-04-11
214
+
215
+ * 120d6c6 use -Og for aarch64 debug
216
+ * c1c8563 unit-test fix float tests
217
+ * 1dbc1fb tests/pacakge.json: bump deps
218
+ * e79e520 remove commented out pragmas
219
+ * 1f15f59 compare-tap-files.sh: support mingw pointers without 0x
220
+ * b615252 reporter-human.cpp: fix missing subtest begin
221
+ * 97a9cfd utility-inlines.h silence warning
222
+ * 6f8c883 rename utility-inlines.h
223
+ * 58d8b60 move doxygen to test-inlines.h
224
+ * aba22eb move exception functions to function-comparators-inlines.h
225
+
226
+ ## 2026-04-10
227
+
228
+ * e654cd7 add more unit tests
229
+ * 05591ee add more unit tests
230
+ * 7485915 code-review.md update
231
+ * d1a6efd reporter-tap.cpp: use trace::printf
232
+ * 2b6c39a reporter-human.cpp: cleanup
233
+ * f5822a6 reporter-tap.cpp: use trace::printf
234
+ * 0f895d8 runner.h: do not include ctime
235
+ * 4ac2eed test.cpp: explain that subtests do not record the time.
236
+ * 2f206b5 test-inlines.h: explain why nullptr passed
237
+ * 25847e9 deferred-reporter-inlines.h: clear includes
238
+ * 97e63b2 reporter-inlines.h: fix explnation (nil) on linux
239
+ * 52233c8 test.cpp: clarify emplanation
240
+ * ea345bb runner.cpp: cosmetics (british english)
241
+ * b0cca8a reporter: simplify constructor verbosity_
242
+ * f839318 fix trace::puts
243
+ * c724549 timings.cpp: add precondition assert
244
+ * aff7d92 tests/assets/tap update
245
+ * ffe7cbd compare-tap-files.sh update sed time
246
+ * ebce825 use stderr for warnings and errors
247
+ * fd109c2 use trace::printf
248
+ * 50f4d20 #if defined(MICRO_OS_PLUS_TRACE)
249
+ * 4f70a41 test-inlines.h: rename child_subtest
250
+ * de6a36e runner-inlines.h: rename child_suite
251
+ * a132531 remove commented out includes
252
+ * e531413 rename protected append_number_
253
+ * 5f72b25 runner.h: remove useless suite_index_
254
+ * 3112ede runner.cpp: avoid shadow exit_code
255
+ * a603afb rename parameters suffixed with underscore
256
+ * d8b721f remove tests code-review.md
257
+ * 2cb079b end protected with underscore
258
+ * ea4b203 test-inlines.h initialise unsed callable to nullptr
259
+ * c384d80 reporters flush before abort
260
+ * 49f5e2f utility.cpp: explain complexity
261
+ * cc4e200 runner.cpp: name ot "runner"
262
+ * d805891 reporter.h: remove unused verbosity_t
263
+ * dab4c34 include c++ headers
264
+ * 2661a41 reporter: explain why write_buffer_to_stdout is public
265
+ * 3300421 runner-totals += noexcept
266
+ * d0f8e85 reporter-human.cpp: write warning on stderr
267
+ * a924f5d argvs vector constructor with cast
268
+ * 142ef0d deferred-reporter.h apply the rule of five
269
+ * dd97f1d flush() also the output file
270
+ * 5942653 test abort() calls runner abort
271
+ * dee289c reporter.h: make flush() public
272
+ * 49c3c25 detail.h: ne_ fix >= lhs_.epsilon
273
+ * 36ad478 comment out includes
274
+ * 39b739b test.cpp re-enable pragmas
275
+ * 0e86cdb split reflection.cpp and utility.cpp
276
+ * 859f4e2 comment out more pragmas
277
+ * a8c8629 cmake: show size for native
278
+
279
+ ## 2026-04-09
280
+
281
+ * d23c1af enable tracing in native minimal test
282
+ * c1d824f add noexcept where needed
283
+ * 59a3c26 add time back to file tap reports
284
+ * 8642897 reporter: bring version back to info
285
+ * 670cda9 timings: rework with optional and uint32_t
286
+ * 5a51a06 move timings to suite & runner
287
+ * 16a35e2 compare-tap-files.sh: sed hex pointers
288
+ * 0360ddc unit-test: add missing description
289
+ * 0387ab1 move static_children_suites_ to static_runner
290
+ * 0b12359 commented out cmake unit-test verbose
291
+ * da23740 fix printing long double
292
+ * 91d49a9 #24: reporter-human.cpp: use colour only if a tty
293
+ * 94fa902 Null pointers should be rendered as 0x0
294
+
295
+ ## 2026-04-08
296
+
297
+ * c43dbff #23: add test code to compare tap files
298
+ * 971b706 tests cosmetics
299
+ * 3ca668a more consistent totals
300
+ * d61fdc1 #22: argvs as vector of string_view
301
+ * fa54491 platform README update
302
+ * 3f22c35 cosmetics "error:"
303
+ * 3e4c10e use --reporter human for unit-tests
304
+
305
+ ## 2026-04-07
306
+
307
+ * b973f93 make totals & timings protected
308
+ * c7bf95c rename runner_ to avoid -Wshadow
309
+ * 6084289 reporter operator<< forwarding reference
310
+ * b23e68b replace strncmp with string_view.starts_with
311
+ * a5db50b reporter-inlines.h cleanups
312
+ * 754bc05 type-traits.h more const
313
+ * 195f102 container_like requires const
314
+ * a04cfa9 remove redundant reporter::operator<<(char* s)
315
+ * 1d1196e fix reporter::operator<<(const T& t) recursion
316
+ * a19af57 deferred-reporter-inlines.h silence warning
317
+ * 799dc0d improve deferred_reporter_base::operator<<
318
+ * 56a4831 detail.h replace get_impl. with concept
319
+ * a6369fb implement iterative math::pow
320
+ * d43e039 type-traits.himprove has_npos
321
+ * 8c2669d re-enable operator<< (const T& t)
322
+ * 3894fda type-traits.h cleanup value<T, Opt>
323
+ * 0c2a67c fix deferred_reporter_b char
324
+ * 8ec9b23 `requires_` / `requires_t` replaced with c++20 requires
325
+ * a913784 use std::is_base_of_v
326
+ * e6182a6 use std::is_convertible_v
327
+ * 9516a88 use concept container_like & other
328
+ * 7785b9a detail.h private members
329
+ * 6a28693 rename not_.operand()
330
+ * 7bfee0e reporter operators consistently use append_number
331
+ * 6226989 silence warning in reporter
332
+ * 82fbfc0 detail.h cosmetics
333
+ * 8207330 remove more constexpr
334
+ * 241275c replace strrchr with string_view
335
+ * 1d510cb avoid problematic strncat in reporter
336
+ * 5c0e7c2 fix reflection::type_name()
337
+ * 4f720d2 use consteval in math
338
+ * 4e618fb use std::declval
339
+ * 321dc0d use c++ loops in runner
340
+ * ceeb3c6 fix redundant has_static_suites_ guard
341
+ * 5892cba inline was_successful ()
342
+ * 722c9d4 use std::to_chars in reporter operators
343
+ * a967e64 non static epsilon
344
+ * 759017e add [[likely]]
345
+ * d58e613 switch sfinae to concepts
346
+ * 17448ba using verbosity_t
347
+ * a6711bd buffer_.reserve(128)
348
+ * 04f20e5 optimise to std::to_chars
349
+ * f3c772c disable timestamps for subtests
350
+ * 5f7f8a1 remove duplicate name_ = name;
351
+ * 5ece91a inline constexpr colors
352
+ * 469f7e3 #21: fix abort location
353
+ * d8a1599 #21: add location to runner.abort()
354
+ * af580c1 remove some unused methods
355
+ * 9503e4d change some methods to protected
356
+ * 137a487 add more const to methods
357
+ * 7b48b60 micro-test-plus.h remove top expect & assume
358
+ * 2453113 remove useless constexpr specifiers from methods
359
+ * e41e2c8 remove redundant name() from runner
360
+ * cf57e92 #17 fix more warnings
361
+ * e67e3e2 #17 fix more warnings
362
+ * 98e5c2b #17 fix more warnings
363
+ * 609bf05 #17 fix more warnings
364
+ * a9d34d4 #17: add --output-file
365
+
366
+ ## 2026-04-06
367
+
368
+ * bcb18cf move verbosity processing to reporter
369
+ * e38f299 rename add_empty_line_
370
+ * edf3097 config.h cosmetics
371
+ * 53f1a7e Merge branch 'xpack-development' of https://github.com/micro-os-plus/micro-test-plus-xpack into xpack-development
372
+ * 15cc731 cosmetics
373
+ * 33e4753 MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS
374
+ * 554c5bb update trace messages
375
+
376
+ ## 2026-04-05
377
+
378
+ * 0df2ed3 update trace messages
379
+ * 143e563 use smart pointers in timings
380
+ * b6df491 store smart pointers inside children_subtests_
381
+ * 6629734 use smart pointers inside children_suites_
382
+ * 1d87188 runner.h: fix constexpr
383
+ * f2db8e2 make children_suites_ an object, no pointer
384
+ * 06909b0 make reporter_ a smart pointer
385
+ * 3c47909 make top_suite an object, no pointer
386
+ * 7d27fe5 make top_suite_ a unique pointer
387
+ * 78338ca #19: re-work test objects hierarchy
388
+
389
+ ## 2026-04-04
390
+
391
+ * 2ac0dce unit-test updated to new objects
392
+ * e5c13ec suite-test cosmetics
393
+ * 44425f7 cosmetics
394
+ * c867188 #20: rename human reporter
395
+
396
+ ## 2026-04-03
397
+
398
+ * 0c8d363 suite-test silence warning
399
+ * 13e75fc reporter-basic.cpp cosmetics
400
+ * 6e921f8 #19 unify suites with tests
401
+
402
+ ## 2026-03-31
403
+
404
+ * 3fb45b3 reporter: rename begin/end_session
405
+ * 03bfb73 rename runner & static_runner
406
+ * 0008c25 test: silence diagnostics
407
+ * c2d8356 disable trace in native
408
+ * 86ed61b warnings silenced
409
+ * cee7519 rename *2 namespace back to micro_test_plus
410
+ * e35b654 remove the initial micro_test_plus namespace
411
+ * 1b0e26b major re-work, separate mt2 namespace
412
+
413
+ ## 2026-03-24
414
+
415
+ * 26317ce website re-generate commons
416
+ * 75e93ab website: blog post release 3.3.1 published
417
+
9
418
  ## 2026-03-23
10
419
 
11
- * v3.3.1 published on npmjs.com
12
- * v3.3.1 prepared
420
+ * e08c550 3.3.1
421
+ * 3e6dadf CHANGELOG: publish npm v3.3.1
422
+ * 5573d85 prepare v3.3.1
13
423
  * f1be263 tests: add suite-test
14
424
  * df22b28 #16: fix static inits
15
425
  * 511f8cf re-generate website commons
package/CMakeLists.txt CHANGED
@@ -22,66 +22,172 @@
22
22
  # -----------------------------------------------------------------------------
23
23
 
24
24
  # https://cmake.org/cmake/help/v3.20/
25
- cmake_minimum_required(VERSION 3.20)
25
+ cmake_minimum_required (VERSION 3.20)
26
26
 
27
- project(micro-os-plus-micro-test-plus DESCRIPTION "µTest++")
27
+ project (
28
+ micro-os-plus-micro-test-plus
29
+ DESCRIPTION "µTest++"
30
+ LANGUAGES CXX
31
+ )
28
32
 
29
- # To access the optional functions, include the
30
- # `cmake/micro-os-plus-build-helper.cmake` file from the
33
+ # To access the optional functions, include the
34
+ # `cmake/micro-os-plus-build-helper.cmake` file from the
31
35
  # `@micro-os-plus/build-helper` package.
32
36
 
33
- if(COMMAND xpack_get_package_name_and_version)
34
- xpack_get_package_name_and_version("${CMAKE_CURRENT_SOURCE_DIR}/package.json")
35
- message(VERBOSE
36
- "Processing xPack ${PACKAGE_JSON_NAME}@${PACKAGE_JSON_VERSION}..."
37
+ if (COMMAND xpack_get_package_name_and_version)
38
+ xpack_get_package_name_and_version (
39
+ "${CMAKE_CURRENT_SOURCE_DIR}/package.json"
40
+ )
41
+ message (VERBOSE
42
+ "Processing xPack ${PACKAGE_JSON_NAME}@${PACKAGE_JSON_VERSION}..."
37
43
  )
38
- endif()
44
+ endif ()
39
45
 
40
46
  # -----------------------------------------------------------------------------
41
47
 
42
- # The project library definitions.
48
+ # The interface library is the main target of this package, which consumers
49
+ # (like embedded applications) link against. It defines the public API and
50
+ # properties of the library, and compiles the sources that are part of the
51
+ # public API.
43
52
 
44
53
  # https://cmake.org/cmake/help/v3.20/command/add_library.html?highlight=interface#normal-libraries
45
- # PRIVATE: build definitions, used internally INTERFACE: usage definitions,
46
- # passed up to targets linking to it PUBLIC: both
47
- add_library(micro-os-plus-micro-test-plus-interface INTERFACE)
54
+ # Visibility keywords: PRIVATE applies to the target itself; INTERFACE passes
55
+ # properties up to targets that link against it; PUBLIC does both.
56
+ add_library (micro-os-plus-micro-test-plus-interface INTERFACE)
48
57
 
49
- target_include_directories(
58
+ target_include_directories (
50
59
  micro-os-plus-micro-test-plus-interface INTERFACE "include"
51
60
  )
52
61
 
53
- target_sources(
62
+ target_sources (
54
63
  micro-os-plus-micro-test-plus-interface
55
- INTERFACE "src/micro-test-plus.cpp" "src/test-runner.cpp"
56
- "src/test-reporter.cpp" "src/test-reporter-basic.cpp"
57
- "src/test-reporter-tap.cpp" "src/test-suite.cpp"
64
+ INTERFACE "src/runner.cpp"
65
+ "src/runner-totals.cpp"
66
+ "src/deferred-reporter.cpp"
67
+ "src/expression-formatter.cpp"
68
+ "src/reporter.cpp"
69
+ "src/reporter-human.cpp"
70
+ "src/reporter-tap.cpp"
71
+ "src/test.cpp"
72
+ "src/timings.cpp"
73
+ "src/reflection.cpp"
74
+ "src/utility.cpp"
58
75
  )
59
76
 
60
- target_compile_definitions(
61
- micro-os-plus-micro-test-plus-interface INTERFACE # None.
77
+ target_compile_definitions (micro-os-plus-micro-test-plus-interface INTERFACE)
78
+
79
+ target_compile_options (micro-os-plus-micro-test-plus-interface INTERFACE)
80
+
81
+ target_link_libraries (
82
+ micro-os-plus-micro-test-plus-interface INTERFACE micro-os-plus::diag-trace
62
83
  )
63
84
 
64
- target_compile_options(
65
- micro-os-plus-micro-test-plus-interface INTERFACE # None.
85
+ if (COMMAND xpack_display_target_lists)
86
+ xpack_display_target_lists (micro-os-plus-micro-test-plus-interface)
87
+ endif ()
88
+
89
+ # -----------------------------------------------------------------------------
90
+
91
+ # Optional OBJECT library: compiles the library sources once and shares the
92
+ # resulting object files across all test executables, rather than recompiling
93
+ # them per consumer.
94
+ #
95
+ # Include directories are managed explicitly instead of using PRIVATE linkage to
96
+ # the interface library. PRIVATE linkage would cause diag-trace's
97
+ # INTERFACE_SOURCES (trace.cpp) to be compiled into this OBJECT library via
98
+ # transitive propagation, which conflicts with the separate diag-trace
99
+ # compilation in each test executable. Consumers of this OBJECT library are
100
+ # expected to link separately to micro-os-plus::diag-trace and to the
101
+ # platform-specific trace backend.
102
+ add_library (micro-os-plus-micro-test-plus-objects OBJECT)
103
+
104
+ get_property (
105
+ micro-os-plus-micro-test-plus-includes
106
+ TARGET micro-os-plus-micro-test-plus-interface
107
+ PROPERTY INTERFACE_INCLUDE_DIRECTORIES
108
+ )
109
+ # Use PUBLIC so that the include directories are available both for the OBJECT
110
+ # library's own sources and for consumers of the library.
111
+ target_include_directories (
112
+ micro-os-plus-micro-test-plus-objects
113
+ PUBLIC ${micro-os-plus-micro-test-plus-includes}
66
114
  )
67
115
 
68
- target_link_libraries(micro-os-plus-micro-test-plus-interface INTERFACE # None.
116
+ get_property (
117
+ micro-os-plus-micro-test-plus-sources
118
+ TARGET micro-os-plus-micro-test-plus-interface
119
+ PROPERTY INTERFACE_SOURCES
120
+ )
121
+ # Use PRIVATE to avoid propagating the sources to consumers of the OBJECT
122
+ # library, which would cause duplicate symbol errors at link time.
123
+ target_sources (
124
+ micro-os-plus-micro-test-plus-objects
125
+ PRIVATE ${micro-os-plus-micro-test-plus-sources}
69
126
  )
70
127
 
71
- if(COMMAND xpack_display_target_lists)
72
- xpack_display_target_lists(micro-os-plus-micro-test-plus-interface)
73
- endif()
128
+ get_property (
129
+ micro-os-plus-micro-test-plus-compile-definitions
130
+ TARGET micro-os-plus-micro-test-plus-interface
131
+ PROPERTY INTERFACE_COMPILE_DEFINITIONS
132
+ )
133
+ # Use PRIVATE to avoid propagating compile definitions to consumers of the
134
+ # OBJECT library.
135
+ target_compile_definitions (
136
+ micro-os-plus-micro-test-plus-objects
137
+ PRIVATE ${micro-os-plus-micro-test-plus-compile-definitions}
138
+ )
139
+
140
+ get_property (
141
+ micro-os-plus-micro-test-plus-compile-options
142
+ TARGET micro-os-plus-micro-test-plus-interface
143
+ PROPERTY INTERFACE_COMPILE_OPTIONS
144
+ )
145
+ # Use PRIVATE to avoid propagating the compile options to consumers of the
146
+ # OBJECT library, which may cause conflicts with consumer-specific compile
147
+ # options.
148
+ target_compile_options (
149
+ micro-os-plus-micro-test-plus-objects
150
+ PRIVATE ${micro-os-plus-micro-test-plus-compile-options}
151
+ )
152
+
153
+ # Add the diag-trace include path in Debug without linking the diag-trace
154
+ # target: linking it would add trace.cpp as an INTERFACE_SOURCE and compile it
155
+ # into the OBJECT library, causing duplicate symbols at link time.
156
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
157
+ get_property (
158
+ micro-os-plus-diag-trace-includes
159
+ TARGET micro-os-plus::diag-trace
160
+ PROPERTY INTERFACE_INCLUDE_DIRECTORIES
161
+ )
162
+ target_include_directories (
163
+ micro-os-plus-micro-test-plus-objects
164
+ PRIVATE ${micro-os-plus-diag-trace-includes}
165
+ )
166
+ endif ()
167
+
168
+ if (COMMAND xpack_display_target_lists)
169
+ xpack_display_target_lists (micro-os-plus-micro-test-plus-objects)
170
+ endif ()
74
171
 
75
172
  # -----------------------------------------------------------------------------
76
173
 
77
174
  # Aliases.
78
175
  # https://cmake.org/cmake/help/v3.20/command/add_library.html#alias-libraries
79
- add_library(
176
+ add_library (
80
177
  micro-os-plus::micro-test-plus ALIAS micro-os-plus-micro-test-plus-interface
81
178
  )
82
- message(
179
+ message (
83
180
  VERBOSE
84
181
  "> micro-os-plus::micro-test-plus -> micro-os-plus-micro-test-plus-interface"
85
182
  )
86
183
 
184
+ add_library (
185
+ micro-os-plus::micro-test-plus-objects ALIAS
186
+ micro-os-plus-micro-test-plus-objects
187
+ )
188
+ message (
189
+ VERBOSE
190
+ "> micro-os-plus::micro-test-plus-objects -> micro-os-plus-micro-test-plus-objects"
191
+ )
192
+
87
193
  # -----------------------------------------------------------------------------
package/README.md CHANGED
@@ -15,7 +15,8 @@ For information on how to install and use this project, please refer to the
15
15
  ## Project source
16
16
 
17
17
  The source code of the current release is available on
18
- [GitHub tag v3.3.1 tree](https://github.com/micro-os-plus/micro-test-plus-xpack/tree/v3.3.1).
18
+ GitHub as [micro-os-plus/micro-test-plus-xpack](https://github.com/micro-os-plus/micro-test-plus-xpack),
19
+ the [v4.1.0](https://github.com/micro-os-plus/micro-test-plus-xpack/tree/v4.1.0) tree.
19
20
 
20
21
  ## License
21
22
 
@@ -25,4 +26,4 @@ with all rights reserved to
25
26
  [Liviu Ionescu](https://github.com/ilg-ul).
26
27
 
27
28
  The code from Boost UT is released under the terms of the
28
- [Boost Version 1.0 Software License](https://www.boost.org/LICENSE_1_0.txt).
29
+ [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
@@ -11,8 +11,8 @@
11
11
  ],
12
12
  "compilerSourceFiles": [
13
13
  "../src/micro-test-plus.cpp",
14
- "../src/test-runner.cpp",
15
- "../src/test-reporter.cpp",
14
+ "../src/runner.cpp",
15
+ "../src/reporter.cpp",
16
16
  "../src/test-suite.cpp"
17
17
  ],
18
18
  "compilerDefinitions": [],
@@ -26,7 +26,14 @@
26
26
  "valueType": "bool",
27
27
  "requires": "isEnabled('diag-trace')",
28
28
  "generatedDefinition": "MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS"
29
+ },
30
+ "trace-constructors": {
31
+ "display": "Enable trace for constructors and destructors in µTest++",
32
+ "description": "Log trace diagnostics for constructors and destructors in the µTest++ testing framework when TRACE is enabled",
33
+ "valueType": "bool",
34
+ "requires": "isEnabled('trace')",
35
+ "generatedDefinition": "MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS"
29
36
  }
30
37
  }
31
- }
32
- }
38
+
39
+ }
@@ -0,0 +1,6 @@
1
+ # Project Headers
2
+
3
+ The files in this folder are intended for internal use only. Do not include
4
+ them directly in your projects.
5
+
6
+ Instead, include the public header `<micro-os-plus/micro-test-plus.h>`.