@micro-os-plus/micro-test-plus 3.3.0 → 4.0.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 (53) hide show
  1. package/CHANGELOG.md +339 -2
  2. package/CMakeLists.txt +79 -23
  3. package/README.md +1 -1
  4. package/config/xcdl-build.json +11 -4
  5. package/include/micro-os-plus/micro-test-plus/deferred-reporter.h +292 -0
  6. package/include/micro-os-plus/micro-test-plus/detail.h +462 -1076
  7. package/include/micro-os-plus/micro-test-plus/exceptions.h +126 -0
  8. package/include/micro-os-plus/micro-test-plus/function-comparators.h +10 -7
  9. package/include/micro-os-plus/micro-test-plus/inlines/{details-inlines.h → deferred-reporter-inlines.h} +49 -22
  10. package/include/micro-os-plus/micro-test-plus/inlines/function-comparators-inlines.h +67 -4
  11. package/include/micro-os-plus/micro-test-plus/inlines/literals-inlines.h +3 -6
  12. package/include/micro-os-plus/micro-test-plus/inlines/math-inlines.h +21 -15
  13. package/include/micro-os-plus/micro-test-plus/inlines/reflection-inlines.h +35 -17
  14. package/include/micro-os-plus/micro-test-plus/inlines/{test-reporter-inlines.h → reporter-inlines.h} +176 -106
  15. package/include/micro-os-plus/micro-test-plus/inlines/{test-suite-inlines.h → runner-inlines.h} +41 -43
  16. package/include/micro-os-plus/micro-test-plus/inlines/test-inlines.h +369 -0
  17. package/include/micro-os-plus/micro-test-plus/inlines/utility-inlines.h +126 -0
  18. package/include/micro-os-plus/micro-test-plus/literals.h +4 -3
  19. package/include/micro-os-plus/micro-test-plus/math.h +9 -6
  20. package/include/micro-os-plus/micro-test-plus/operators.h +38 -44
  21. package/include/micro-os-plus/micro-test-plus/reflection.h +15 -4
  22. package/include/micro-os-plus/micro-test-plus/{test-reporter-basic.h → reporter-human.h} +72 -72
  23. package/include/micro-os-plus/micro-test-plus/{test-reporter-tap.h → reporter-tap.h} +69 -69
  24. package/include/micro-os-plus/micro-test-plus/{test-reporter.h → reporter.h} +296 -200
  25. package/include/micro-os-plus/micro-test-plus/runner-totals.h +264 -0
  26. package/include/micro-os-plus/micro-test-plus/runner.h +453 -0
  27. package/include/micro-os-plus/micro-test-plus/test.h +1069 -0
  28. package/include/micro-os-plus/micro-test-plus/timings.h +366 -0
  29. package/include/micro-os-plus/micro-test-plus/type-traits.h +239 -545
  30. package/include/micro-os-plus/micro-test-plus/utility.h +135 -0
  31. package/include/micro-os-plus/micro-test-plus.h +25 -228
  32. package/meson.build +10 -6
  33. package/package.json +1 -1
  34. package/src/deferred-reporter.cpp +118 -0
  35. package/src/reflection.cpp +95 -0
  36. package/src/reporter-human.cpp +822 -0
  37. package/src/reporter-tap.cpp +782 -0
  38. package/src/reporter.cpp +676 -0
  39. package/src/runner-totals.cpp +95 -0
  40. package/src/runner.cpp +563 -0
  41. package/src/test.cpp +496 -0
  42. package/src/timings.cpp +209 -0
  43. package/src/utility.cpp +163 -0
  44. package/.cmake-format.yaml +0 -11
  45. package/include/micro-os-plus/micro-test-plus/inlines/micro-test-plus-inlines.h +0 -313
  46. package/include/micro-os-plus/micro-test-plus/test-runner.h +0 -281
  47. package/include/micro-os-plus/micro-test-plus/test-suite.h +0 -492
  48. package/src/micro-test-plus.cpp +0 -316
  49. package/src/test-reporter-basic.cpp +0 -466
  50. package/src/test-reporter-tap.cpp +0 -530
  51. package/src/test-reporter.cpp +0 -399
  52. package/src/test-runner.cpp +0 -311
  53. package/src/test-suite.cpp +0 -304
package/CHANGELOG.md CHANGED
@@ -6,13 +6,350 @@ 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-04-29
10
+
11
+ * v4.0.0 published on npmjs.com
12
+ * 1105af3 re-format
13
+ * ac64933 CHANGELOG update for v4.0.0
14
+ * bdb8f37 workflow update
15
+ * v4.0.0 prepared
16
+ * 1bec407 website update
17
+ * 4015c5b remove website/static/.gitignore
18
+ * 4219430 #26: remove variables templates, use concepts
19
+
20
+ ## 2026-04-27
21
+
22
+ * febd39a more doxygen comments
23
+
24
+ ## 2026-04-25
25
+
26
+ * 5b35a79 website update
27
+
28
+ ## 2026-04-24
29
+
30
+ * 0772248 remove code-review.md
31
+ * a983f70 fix doxygen. remove @defgroup micro-test-plus-config
32
+
33
+ ## 2026-04-21
34
+
35
+ * 5456f4d reporter.h: fix verbosity() return type
36
+ * c848bad add comments with explanations
37
+ * 5280cf8 doxygen updates
38
+ * 5981d7c detail.h: auto get()
39
+ * e7016eb math.h: add more noexcept
40
+ * d7ac669 math-inlines.h: add static_asserts
41
+ * a1584b5 operators.h: heterogenous container operators
42
+ * b7498d4 reporter.h: remove verbosity_t
43
+ * 47e497b deferred-reporter-inlines.h: static_assert buffer size
44
+ * cc5e566 deferred-reporter: reference to location
45
+ * 4d0d7f4 micro-test-plus.h: add Doxygen config section
46
+ * 5db7865 runner.cpp: copy argvs
47
+ * ddfe9f1 type-traits.h: more cosmetics
48
+ * 29c2c82 type-traits.h: value_base_ used consistently
49
+ * d34ce29 type-traits.h reorder concepts
50
+ * 52b9c16 add type_traits::printable
51
+ * 5189513 add is_op and checkable concepts
52
+ * aaadf34 add type_traits::any_op
53
+ * 1d0a231 detail.h: extract common binary_op_ & co
54
+
55
+ ## 2026-04-20
56
+
57
+ * 3ba1539 README update
58
+ * f1cd9c7 runner.cpp: validate reporter initialised
59
+ * 5fafa76 website update - no concepts ref yet
60
+
61
+ ## 2026-04-17
62
+
63
+ * 98e0f4d website/doxygen updates
64
+ * 2edb5bb doxygen examples update
65
+ * 7434174 split exceptions.h and utility.h
66
+ * d3646d6 sample-test update ts
67
+ * 9897a58 doxygen comments updated
68
+ * f641190 copilot-instructions.md update
69
+
70
+ ## 2026-04-16
71
+
72
+ * d1c27e2 tests: update platforms without exceptions
73
+ * fc71cf6 cortex-a72: noexcept
74
+ * 505edd2 compare-files.sh: reverse diff order
75
+ * aacfa73 reporter: confirm written output file.
76
+ * acc8fb1 platforms: add compare to qemu tests
77
+ * 17e52a5 compare-files.sh exit if missing files
78
+ * b41c0c1 cortex-m0: add compare test
79
+ * 9fb3604 reporter.cpp: fix double link on mingw
80
+ * 7e5f9b4 compare-files.sh update sed
81
+ * 6ce71a8 reporter-inlines.h print long double on mingw
82
+ * 95474b7 reporter-inlines.h print long double on mingw
83
+ * 0a9376e reporter-inlines.h print long double on mingw
84
+ * 57194e3 reporter-inlines.h print long double via snprintf
85
+ * 0405cb6 platforms cmake objects explanations
86
+ * 027fe7c top CMakeLists.txt re-work OBJECTS
87
+ * 83a0dc9 cmake rename xpack_global_common_options
88
+ * ca04d0f platforms compile options for micro-test-plus-objects
89
+ * f79e4eb adjust timings for testing
90
+
91
+ ## 2026-04-15
92
+
93
+ * b87ae24 add clang coverage to native
94
+ * b646da4 unit-tests: add more tests
95
+ * 7eaa090 CMakeLists.txt: add micro-test-plus-objects
96
+ * 111067e project-functions.cmake: use micro-test-plus-objects
97
+ * e40981e common-functions.cmake: add coverage functions
98
+ * 840eba3 timings.h: add has_begin and has_end
99
+
100
+ ## 2026-04-14
101
+
102
+ * 5c59ecb reporter-tap.cpp: fix suite summary
103
+ * 2a705db compare-files.sh update
104
+ * 7bbcf79 more #if defined(__GNUC__)
105
+ * d69cffc rename compare-files.sh
106
+ * 8f3ea5e compare-tap-files.sh updates
107
+ * 6a01d04 #25: implement --output-file for the human reporter
108
+ * 75074d8 reporter-tap.cpp cosmetise messages \n
109
+ * b28b3eb #25: implement --output-file for the human reporter
110
+ * 71215d3 fix own_index after sort
111
+ * e768f02 utility.cpp: avoid unsafe buffer
112
+ * 3c0efcd utility: add extract_file_name()
113
+ * 6ffb82b runner.cpp: rework sort without aggregate return
114
+ * 9a6e461 more #if defined(__GNUC__)
115
+ * 205a0e4 silence warnings
116
+ * ff4d28c reorder pragmas
117
+ * 4858d46 sort suites
118
+ * caef2b0 sort suites
119
+ * 43898b5 sort suites
120
+
121
+ ## 2026-04-13
122
+
123
+ * 3536099 split unit-test
124
+
125
+ ## 2026-04-12
126
+
127
+ * 88c6837 fix cmake a72 syntax
128
+ * 82a5dc9 tests-ci add a72
129
+ * 3a4abb7 tests TRACE buffer 512
130
+
131
+ ## 2026-04-11
132
+
133
+ * 120d6c6 use -Og for aarch64 debug
134
+ * c1c8563 unit-test fix float tests
135
+ * 1dbc1fb tests/pacakge.json: bump deps
136
+ * e79e520 remove commented out pragmas
137
+ * 1f15f59 compare-tap-files.sh: support mingw pointers without 0x
138
+ * b615252 reporter-human.cpp: fix missing subtest begin
139
+ * 97a9cfd utility-inlines.h silence warning
140
+ * 6f8c883 rename utility-inlines.h
141
+ * 58d8b60 move doxygen to test-inlines.h
142
+ * aba22eb move exception functions to function-comparators-inlines.h
143
+
144
+ ## 2026-04-10
145
+
146
+ * e654cd7 add more unit tests
147
+ * 05591ee add more unit tests
148
+ * 7485915 code-review.md update
149
+ * d1a6efd reporter-tap.cpp: use trace::printf
150
+ * 2b6c39a reporter-human.cpp: cleanup
151
+ * f5822a6 reporter-tap.cpp: use trace::printf
152
+ * 0f895d8 runner.h: do not include ctime
153
+ * 4ac2eed test.cpp: explain that subtests do not record the time.
154
+ * 2f206b5 test-inlines.h: explain why nullptr passed
155
+ * 25847e9 deferred-reporter-inlines.h: clear includes
156
+ * 97e63b2 reporter-inlines.h: fix explnation (nil) on linux
157
+ * 52233c8 test.cpp: clarify emplanation
158
+ * ea345bb runner.cpp: cosmetics (british english)
159
+ * b0cca8a reporter: simplify constructor verbosity_
160
+ * f839318 fix trace::puts
161
+ * c724549 timings.cpp: add precondition assert
162
+ * aff7d92 tests/assets/tap update
163
+ * ffe7cbd compare-tap-files.sh update sed time
164
+ * ebce825 use stderr for warnings and errors
165
+ * fd109c2 use trace::printf
166
+ * 50f4d20 #if defined(MICRO_OS_PLUS_TRACE)
167
+ * 4f70a41 test-inlines.h: rename child_subtest
168
+ * de6a36e runner-inlines.h: rename child_suite
169
+ * a132531 remove commented out includes
170
+ * e531413 rename protected append_number_
171
+ * 5f72b25 runner.h: remove useless suite_index_
172
+ * 3112ede runner.cpp: avoid shadow exit_code
173
+ * a603afb rename parameters suffixed with underscore
174
+ * d8b721f remove tests code-review.md
175
+ * 2cb079b end protected with underscore
176
+ * ea4b203 test-inlines.h initialise unsed callable to nullptr
177
+ * c384d80 reporters flush before abort
178
+ * 49f5e2f utility.cpp: explain complexity
179
+ * cc4e200 runner.cpp: name ot "runner"
180
+ * d805891 reporter.h: remove unused verbosity_t
181
+ * dab4c34 include c++ headers
182
+ * 2661a41 reporter: explain why write_buffer_to_stdout is public
183
+ * 3300421 runner-totals += noexcept
184
+ * d0f8e85 reporter-human.cpp: write warning on stderr
185
+ * a924f5d argvs vector constructor with cast
186
+ * 142ef0d deferred-reporter.h apply the rule of five
187
+ * dd97f1d flush() also the output file
188
+ * 5942653 test abort() calls runner abort
189
+ * dee289c reporter.h: make flush() public
190
+ * 49c3c25 detail.h: ne_ fix >= lhs_.epsilon
191
+ * 36ad478 comment out includes
192
+ * 39b739b test.cpp re-enable pragmas
193
+ * 0e86cdb split reflection.cpp and utility.cpp
194
+ * 859f4e2 comment out more pragmas
195
+ * a8c8629 cmake: show size for native
196
+
197
+ ## 2026-04-09
198
+
199
+ * d23c1af enable tracing in native minimal test
200
+ * c1d824f add noexcept where needed
201
+ * 59a3c26 add time back to file tap reports
202
+ * 8642897 reporter: bring version back to info
203
+ * 670cda9 timings: rework with optional and uint32_t
204
+ * 5a51a06 move timings to suite & runner
205
+ * 16a35e2 compare-tap-files.sh: sed hex pointers
206
+ * 0360ddc unit-test: add missing description
207
+ * 0387ab1 move static_children_suites_ to static_runner
208
+ * 0b12359 commented out cmake unit-test verbose
209
+ * da23740 fix printing long double
210
+ * 91d49a9 #24: reporter-human.cpp: use colour only if a tty
211
+ * 94fa902 Null pointers should be rendered as 0x0
212
+
213
+ ## 2026-04-08
214
+
215
+ * c43dbff #23: add test code to compare tap files
216
+ * 971b706 tests cosmetics
217
+ * 3ca668a more consistent totals
218
+ * d61fdc1 #22: argvs as vector of string_view
219
+ * fa54491 platform README update
220
+ * 3f22c35 cosmetics "error:"
221
+ * 3e4c10e use --reporter human for unit-tests
222
+
223
+ ## 2026-04-07
224
+
225
+ * b973f93 make totals & timings protected
226
+ * c7bf95c rename runner_ to avoid -Wshadow
227
+ * 6084289 reporter operator<< forwarding reference
228
+ * b23e68b replace strncmp with string_view.starts_with
229
+ * a5db50b reporter-inlines.h cleanups
230
+ * 754bc05 type-traits.h more const
231
+ * 195f102 container_like requires const
232
+ * a04cfa9 remove redundant reporter::operator<<(char* s)
233
+ * 1d1196e fix reporter::operator<<(const T& t) recursion
234
+ * a19af57 deferred-reporter-inlines.h silence warning
235
+ * 799dc0d improve deferred_reporter_base::operator<<
236
+ * 56a4831 detail.h replace get_impl. with concept
237
+ * a6369fb implement iterative math::pow
238
+ * d43e039 type-traits.himprove has_npos
239
+ * 8c2669d re-enable operator<< (const T& t)
240
+ * 3894fda type-traits.h cleanup value<T, Opt>
241
+ * 0c2a67c fix deferred_reporter_b char
242
+ * 8ec9b23 `requires_` / `requires_t` replaced with c++20 requires
243
+ * a913784 use std::is_base_of_v
244
+ * e6182a6 use std::is_convertible_v
245
+ * 9516a88 use concept container_like & other
246
+ * 7785b9a detail.h private members
247
+ * 6a28693 rename not_.operand()
248
+ * 7bfee0e reporter operators consistently use append_number
249
+ * 6226989 silence warning in reporter
250
+ * 82fbfc0 detail.h cosmetics
251
+ * 8207330 remove more constexpr
252
+ * 241275c replace strrchr with string_view
253
+ * 1d510cb avoid problematic strncat in reporter
254
+ * 5c0e7c2 fix reflection::type_name()
255
+ * 4f720d2 use consteval in math
256
+ * 4e618fb use std::declval
257
+ * 321dc0d use c++ loops in runner
258
+ * ceeb3c6 fix redundant has_static_suites_ guard
259
+ * 5892cba inline was_successful ()
260
+ * 722c9d4 use std::to_chars in reporter operators
261
+ * a967e64 non static epsilon
262
+ * 759017e add [[likely]]
263
+ * d58e613 switch sfinae to concepts
264
+ * 17448ba using verbosity_t
265
+ * a6711bd buffer_.reserve(128)
266
+ * 04f20e5 optimise to std::to_chars
267
+ * f3c772c disable timestamps for subtests
268
+ * 5f7f8a1 remove duplicate name_ = name;
269
+ * 5ece91a inline constexpr colors
270
+ * 469f7e3 #21: fix abort location
271
+ * d8a1599 #21: add location to runner.abort()
272
+ * af580c1 remove some unused methods
273
+ * 9503e4d change some methods to protected
274
+ * 137a487 add more const to methods
275
+ * 7b48b60 micro-test-plus.h remove top expect & assume
276
+ * 2453113 remove useless constexpr specifiers from methods
277
+ * e41e2c8 remove redundant name() from runner
278
+ * cf57e92 #17 fix more warnings
279
+ * e67e3e2 #17 fix more warnings
280
+ * 98e5c2b #17 fix more warnings
281
+ * 609bf05 #17 fix more warnings
282
+ * a9d34d4 #17: add --output-file
283
+
284
+ ## 2026-04-06
285
+
286
+ * bcb18cf move verbosity processing to reporter
287
+ * e38f299 rename add_empty_line_
288
+ * edf3097 config.h cosmetics
289
+ * 53f1a7e Merge branch 'xpack-development' of https://github.com/micro-os-plus/micro-test-plus-xpack into xpack-development
290
+ * 15cc731 cosmetics
291
+ * 33e4753 MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS
292
+ * 554c5bb update trace messages
293
+
294
+ ## 2026-04-05
295
+
296
+ * 0df2ed3 update trace messages
297
+ * 143e563 use smart pointers in timings
298
+ * b6df491 store smart pointers inside children_subtests_
299
+ * 6629734 use smart pointers inside children_suites_
300
+ * 1d87188 runner.h: fix constexpr
301
+ * f2db8e2 make children_suites_ an object, no pointer
302
+ * 06909b0 make reporter_ a smart pointer
303
+ * 3c47909 make top_suite an object, no pointer
304
+ * 7d27fe5 make top_suite_ a unique pointer
305
+ * 78338ca #19: re-work test objects hierarchy
306
+
307
+ ## 2026-04-04
308
+
309
+ * 2ac0dce unit-test updated to new objects
310
+ * e5c13ec suite-test cosmetics
311
+ * 44425f7 cosmetics
312
+ * c867188 #20: rename human reporter
313
+
314
+ ## 2026-04-03
315
+
316
+ * 0c8d363 suite-test silence warning
317
+ * 13e75fc reporter-basic.cpp cosmetics
318
+ * 6e921f8 #19 unify suites with tests
319
+
320
+ ## 2026-03-31
321
+
322
+ * 3fb45b3 reporter: rename begin/end_session
323
+ * 03bfb73 rename runner & static_runner
324
+ * 0008c25 test: silence diagnostics
325
+ * c2d8356 disable trace in native
326
+ * 86ed61b warnings silenced
327
+ * cee7519 rename *2 namespace back to micro_test_plus
328
+ * e35b654 remove the initial micro_test_plus namespace
329
+ * 1b0e26b major re-work, separate mt2 namespace
330
+
331
+ ## 2026-03-24
332
+
333
+ * 26317ce website re-generate commons
334
+ * 75e93ab website: blog post release 3.3.1 published
335
+
9
336
  ## 2026-03-23
10
337
 
11
- * v3.3.0 published on npmjs.com
12
- * v3.3.0 prepared
338
+ * e08c550 3.3.1
339
+ * 3e6dadf CHANGELOG: publish npm v3.3.1
340
+ * 5573d85 prepare v3.3.1
341
+ * f1be263 tests: add suite-test
342
+ * df22b28 #16: fix static inits
343
+ * 511f8cf re-generate website commons
344
+ * c700756 tests meson update usage
345
+ * 759051f move tests to sources
13
346
 
14
347
  ## 2026-03-22
15
348
 
349
+ * fd91598 website: blog post release 3.3.0 published
350
+ * a116185 3.3.0
351
+ * c412e55 CHANGELOG: publish npm v3.3.0
352
+ * 394c679 prepare v3.3.0
16
353
  * 8d33c3e website update for tap
17
354
  * 181b428 website/doxygen rewrites
18
355
  * 14bea0a cli.dox update to tap
package/CMakeLists.txt CHANGED
@@ -22,20 +22,22 @@
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 (micro-os-plus-micro-test-plus DESCRIPTION "µTest++")
28
28
 
29
- # To access the optional functions, include the
30
- # `cmake/micro-os-plus-build-helper.cmake` file from the
29
+ # To access the optional functions, include the
30
+ # `cmake/micro-os-plus-build-helper.cmake` file from the
31
31
  # `@micro-os-plus/build-helper` package.
32
32
 
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}..."
33
+ if (COMMAND xpack_get_package_name_and_version)
34
+ xpack_get_package_name_and_version (
35
+ "${CMAKE_CURRENT_SOURCE_DIR}/package.json"
37
36
  )
38
- endif()
37
+ message (VERBOSE
38
+ "Processing xPack ${PACKAGE_JSON_NAME}@${PACKAGE_JSON_VERSION}..."
39
+ )
40
+ endif ()
39
41
 
40
42
  # -----------------------------------------------------------------------------
41
43
 
@@ -44,44 +46,98 @@ endif()
44
46
  # https://cmake.org/cmake/help/v3.20/command/add_library.html?highlight=interface#normal-libraries
45
47
  # PRIVATE: build definitions, used internally INTERFACE: usage definitions,
46
48
  # passed up to targets linking to it PUBLIC: both
47
- add_library(micro-os-plus-micro-test-plus-interface INTERFACE)
49
+ add_library (micro-os-plus-micro-test-plus-interface INTERFACE)
48
50
 
49
- target_include_directories(
51
+ target_include_directories (
50
52
  micro-os-plus-micro-test-plus-interface INTERFACE "include"
51
53
  )
52
54
 
53
- target_sources(
55
+ target_sources (
54
56
  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"
57
+ INTERFACE "src/runner.cpp"
58
+ "src/runner-totals.cpp"
59
+ "src/deferred-reporter.cpp"
60
+ "src/reporter.cpp"
61
+ "src/reporter-human.cpp"
62
+ "src/reporter-tap.cpp"
63
+ "src/test.cpp"
64
+ "src/timings.cpp"
65
+ "src/reflection.cpp"
66
+ "src/utility.cpp"
58
67
  )
59
68
 
60
- target_compile_definitions(
69
+ target_compile_definitions (
61
70
  micro-os-plus-micro-test-plus-interface INTERFACE # None.
62
71
  )
63
72
 
64
- target_compile_options(
73
+ target_compile_options (
65
74
  micro-os-plus-micro-test-plus-interface INTERFACE # None.
66
75
  )
67
76
 
68
- target_link_libraries(micro-os-plus-micro-test-plus-interface INTERFACE # None.
77
+ target_link_libraries (
78
+ micro-os-plus-micro-test-plus-interface INTERFACE micro-os-plus::diag-trace
79
+ )
80
+
81
+ if (COMMAND xpack_display_target_lists)
82
+ xpack_display_target_lists (micro-os-plus-micro-test-plus-interface)
83
+ endif ()
84
+
85
+ # -----------------------------------------------------------------------------
86
+
87
+ # Optional OBJECT library: sources are compiled once rather than per consumer.
88
+ # Inherits include directories, compile definitions, and compiler options from
89
+ # the interface library via PRIVATE linkage, which avoids propagating the
90
+ # interface library's INTERFACE sources to consumers of the object library. The
91
+ # include directories are re-exported explicitly so that consumers can find the
92
+ # headers.
93
+ add_library (micro-os-plus-micro-test-plus-objects OBJECT)
94
+
95
+ get_target_property (
96
+ micro-os-plus-micro-test-plus-includes
97
+ micro-os-plus-micro-test-plus-interface INTERFACE_INCLUDE_DIRECTORIES
98
+ )
99
+ target_include_directories (
100
+ micro-os-plus-micro-test-plus-objects
101
+ INTERFACE ${micro-os-plus-micro-test-plus-includes}
102
+ )
103
+
104
+ get_target_property (
105
+ micro-os-plus-micro-test-plus-sources micro-os-plus-micro-test-plus-interface
106
+ INTERFACE_SOURCES
107
+ )
108
+ target_sources (
109
+ micro-os-plus-micro-test-plus-objects
110
+ PRIVATE ${micro-os-plus-micro-test-plus-sources}
111
+ )
112
+
113
+ target_link_libraries (
114
+ micro-os-plus-micro-test-plus-objects
115
+ PRIVATE micro-os-plus-micro-test-plus-interface
69
116
  )
70
117
 
71
- if(COMMAND xpack_display_target_lists)
72
- xpack_display_target_lists(micro-os-plus-micro-test-plus-interface)
73
- endif()
118
+ if (COMMAND xpack_display_target_lists)
119
+ xpack_display_target_lists (micro-os-plus-micro-test-plus-objects)
120
+ endif ()
74
121
 
75
122
  # -----------------------------------------------------------------------------
76
123
 
77
124
  # Aliases.
78
125
  # https://cmake.org/cmake/help/v3.20/command/add_library.html#alias-libraries
79
- add_library(
126
+ add_library (
80
127
  micro-os-plus::micro-test-plus ALIAS micro-os-plus-micro-test-plus-interface
81
128
  )
82
- message(
129
+ message (
83
130
  VERBOSE
84
131
  "> micro-os-plus::micro-test-plus -> micro-os-plus-micro-test-plus-interface"
85
132
  )
86
133
 
134
+ add_library (
135
+ micro-os-plus::micro-test-plus-objects ALIAS
136
+ micro-os-plus-micro-test-plus-objects
137
+ )
138
+ message (
139
+ VERBOSE
140
+ "> micro-os-plus::micro-test-plus-objects -> micro-os-plus-micro-test-plus-objects"
141
+ )
142
+
87
143
  # -----------------------------------------------------------------------------
package/README.md CHANGED
@@ -15,7 +15,7 @@ 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.0 tree](https://github.com/micro-os-plus/micro-test-plus-xpack/tree/v3.3.0).
18
+ [GitHub tag v4.0.0 tree](https://github.com/micro-os-plus/micro-test-plus-xpack/tree/v4.0.0).
19
19
 
20
20
  ## License
21
21
 
@@ -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
+ }