@micro-os-plus/micro-test-plus 3.2.0 → 3.2.2
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.
- package/CHANGELOG.md +152 -11
- package/CMakeLists.txt +3 -4
- package/LICENSE +1 -1
- package/README.md +15 -14
- package/include/micro-os-plus/detail.h +4 -5
- package/include/micro-os-plus/inlines.h +17 -12
- package/include/micro-os-plus/literals.h +4 -5
- package/include/micro-os-plus/math.h +4 -5
- package/include/micro-os-plus/micro-test-plus.h +4 -5
- package/include/micro-os-plus/reflection.h +8 -8
- package/include/micro-os-plus/test-reporter-inlines.h +4 -5
- package/include/micro-os-plus/test-reporter.h +4 -5
- package/include/micro-os-plus/test-runner.h +4 -5
- package/include/micro-os-plus/test-suite.h +4 -5
- package/include/micro-os-plus/type-traits.h +4 -5
- package/meson.build +3 -4
- package/package.json +32 -19
- package/src/micro-test-plus.cpp +14 -9
- package/src/test-reporter.cpp +4 -5
- package/src/test-runner.cpp +10 -11
- package/src/test-suite.cpp +10 -11
- package/xcdl.json +32 -0
- package/LICENSE-Boost +0 -23
package/CHANGELOG.md
CHANGED
|
@@ -6,9 +6,150 @@ 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
|
+
## 2025-03-15
|
|
10
|
+
|
|
11
|
+
* v3.2.2 published on npmjs.com
|
|
12
|
+
* v3.2.2 prepared
|
|
13
|
+
* 771e589 re-generate commons
|
|
14
|
+
|
|
15
|
+
## 2025-03-14
|
|
16
|
+
|
|
17
|
+
* 1475002 re-generate top commons
|
|
18
|
+
* 464a485 re-generate top commons
|
|
19
|
+
* 632bcc8 publish-github-pages update
|
|
20
|
+
* d89c851 website: blog post release 3.2.1 published
|
|
21
|
+
* c70d3e0 3.2.1
|
|
22
|
+
* 60103cd prepare v3.2.1
|
|
23
|
+
* 8daa820 website: update post
|
|
24
|
+
* 703dcf9 website: re-generate commons & blog posts
|
|
25
|
+
* 564f37f tests: re-generate commons
|
|
26
|
+
|
|
27
|
+
## 2025-03-12
|
|
28
|
+
|
|
29
|
+
* a7dc192 re-generate commons with long description
|
|
30
|
+
* ae24148 website: re-generate commons
|
|
31
|
+
* 0c97d4e website: re-generate commons
|
|
32
|
+
* 7c01414 website: re-generate commons
|
|
33
|
+
* 31d25ac website: re-generate commons
|
|
34
|
+
|
|
35
|
+
## 2025-03-11
|
|
36
|
+
|
|
37
|
+
* e0db831 website: re-generate commons
|
|
38
|
+
* e31417b website: re-generate commons
|
|
39
|
+
* 0350fa2 website: re-generate with longer descriptiveName
|
|
40
|
+
|
|
41
|
+
## 2025-03-10
|
|
42
|
+
|
|
43
|
+
* f514bf6 website: re-generate commons
|
|
44
|
+
* 3ba95c6 website: re-generate commons major
|
|
45
|
+
|
|
46
|
+
## 2025-03-05
|
|
47
|
+
|
|
48
|
+
* 30197db website: green
|
|
49
|
+
|
|
50
|
+
## 2025-03-04
|
|
51
|
+
|
|
52
|
+
* 57afe72 website: fix pathname:// links
|
|
53
|
+
* 24e28c1 website: getting-started rework
|
|
54
|
+
* 73abd63 config.doxyfile: disable XML for now
|
|
55
|
+
* af1383f docusaurus*: use pathname:///
|
|
56
|
+
* d963f3d docusaurus*: accept broken links
|
|
57
|
+
* ba6a4e9 *redirect.ts remove '/reference'
|
|
58
|
+
* d71fa22 re-generate commons
|
|
59
|
+
* 2cc8dd6 website docusaurus test
|
|
60
|
+
|
|
61
|
+
## 2025-03-03
|
|
62
|
+
|
|
63
|
+
* 17fc2c5 doxygen/.gitignore
|
|
64
|
+
|
|
65
|
+
## 2025-03-02
|
|
66
|
+
|
|
67
|
+
* e233776 website: move doxygen files to separate folder
|
|
68
|
+
* 32ff366 tests/package-lock.json update
|
|
69
|
+
|
|
70
|
+
## 2025-02-28
|
|
71
|
+
|
|
72
|
+
* 435d61f copyright notices cosmetics
|
|
73
|
+
* c228aef tests: re-generate commons
|
|
74
|
+
* d178ebe re-generate workflows
|
|
75
|
+
* 5f78801 test-all: fix clear cache syntax
|
|
76
|
+
|
|
77
|
+
## 2025-02-27
|
|
78
|
+
|
|
79
|
+
* 9a6ecf5 test-all: fix clear cache syntax
|
|
80
|
+
* 5a78a81 test-all: fix clear cache syntax
|
|
81
|
+
* df341b9 test-all: fix clear cache syntax
|
|
82
|
+
* 4c56913 test-all: clean xPack cache
|
|
83
|
+
* 76606cb re-generate workflows
|
|
84
|
+
* 6472bc0 tests/native/meson -rtlib=compiler-rt
|
|
85
|
+
* e5bed09 tests/native/cmake remove duplicate -stdlib=libc++
|
|
86
|
+
* 5425929 tests/package.json: add native-meson-clang to test-ci
|
|
87
|
+
* 9babed3 tests/native meson -stdlib=libc++
|
|
88
|
+
* 1fe540d reflection.h: unsigned int line
|
|
89
|
+
|
|
90
|
+
## 2025-02-26
|
|
91
|
+
|
|
92
|
+
* 4d46b66 package.json fix action test
|
|
93
|
+
* c76db36 package.json add git-pull-helper
|
|
94
|
+
* cac8c46 tests/package.json: bump helper
|
|
95
|
+
* 8274320 tests/package-lock.json update
|
|
96
|
+
* db0f79a re-generate commons
|
|
97
|
+
* 052057d workflows: update
|
|
98
|
+
|
|
99
|
+
## 2025-02-25
|
|
100
|
+
|
|
101
|
+
* 808db36 workflows cosmetics
|
|
102
|
+
* 6531845 meson/common-options: fix link_args
|
|
103
|
+
* 241c368 workflows: npm -C
|
|
104
|
+
* b867523 workflows: &&
|
|
105
|
+
* 2636562 workflows: remove windows 2019
|
|
106
|
+
* 8aca778 tests/package-local.json
|
|
107
|
+
* 9650766 re-generate commons
|
|
108
|
+
* 34695b1 xcdl.json update
|
|
109
|
+
|
|
110
|
+
## 2025-02-24
|
|
111
|
+
|
|
112
|
+
* cca99a3 package.json: update topConfig
|
|
113
|
+
* 6b926ad package.json update
|
|
114
|
+
* 66412e3 package.json: add topConfig
|
|
115
|
+
* eab469f re-generate workflows
|
|
116
|
+
* 5fc7f95 test-ci.yml: fix install-ci
|
|
117
|
+
* de675ce test-ci.yml: fix install-ci
|
|
118
|
+
* cf02869 rename test-ci.yml
|
|
119
|
+
* 8a8431d ci.yml update
|
|
120
|
+
* 94d8603 tests/package*.json: bump deps
|
|
121
|
+
* 05e42b2 platforms/native: update RPATH
|
|
122
|
+
* 00c2a30 publish-github-pages.yml: update from npm helper
|
|
123
|
+
* 5a1770c website: update for node_modules
|
|
124
|
+
* 328857c re-generate commons
|
|
125
|
+
* a8a661e package*.json: use npm & extract xcdl.json
|
|
126
|
+
* d3c7750 silence documentation warnings
|
|
127
|
+
|
|
128
|
+
## 2024-11-21
|
|
129
|
+
|
|
130
|
+
* c3847f1 rename xpack-development
|
|
131
|
+
* e7b1d9b rename MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
132
|
+
* 459143c package.json: add cdlComponents
|
|
133
|
+
* ffaf7b1 tests/package.json CMAKE_MAKE_PROGRAM only on windows
|
|
134
|
+
* 5cf103a update copyright notice
|
|
135
|
+
|
|
136
|
+
## 2024-02-14
|
|
137
|
+
|
|
138
|
+
* a1b201a tests/package.json: add short win path to meson
|
|
139
|
+
* 3269a0e tests/package.json: explicit CMAKE_MAKE_PROGRAM
|
|
140
|
+
|
|
141
|
+
## 2023-12-26
|
|
142
|
+
|
|
143
|
+
* 7c113ee README update
|
|
144
|
+
* b534088 credits.md: remove macstadium.com opensource
|
|
145
|
+
* 11ffc8b website/pages/home.md: cleanup dummy links
|
|
146
|
+
* acefd31 publish-github-pages.yml: bump doxygen 1.10.0
|
|
147
|
+
* b24ad6b cmake cosmetics
|
|
148
|
+
|
|
9
149
|
## 2023-12-06
|
|
10
150
|
|
|
11
|
-
*
|
|
151
|
+
* 7a2ee88 3.2.0
|
|
152
|
+
* 2a6abf2 prepare v3.2.0
|
|
12
153
|
* 90963ce micro-test-plus.h cosmetics
|
|
13
154
|
* c57c46e literals.h: silence clang deprecation warning
|
|
14
155
|
* f776b18 doxygen metadata: add @headerfile
|
|
@@ -113,16 +254,16 @@ and close existing issues and pull requests.
|
|
|
113
254
|
## 2023-11-25
|
|
114
255
|
|
|
115
256
|
* 509ff38 home.md: add Manual Pages
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
257
|
+
* eed0475 tests/package.json: add install/tes-latest
|
|
258
|
+
* d2a23dd tests/README update
|
|
259
|
+
* a755996 maintainer.md: update
|
|
260
|
+
* 17866f0 tests/package.json: add more selected
|
|
261
|
+
* 593b361 tests/package.json: fix syntax
|
|
262
|
+
* bbe15ab tests/package.json: fix syntax
|
|
263
|
+
* 1456260 tests/package.json: re-enable some tests
|
|
264
|
+
* c8f7c5a tests/package.json: reorder actions
|
|
265
|
+
* 68626be tests/package.json: fix install-selected
|
|
266
|
+
* 079df5c tests/package.json: cleanup actions
|
|
126
267
|
|
|
127
268
|
## 2023-11-24
|
|
128
269
|
|
package/CMakeLists.txt
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the µOS++
|
|
4
|
-
# (
|
|
5
|
-
# Copyright (c) 2021 Liviu Ionescu
|
|
3
|
+
# This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
4
|
+
# Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
6
5
|
#
|
|
7
6
|
# Permission to use, copy, modify, and/or distribute this software
|
|
8
7
|
# for any purpose is hereby granted, under the terms of the MIT license.
|
|
9
8
|
#
|
|
10
9
|
# If a copy of the license was not distributed with this file, it can
|
|
11
|
-
# be obtained from https://opensource.org/licenses/
|
|
10
|
+
# be obtained from https://opensource.org/licenses/mit.
|
|
12
11
|
#
|
|
13
12
|
# -----------------------------------------------------------------------------
|
|
14
13
|
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
[](https://github.com/micro-os-plus/micro-test-plus-xpack/blob/xpack/package.json)
|
|
2
|
-
[](https://github.com/micro-os-plus/micro-test-plus-xpack/tags
|
|
3
|
-
[](https://github.com/micro-os-plus/micro-test-plus-xpack/actions/workflows/ci.yml)
|
|
6
|
-
[](https://micro-os-plus.github.io/micro-test-plus-xpack/)
|
|
2
|
+
[](https://github.com/micro-os-plus/micro-test-plus-xpack/tags)
|
|
3
|
+
[](https://www.npmjs.com/package/@micro-os-plus/micro-test-plus/)
|
|
4
|
+
[](https://github.com/micro-os-plus/micro-test-plus-xpack/blob/xpack/LICENSE)
|
|
7
5
|
|
|
8
|
-
#
|
|
6
|
+
# The µTest++ Testing Framework
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
testing framework, intended for running unit tests on embedded
|
|
12
|
-
platforms.
|
|
8
|
+
A source code library with µTest++, a lightweight testing framework for embedded platforms.
|
|
13
9
|
|
|
14
|
-
##
|
|
10
|
+
## Project documentation
|
|
15
11
|
|
|
16
|
-
For information on how to
|
|
17
|
-
[project
|
|
12
|
+
For information on how to install and use this project, please refer to the
|
|
13
|
+
[project website](https://micro-os-plus.github.io/micro-test-plus-xpack/).
|
|
14
|
+
|
|
15
|
+
## Project source
|
|
16
|
+
|
|
17
|
+
The source code of the current release is available on
|
|
18
|
+
[GitHub tag v3.2.2 tree](https://github.com/micro-os-plus/micro-test-plus-xpack/tree/v3.2.2).
|
|
18
19
|
|
|
19
20
|
## License
|
|
20
21
|
|
|
21
|
-
Unless otherwise stated, the content is released under the terms of the
|
|
22
|
-
[MIT License](https://opensource.org/licenses/mit
|
|
22
|
+
Unless otherwise stated, the original content is released under the terms of the
|
|
23
|
+
[MIT License](https://opensource.org/licenses/mit),
|
|
23
24
|
with all rights reserved to
|
|
24
25
|
[Liviu Ionescu](https://github.com/ilg-ul).
|
|
25
26
|
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_DETAIL_H_
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_INLINES_H_
|
|
@@ -43,15 +42,19 @@ namespace micro_os_plus::micro_test_plus
|
|
|
43
42
|
: test_suite_base{ name },
|
|
44
43
|
callable_{ std::bind (callable, arguments...) }
|
|
45
44
|
{
|
|
46
|
-
#if defined(
|
|
45
|
+
#if defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
47
46
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
48
|
-
#endif //
|
|
47
|
+
#endif // MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
49
48
|
|
|
50
49
|
runner.register_test_suite (this);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
// --------------------------------------------------------------------------
|
|
54
53
|
|
|
54
|
+
#if defined(__clang__)
|
|
55
|
+
#pragma clang diagnostic push
|
|
56
|
+
#pragma clang diagnostic ignored "-Wdocumentation"
|
|
57
|
+
#endif
|
|
55
58
|
/**
|
|
56
59
|
* @details
|
|
57
60
|
* A test case is a sequence of test conditions (or simply tests,
|
|
@@ -73,7 +76,6 @@ namespace micro_os_plus::micro_test_plus
|
|
|
73
76
|
* the provided arguments, and reports the results.
|
|
74
77
|
*
|
|
75
78
|
* @par Example
|
|
76
|
-
*
|
|
77
79
|
* ```cpp
|
|
78
80
|
* namespace mt = micro_os_plus::micro_test_plus;
|
|
79
81
|
*
|
|
@@ -82,13 +84,16 @@ namespace micro_os_plus::micro_test_plus
|
|
|
82
84
|
* });
|
|
83
85
|
* ```
|
|
84
86
|
*/
|
|
87
|
+
#if defined(__clang__)
|
|
88
|
+
#pragma clang diagnostic pop
|
|
89
|
+
#endif
|
|
85
90
|
template <typename Callable_T, typename... Args_T>
|
|
86
91
|
void
|
|
87
92
|
test_case (const char* name, Callable_T&& callable, Args_T&&... arguments)
|
|
88
93
|
{
|
|
89
|
-
#if 0 // defined(
|
|
94
|
+
#if 0 // defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
90
95
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
91
|
-
#endif //
|
|
96
|
+
#endif // MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
92
97
|
|
|
93
98
|
current_test_suite->begin_test_case (name);
|
|
94
99
|
std::invoke (std::forward<Callable_T> (callable),
|
|
@@ -125,9 +130,9 @@ namespace micro_os_plus::micro_test_plus
|
|
|
125
130
|
: deferred_reporter_base{ static_cast<bool> (expr), location },
|
|
126
131
|
expr_{ expr }
|
|
127
132
|
{
|
|
128
|
-
#if 0 // defined(
|
|
133
|
+
#if 0 // defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
129
134
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
130
|
-
#endif //
|
|
135
|
+
#endif // MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
131
136
|
abort_ = abort;
|
|
132
137
|
}
|
|
133
138
|
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_LITERALS_H_
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_MATH_H_
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_MICRO_TEST_PLUS_H_
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_REFLECTION_H_
|
|
@@ -60,9 +59,10 @@ namespace micro_os_plus::micro_test_plus
|
|
|
60
59
|
[[nodiscard]] static constexpr auto
|
|
61
60
|
current (
|
|
62
61
|
#if (__has_builtin(__builtin_FILE) and __has_builtin(__builtin_LINE))
|
|
63
|
-
const char* file = __builtin_FILE (),
|
|
62
|
+
const char* file = __builtin_FILE (),
|
|
63
|
+
unsigned int line = __builtin_LINE ()
|
|
64
64
|
#else
|
|
65
|
-
const char* file = "unknown", int line = {}
|
|
65
|
+
const char* file = "unknown", unsigned int line = {}
|
|
66
66
|
#endif
|
|
67
67
|
) noexcept
|
|
68
68
|
{
|
|
@@ -86,7 +86,7 @@ namespace micro_os_plus::micro_test_plus
|
|
|
86
86
|
|
|
87
87
|
private:
|
|
88
88
|
const char* file_{ "unknown" };
|
|
89
|
-
int line_{};
|
|
89
|
+
unsigned int line_{};
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
#endif
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_TEST_REPORTER_INLINES_H_
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_TEST_REPORTER_H_
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_TEST_RUNNER_H_
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_TEST_SUITE_H_
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
#ifndef MICRO_TEST_PLUS_TYPE_TRAITS_H_
|
package/meson.build
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# -----------------------------------------------------------------------------
|
|
2
2
|
#
|
|
3
|
-
# This file is part of the µOS++
|
|
4
|
-
#
|
|
5
|
-
# Copyright (c) 2022 Liviu Ionescu
|
|
3
|
+
# This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
4
|
+
# Copyright (c) 2022 Liviu Ionescu. All rights reserved.
|
|
6
5
|
#
|
|
7
6
|
# Permission to use, copy, modify, and/or distribute this software
|
|
8
7
|
# for any purpose is hereby granted, under the terms of the MIT license.
|
|
9
8
|
#
|
|
10
9
|
# If a copy of the license was not distributed with this file, it can
|
|
11
|
-
# be obtained from https://opensource.org/licenses/
|
|
10
|
+
# be obtained from https://opensource.org/licenses/mit.
|
|
12
11
|
#
|
|
13
12
|
# -----------------------------------------------------------------------------
|
|
14
13
|
|
package/package.json
CHANGED
|
@@ -1,25 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micro-os-plus/micro-test-plus",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "A source code library with µTest++, a lightweight testing framework for embedded platforms",
|
|
5
5
|
"main": "",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"generate-top-commons": "bash node_modules/@xpack/npm-packages-helper/maintenance-scripts/generate-top-commons.sh --micro-os-plus",
|
|
8
|
+
"npm-install": "npm install",
|
|
9
|
+
"npm-link-helpers": "npm link @xpack/npm-packages-helper @xpack/docusaurus-template-liquid",
|
|
10
|
+
"npm-outdated": "npm outdated",
|
|
11
|
+
"npm-pack": "npm pack",
|
|
12
|
+
"npm-link": "npm link",
|
|
13
|
+
"npm-version-patch": "npm version patch",
|
|
14
|
+
"npm-version-minor": "npm version minor",
|
|
15
|
+
"git-log": "git log --pretty='%cd * %h %s' --date=short",
|
|
16
|
+
"git-pull-helper": "git -C ${HOME}/Work/micro-os-plus/build-helper-xpack.git pull",
|
|
17
|
+
"deep-clean": "del-cli node_modules package-lock.json *.tgz",
|
|
7
18
|
"postversion": "git push origin --all && git push origin --tags"
|
|
8
19
|
},
|
|
9
20
|
"repository": {
|
|
10
21
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/micro-os-plus/micro-test-plus-xpack.git"
|
|
22
|
+
"url": "git+https://github.com/micro-os-plus/micro-test-plus-xpack.git"
|
|
12
23
|
},
|
|
13
|
-
"homepage": "https://micro-os-plus.github.io/micro-test-plus-xpack",
|
|
14
24
|
"bugs": {
|
|
15
25
|
"url": "https://github.com/micro-os-plus/micro-test-plus-xpack/issues"
|
|
16
26
|
},
|
|
27
|
+
"homepage": "https://micro-os-plus.github.io/micro-test-plus-xpack/",
|
|
28
|
+
"homepagePreview": "https://micro-os-plus.github.io/micro-test-plus-xpack-webpreview/",
|
|
17
29
|
"keywords": [
|
|
18
30
|
"xpack",
|
|
31
|
+
"micro-os-plus",
|
|
19
32
|
"c++",
|
|
20
33
|
"testing",
|
|
21
|
-
"framework"
|
|
22
|
-
"micro-os-plus"
|
|
34
|
+
"framework"
|
|
23
35
|
],
|
|
24
36
|
"author": {
|
|
25
37
|
"name": "Liviu Ionescu",
|
|
@@ -27,29 +39,30 @@
|
|
|
27
39
|
"url": "https://github.com/ilg-ul"
|
|
28
40
|
},
|
|
29
41
|
"license": "MIT",
|
|
30
|
-
"config": {},
|
|
31
42
|
"dependencies": {},
|
|
32
|
-
"bundleDependencies": [],
|
|
33
43
|
"$devDependenciesUrls": [
|
|
34
|
-
"https://www.npmjs.com/package/del-cli"
|
|
44
|
+
"https://www.npmjs.com/package/del-cli",
|
|
45
|
+
"https://www.npmjs.com/package/json",
|
|
46
|
+
"https://www.npmjs.com/package/liquidjs"
|
|
35
47
|
],
|
|
36
48
|
"devDependencies": {
|
|
37
|
-
"del-cli": "^
|
|
49
|
+
"del-cli": "^6.0.0",
|
|
50
|
+
"json": "^11.0.0",
|
|
51
|
+
"liquidjs": "^10.19.1"
|
|
38
52
|
},
|
|
39
53
|
"xpack": {
|
|
40
|
-
"minimumXpmRequired": "0.
|
|
41
|
-
"actions": {
|
|
42
|
-
"deep-clean": "del-cli node_modules package-lock.json",
|
|
43
|
-
"npm-install": "npm install",
|
|
44
|
-
"git-log": "git log --pretty='%cd * %h %s' --date=short",
|
|
45
|
-
"npm-pack": "npm pack",
|
|
46
|
-
"npm-version-patch": "npm version patch",
|
|
47
|
-
"npm-version-minor": "npm version minor",
|
|
48
|
-
"npm-version": "echo $(which node) $(node --version) && echo $(which npm) $(npm --version)"
|
|
49
|
-
},
|
|
54
|
+
"minimumXpmRequired": "0.20.8",
|
|
50
55
|
"dependencies": {},
|
|
51
56
|
"devDependencies": {},
|
|
52
57
|
"properties": {},
|
|
53
58
|
"buildConfigurations": {}
|
|
59
|
+
},
|
|
60
|
+
"topConfig": {
|
|
61
|
+
"descriptiveName": "µTest++ Testing Framework",
|
|
62
|
+
"permalinkName": "micro-test-plus",
|
|
63
|
+
"useDoxygen": "true"
|
|
64
|
+
},
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": " >=18.0.0"
|
|
54
67
|
}
|
|
55
68
|
}
|
package/src/micro-test-plus.cpp
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
// ----------------------------------------------------------------------------
|
|
@@ -56,7 +55,7 @@ namespace micro_os_plus::micro_test_plus
|
|
|
56
55
|
void
|
|
57
56
|
initialize (int argc, char* argv[], const char* name)
|
|
58
57
|
{
|
|
59
|
-
#if defined(
|
|
58
|
+
#if defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
60
59
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
61
60
|
#endif
|
|
62
61
|
runner.initialize (argc, argv, name);
|
|
@@ -104,6 +103,10 @@ namespace micro_os_plus::micro_test_plus
|
|
|
104
103
|
|
|
105
104
|
namespace utility
|
|
106
105
|
{
|
|
106
|
+
#if defined(__clang__)
|
|
107
|
+
#pragma clang diagnostic push
|
|
108
|
+
#pragma clang diagnostic ignored "-Wdocumentation"
|
|
109
|
+
#endif
|
|
107
110
|
/**
|
|
108
111
|
* @details
|
|
109
112
|
* For tests comparing strings, in addition to exact matches,
|
|
@@ -111,7 +114,6 @@ namespace micro_os_plus::micro_test_plus
|
|
|
111
114
|
* (for any characters) and `?` (for a single character)
|
|
112
115
|
*
|
|
113
116
|
* @par Examples
|
|
114
|
-
*
|
|
115
117
|
* ```cpp
|
|
116
118
|
* namespace mt = micro_os_plus::micro_test_plus;
|
|
117
119
|
*
|
|
@@ -119,6 +121,9 @@ namespace micro_os_plus::micro_test_plus
|
|
|
119
121
|
* mt::expect (mt::utility::is_match ("abc", "a*c")) << "abc matches a*c";
|
|
120
122
|
* ```
|
|
121
123
|
*/
|
|
124
|
+
#if defined(__clang__)
|
|
125
|
+
#pragma clang diagnostic pop
|
|
126
|
+
#endif
|
|
122
127
|
[[nodiscard]] bool
|
|
123
128
|
is_match (std::string_view input, std::string_view pattern)
|
|
124
129
|
{
|
|
@@ -174,9 +179,9 @@ namespace micro_os_plus::micro_test_plus
|
|
|
174
179
|
|
|
175
180
|
deferred_reporter_base::~deferred_reporter_base ()
|
|
176
181
|
{
|
|
177
|
-
#if 0 // defined(
|
|
182
|
+
#if 0 // defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
178
183
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
179
|
-
#endif //
|
|
184
|
+
#endif // MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
180
185
|
|
|
181
186
|
if (abort_ && !value_)
|
|
182
187
|
{
|
package/src/test-reporter.cpp
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
// ----------------------------------------------------------------------------
|
package/src/test-runner.cpp
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
// ----------------------------------------------------------------------------
|
|
@@ -40,9 +39,9 @@ namespace micro_os_plus::micro_test_plus
|
|
|
40
39
|
|
|
41
40
|
test_runner::test_runner ()
|
|
42
41
|
{
|
|
43
|
-
#if defined(
|
|
42
|
+
#if defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
44
43
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
45
|
-
#endif //
|
|
44
|
+
#endif // MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
#pragma GCC diagnostic push
|
|
@@ -52,9 +51,9 @@ namespace micro_os_plus::micro_test_plus
|
|
|
52
51
|
void
|
|
53
52
|
test_runner::initialize (int argc, char* argv[], const char* name)
|
|
54
53
|
{
|
|
55
|
-
#if defined(
|
|
54
|
+
#if defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
56
55
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
57
|
-
#endif //
|
|
56
|
+
#endif // MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
58
57
|
|
|
59
58
|
argc_ = argc;
|
|
60
59
|
argv_ = argv;
|
|
@@ -177,9 +176,9 @@ namespace micro_os_plus::micro_test_plus
|
|
|
177
176
|
void
|
|
178
177
|
test_runner::register_test_suite (test_suite_base* suite)
|
|
179
178
|
{
|
|
180
|
-
#if 0 // defined(
|
|
179
|
+
#if 0 // defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
181
180
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
182
|
-
#endif //
|
|
181
|
+
#endif // MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
183
182
|
|
|
184
183
|
if (suites_ == nullptr)
|
|
185
184
|
{
|
package/src/test-suite.cpp
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* This file is part of the µOS++
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2021 Liviu Ionescu.
|
|
2
|
+
* This file is part of the µOS++ project (https://micro-os-plus.github.io/).
|
|
3
|
+
* Copyright (c) 2021 Liviu Ionescu. All rights reserved.
|
|
5
4
|
*
|
|
6
5
|
* Permission to use, copy, modify, and/or distribute this software
|
|
7
6
|
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
8
7
|
*
|
|
9
8
|
* If a copy of the license was not distributed with this file, it can
|
|
10
|
-
* be obtained from
|
|
9
|
+
* be obtained from https://opensource.org/licenses/mit.
|
|
11
10
|
*
|
|
12
11
|
* Major parts of the code are inspired from v1.1.8 of the Boost UT project,
|
|
13
12
|
* released under the terms of the Boost Version 1.0 Software License,
|
|
14
|
-
* which can be obtained from
|
|
13
|
+
* which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
// ----------------------------------------------------------------------------
|
|
@@ -37,9 +36,9 @@ namespace micro_os_plus::micro_test_plus
|
|
|
37
36
|
|
|
38
37
|
test_suite_base::test_suite_base (const char* name)
|
|
39
38
|
{
|
|
40
|
-
#if defined(
|
|
39
|
+
#if defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
41
40
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
42
|
-
#endif //
|
|
41
|
+
#endif // MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
43
42
|
|
|
44
43
|
name_ = name;
|
|
45
44
|
// The default test suite needs no registration.
|
|
@@ -52,9 +51,9 @@ namespace micro_os_plus::micro_test_plus
|
|
|
52
51
|
void
|
|
53
52
|
test_suite_base::run ()
|
|
54
53
|
{
|
|
55
|
-
#if defined(
|
|
54
|
+
#if defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
56
55
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
57
|
-
#endif //
|
|
56
|
+
#endif // MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
void
|
|
@@ -122,9 +121,9 @@ namespace micro_os_plus::micro_test_plus
|
|
|
122
121
|
|
|
123
122
|
test_suite::~test_suite ()
|
|
124
123
|
{
|
|
125
|
-
#if defined(
|
|
124
|
+
#if defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
|
|
126
125
|
printf ("%s\n", __PRETTY_FUNCTION__);
|
|
127
|
-
#endif //
|
|
126
|
+
#endif // MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS
|
|
128
127
|
}
|
|
129
128
|
|
|
130
129
|
// --------------------------------------------------------------------------
|
package/xcdl.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"minimumXcdlRequired": "2.0.0",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"copyright": "Copyright (c) 2022 Liviu Ionescu. All rights reserved.",
|
|
5
|
+
"cdlPackage": {
|
|
6
|
+
"name": "micro-test-plus",
|
|
7
|
+
"description": "µTest++, a lightweight testing framework for embedded platforms",
|
|
8
|
+
"parent": "micro-os-plus",
|
|
9
|
+
"compilerIncludeFolders": [
|
|
10
|
+
"include"
|
|
11
|
+
],
|
|
12
|
+
"compilerSourceFiles": [
|
|
13
|
+
"src/micro-test-plus.cpp",
|
|
14
|
+
"src/test-runner.cpp",
|
|
15
|
+
"src/test-reporter.cpp",
|
|
16
|
+
"src/test-suite.cpp"
|
|
17
|
+
],
|
|
18
|
+
"compilerDefinitions": [],
|
|
19
|
+
"compilerOptions": [],
|
|
20
|
+
"dependencies": [],
|
|
21
|
+
"generatedDefinition": "MICRO_OS_PLUS_HAS_MICRO_TEST_PLUS",
|
|
22
|
+
"cdlOptions": {
|
|
23
|
+
"trace": {
|
|
24
|
+
"display": "Enable trace in µTest++",
|
|
25
|
+
"description": "Log trace diagnostics in the µTest++ testing framework when TRACE is enabled",
|
|
26
|
+
"valueType": "bool",
|
|
27
|
+
"requires": "isEnabled('diag-trace')",
|
|
28
|
+
"generatedDefinition": "MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
package/LICENSE-Boost
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
4
|
-
obtaining a copy of the software and accompanying documentation covered by
|
|
5
|
-
this license (the "Software") to use, reproduce, display, distribute,
|
|
6
|
-
execute, and transmit the Software, and to prepare derivative works of the
|
|
7
|
-
Software, and to permit third-parties to whom the Software is furnished to
|
|
8
|
-
do so, all subject to the following:
|
|
9
|
-
|
|
10
|
-
The copyright notices in the Software and this entire statement, including
|
|
11
|
-
the above license grant, this restriction and the following disclaimer,
|
|
12
|
-
must be included in all copies of the Software, in whole or in part, and
|
|
13
|
-
all derivative works of the Software, unless such copies or derivative
|
|
14
|
-
works are solely in the form of machine-executable object code generated by
|
|
15
|
-
a source language processor.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
20
|
-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
21
|
-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
22
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
23
|
-
DEALINGS IN THE SOFTWARE.
|