ceedling 1.1.5 → 1.1.7
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.
- checksums.yaml +4 -4
- data/GIT_COMMIT_SHA +1 -1
- data/Gemfile +4 -0
- data/Gemfile.lock +2 -0
- data/README.md +4 -1
- data/assets/tests_with_conditional_includes/src/feature_config.h +13 -0
- data/assets/tests_with_conditional_includes/src/feature_extra.h +13 -0
- data/assets/tests_with_conditional_includes/src/local_flag_extra.h +13 -0
- data/assets/tests_with_conditional_includes/src/nested_extra.h +13 -0
- data/assets/tests_with_conditional_includes/src/nested_wrapper.h +16 -0
- data/assets/tests_with_conditional_includes/src/project_flag_extra.h +13 -0
- data/assets/tests_with_conditional_includes/src/widget.c +48 -0
- data/assets/tests_with_conditional_includes/src/widget.h +15 -0
- data/assets/tests_with_conditional_includes/src/widget_feature.c +29 -0
- data/assets/tests_with_conditional_includes/src/widget_feature.h +13 -0
- data/assets/tests_with_conditional_includes/test/test_widget.c +44 -0
- data/assets/tests_with_conditional_includes/test/test_widget_feature.c +31 -0
- data/docs/Changelog.md +31 -1
- data/docs/KnownIssues.md +1 -0
- data/docs/mkdocs/configuration/project-file.md +25 -7
- data/docs/mkdocs/configuration/reference/cexception.md +1 -1
- data/docs/mkdocs/configuration/reference/cmock.md +1 -1
- data/docs/mkdocs/configuration/reference/unity.md +1 -1
- data/docs/mkdocs/getting-started/quick-start.md +11 -8
- data/docs/mkdocs/plugins/gcov/gcovr.md +324 -189
- data/docs/mkdocs/plugins/gcov/reportgenerator.md +113 -31
- data/docs/mkdocs/reference/gcov-plugin.md +21 -3
- data/docs/mkdocs/snapshot/plugins/gcov/config/defaults.yml +0 -1
- data/examples/wondrous_forest/src/SensorHal.h +13 -0
- data/examples/wondrous_forest/src/TemperatureSensor.c +12 -5
- data/examples/wondrous_forest/src/TemperatureSensor.h +5 -4
- data/examples/wondrous_forest/test/TestTemperatureSensor.c +32 -3
- data/lib/ceedling/generators/generator_test_results_backtrace.rb +16 -8
- data/lib/ceedling/generators/generator_test_runner.rb +25 -1
- data/lib/ceedling/partials/partializer.rb +8 -1
- data/lib/ceedling/plugins/plugin_reportinator.rb +9 -0
- data/lib/ceedling/plugins/report_tests_stdout_plugin.rb +1 -1
- data/lib/ceedling/preprocess/preprocessinator.rb +22 -0
- data/lib/ceedling/preprocess/preprocessinator_includes_handler.rb +33 -0
- data/lib/version.rb +1 -1
- data/plugins/gcov/config/defaults.yml +0 -1
- data/plugins/gcov/lib/gcov.rb +35 -16
- data/plugins/gcov/lib/gcovr_reportinator.rb +31 -1
- data/plugins/valgrind/lib/valgrind.rb +1 -1
- data/site-local/configuration/project-file.html +78 -8
- data/site-local/configuration/reference/cexception.html +5 -5
- data/site-local/configuration/reference/cmock.html +5 -5
- data/site-local/configuration/reference/unity.html +5 -5
- data/site-local/getting-started/quick-start.html +13 -9
- data/site-local/plugins/gcov/gcovr.html +1215 -255
- data/site-local/plugins/gcov/reportgenerator.html +404 -46
- data/site-local/reference/gcov-plugin.html +40 -7
- data/site-local/sitemap.xml.gz +0 -0
- data/site-local/snapshot/plugins/gcov/config/defaults.yml +0 -1
- data/spec/support/system/spec_system_helper.rb +11 -0
- data/spec/support/system/system_context.rb +25 -12
- data/spec/system/conditional_include_macro_visibility_spec.rb +152 -0
- data/spec/system/deployment_as_gem_spec.rb +2 -0
- data/spec/system/deployment_as_vendor_spec.rb +2 -0
- data/spec/system/encoding_stress_spec.rb +4 -4
- data/spec/system/example_wondrous_forest_spec.rb +2 -2
- data/spec/system/gcov_deployment_spec.rb +2 -0
- data/spec/system/support/common_test_cases.rb +47 -1
- data/spec/system/support/gcov_common_test_cases.rb +52 -0
- data/spec/system/test_runner_system_include_spec.rb +90 -0
- data/spec/units/generators/generator_test_results_backtrace_spec.rb +51 -0
- data/spec/units/generators/generator_test_runner_spec.rb +69 -0
- data/spec/units/partials/partializer_spec.rb +69 -0
- data/spec/units/plugin_reportinator_spec.rb +38 -0
- data/spec/units/preprocess/preprocessinator_includes_handler_spec.rb +61 -0
- data/spec/units/preprocess/preprocessinator_spec.rb +136 -0
- data/vendor/c_exception/lib/CException.h +1 -1
- data/vendor/c_exception/project.yml +2 -2
- data/vendor/c_exception/test/TestException.c +1 -1
- data/vendor/c_exception/test/support/CExceptionConfig.h +5 -11
- data/vendor/cmock/docs/CMockChangeLog.md +23 -22
- data/vendor/cmock/scripts/create_makefile.rb +4 -3
- data/vendor/cmock/src/cmock.h +1 -1
- data/vendor/cmock/vendor/c_exception/lib/CException.h +1 -1
- data/vendor/cmock/vendor/c_exception/project.yml +2 -2
- data/vendor/cmock/vendor/c_exception/test/TestException.c +1 -1
- data/vendor/cmock/vendor/c_exception/test/support/CExceptionConfig.h +5 -11
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +85 -29
- data/vendor/cmock/vendor/unity/docs/UnityChangeLog.md +1 -0
- data/vendor/cmock/vendor/unity/examples/unity_config.h +8 -0
- data/vendor/cmock/vendor/unity/src/unity.c +9 -1
- data/vendor/cmock/vendor/unity/src/unity.h +1 -1
- data/vendor/cmock/vendor/unity/test/rakefile +2 -1
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorEmpty.c +13 -0
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +31 -0
- data/vendor/unity/auto/generate_test_runner.rb +63 -57
- data/vendor/unity/docs/UnityChangeLog.md +1 -0
- data/vendor/unity/examples/unity_config.h +8 -0
- data/vendor/unity/src/unity.c +9 -1
- data/vendor/unity/src/unity.h +1 -1
- data/vendor/unity/test/rakefile +2 -1
- data/vendor/unity/test/tests/test_generate_test_runner.rb +20 -0
- metadata +23 -3
- data/vendor/cmock/vendor/unity/auto/run_test.erb +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6379bc5002c0b3bbd2f670bffcbaf91afba5c0b5a8ea5438b626f758d8144f8d
|
|
4
|
+
data.tar.gz: 9b1dec28ef0fb39d47b41fb868522a1398f0b055f74e877a4afc64009fdb7ac3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d8db68c457e06b77007d1e954c4512a4c7e84abd13918546c31b5e05c4021e01e7ebafb5d3e85e0268d1742716e227d7860cdcc763f41f683c5d119f4841a998
|
|
7
|
+
data.tar.gz: 32ae8949567ae23bf7afff0deea71e66e06ea5dd6c56fcdde1dd561c5404020550ca9a65b11840f19ffde3a702fed80e73c2de03af0b8a1341490605a9b6b266
|
data/GIT_COMMIT_SHA
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b1534f9
|
data/Gemfile
CHANGED
|
@@ -15,6 +15,10 @@ gem "rake", ">= 12", "< 14"
|
|
|
15
15
|
gem "rr"
|
|
16
16
|
gem "require_all"
|
|
17
17
|
|
|
18
|
+
# `rexml` has been removed from the default gems in some Ruby versions -- needed
|
|
19
|
+
# explicitly by the gcov Partials system-test cases, which parse gcovr's XML output.
|
|
20
|
+
gem "rexml"
|
|
21
|
+
|
|
18
22
|
# Ceedling dependencies
|
|
19
23
|
gem "diy", "~> 1.1"
|
|
20
24
|
gem "constructor", "~> 2"
|
data/Gemfile.lock
CHANGED
|
@@ -11,6 +11,7 @@ GEM
|
|
|
11
11
|
parallel (1.28.0)
|
|
12
12
|
rake (13.2.1)
|
|
13
13
|
require_all (3.0.0)
|
|
14
|
+
rexml (3.4.4)
|
|
14
15
|
rr (3.1.2)
|
|
15
16
|
rspec (3.13.2)
|
|
16
17
|
rspec-core (~> 3.13.0)
|
|
@@ -48,6 +49,7 @@ DEPENDENCIES
|
|
|
48
49
|
parallel (~> 1.26)
|
|
49
50
|
rake (>= 12, < 14)
|
|
50
51
|
require_all
|
|
52
|
+
rexml
|
|
51
53
|
rr
|
|
52
54
|
rspec (~> 3.8)
|
|
53
55
|
thor (~> 1.3)
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Ceedling 
|
|
2
2
|
========
|
|
3
3
|
|
|
4
|
-
**Ceedling 1.1.
|
|
4
|
+
**Ceedling 1.1.7** is the latest and greatest.
|
|
5
5
|
|
|
6
6
|
See [_Release Notes_][release-notes], [_Changelog_](docs/Changelog.md),
|
|
7
7
|
[_Breaking Changes_][breaking-changes], and [_Known Issues_][known-issues].
|
|
@@ -101,6 +101,9 @@ awesomeness in the C language.
|
|
|
101
101
|
1. **[CMock]**<sup>†</sup>, a code generating,
|
|
102
102
|
[function mocking & stubbing][test-doubles] kit for interaction-based testing.
|
|
103
103
|
|
|
104
|
+
If you are a Visual Studio Code user, you may also be interested in the
|
|
105
|
+
[Ceedling extension](https://marketplace.visualstudio.com/items?itemName=throw-the-switch.vscode-ceedling).
|
|
106
|
+
|
|
104
107
|
<sup>†</sup> Through a [plugin][FFF-plugin], Ceedling also supports [FFF] for
|
|
105
108
|
[fake functions][test-doubles] as an alternative to CMock’s mocks and stubs.
|
|
106
109
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
#ifndef FEATURE_CONFIG_H
|
|
9
|
+
#define FEATURE_CONFIG_H
|
|
10
|
+
|
|
11
|
+
#define FEATURE_LEVEL (2)
|
|
12
|
+
|
|
13
|
+
#endif // FEATURE_CONFIG_H
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
#ifndef FEATURE_EXTRA_H
|
|
9
|
+
#define FEATURE_EXTRA_H
|
|
10
|
+
|
|
11
|
+
#define FEATURE_EXTRA_MACRO (7)
|
|
12
|
+
|
|
13
|
+
#endif // FEATURE_EXTRA_H
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
#ifndef LOCAL_FLAG_EXTRA_H
|
|
9
|
+
#define LOCAL_FLAG_EXTRA_H
|
|
10
|
+
|
|
11
|
+
#define LOCAL_FLAG_MACRO (11)
|
|
12
|
+
|
|
13
|
+
#endif // LOCAL_FLAG_EXTRA_H
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
#ifndef NESTED_EXTRA_H
|
|
9
|
+
#define NESTED_EXTRA_H
|
|
10
|
+
|
|
11
|
+
#define NESTED_MACRO (17)
|
|
12
|
+
|
|
13
|
+
#endif // NESTED_EXTRA_H
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
/* widget.c includes this wrapper directly; nested_extra.h is only ever
|
|
9
|
+
* reached transitively through it, never named directly by widget.c. */
|
|
10
|
+
|
|
11
|
+
#ifndef NESTED_WRAPPER_H
|
|
12
|
+
#define NESTED_WRAPPER_H
|
|
13
|
+
|
|
14
|
+
#include "nested_extra.h"
|
|
15
|
+
|
|
16
|
+
#endif // NESTED_WRAPPER_H
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
#ifndef PROJECT_FLAG_EXTRA_H
|
|
9
|
+
#define PROJECT_FLAG_EXTRA_H
|
|
10
|
+
|
|
11
|
+
#define PROJECT_FLAG_MACRO (13)
|
|
12
|
+
|
|
13
|
+
#endif // PROJECT_FLAG_EXTRA_H
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
#include "widget.h"
|
|
9
|
+
|
|
10
|
+
/* (a) Conditional include gated on a project-level :defines macro. */
|
|
11
|
+
#ifdef PROJECT_FLAG
|
|
12
|
+
#include "project_flag_extra.h"
|
|
13
|
+
#endif
|
|
14
|
+
|
|
15
|
+
#define LOCAL_FLAG (1)
|
|
16
|
+
|
|
17
|
+
/* (b) Conditional include gated on a macro #define'd earlier in this same file. */
|
|
18
|
+
#if LOCAL_FLAG
|
|
19
|
+
#include "local_flag_extra.h"
|
|
20
|
+
#endif
|
|
21
|
+
|
|
22
|
+
/* (c) Reached only transitively, via nested_wrapper.h's own #include -- never
|
|
23
|
+
* itself named directly by this file. Must not appear as a duplicate,
|
|
24
|
+
* spuriously-promoted top-level #include in generated output. */
|
|
25
|
+
#include "nested_wrapper.h"
|
|
26
|
+
|
|
27
|
+
static int Widget__FromProjectFlag(void)
|
|
28
|
+
{
|
|
29
|
+
#ifdef PROJECT_FLAG
|
|
30
|
+
return PROJECT_FLAG_MACRO;
|
|
31
|
+
#else
|
|
32
|
+
return 0;
|
|
33
|
+
#endif
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static int Widget__FromLocalFlag(void)
|
|
37
|
+
{
|
|
38
|
+
return LOCAL_FLAG_MACRO;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static int Widget__FromNested(void)
|
|
42
|
+
{
|
|
43
|
+
return NESTED_MACRO;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
int Widget_FromProjectFlag(void) { return Widget__FromProjectFlag(); }
|
|
47
|
+
int Widget_FromLocalFlag(void) { return Widget__FromLocalFlag(); }
|
|
48
|
+
int Widget_FromNested(void) { return Widget__FromNested(); }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
#ifndef WIDGET_H
|
|
9
|
+
#define WIDGET_H
|
|
10
|
+
|
|
11
|
+
int Widget_FromProjectFlag(void);
|
|
12
|
+
int Widget_FromLocalFlag(void);
|
|
13
|
+
int Widget_FromNested(void);
|
|
14
|
+
|
|
15
|
+
#endif // WIDGET_H
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
/* Reproduces issue #1223: a conditional #include guarded by a macro defined
|
|
9
|
+
* in an EARLIER #include in this same file (as opposed to a project :defines
|
|
10
|
+
* macro or a same-file #define, both of which already work correctly -- see
|
|
11
|
+
* widget.c). Ceedling's bare-includes extraction pass runs against an
|
|
12
|
+
* isolated, sibling-free copy of this file and so never actually opens
|
|
13
|
+
* feature_config.h to learn FEATURE_LEVEL's value, evaluating the #if below
|
|
14
|
+
* as false and silently dropping feature_extra.h from the generated Partial
|
|
15
|
+
* even though FEATURE_LEVEL is genuinely > 1. */
|
|
16
|
+
|
|
17
|
+
#include "widget_feature.h"
|
|
18
|
+
#include "feature_config.h" /* defines FEATURE_LEVEL (2) */
|
|
19
|
+
|
|
20
|
+
#if FEATURE_LEVEL > 1
|
|
21
|
+
#include "feature_extra.h" /* defines FEATURE_EXTRA_MACRO */
|
|
22
|
+
#endif
|
|
23
|
+
|
|
24
|
+
static int WidgetFeature__FromFeatureLevel(void)
|
|
25
|
+
{
|
|
26
|
+
return FEATURE_EXTRA_MACRO;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
int WidgetFeature_FromFeatureLevel(void) { return WidgetFeature__FromFeatureLevel(); }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
#ifndef WIDGET_FEATURE_H
|
|
9
|
+
#define WIDGET_FEATURE_H
|
|
10
|
+
|
|
11
|
+
int WidgetFeature_FromFeatureLevel(void);
|
|
12
|
+
|
|
13
|
+
#endif // WIDGET_FEATURE_H
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
/* Partials pattern: TEST_PARTIAL_ALL_MODULE
|
|
9
|
+
* Exercises three #include-discovery scenarios that already work correctly
|
|
10
|
+
* without any source fix -- a regression guard locked in before touching
|
|
11
|
+
* the includes-discovery pipeline:
|
|
12
|
+
* (a) conditional include gated on a project :defines macro
|
|
13
|
+
* (b) conditional include gated on a same-file #define
|
|
14
|
+
* (c) a header reached only transitively (never itself directly
|
|
15
|
+
* #include'd by widget.c) correctly not duplicated in as a false
|
|
16
|
+
* top-level entry */
|
|
17
|
+
|
|
18
|
+
#include "unity.h"
|
|
19
|
+
#include "ceedling.h"
|
|
20
|
+
|
|
21
|
+
#include TEST_PARTIAL_ALL_MODULE(widget)
|
|
22
|
+
|
|
23
|
+
void setUp(void)
|
|
24
|
+
{
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
void tearDown(void)
|
|
28
|
+
{
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
void test_FromProjectFlag_ReturnsProjectFlagMacro(void)
|
|
32
|
+
{
|
|
33
|
+
TEST_ASSERT_EQUAL_INT(13, Widget__FromProjectFlag());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
void test_FromLocalFlag_ReturnsLocalFlagMacro(void)
|
|
37
|
+
{
|
|
38
|
+
TEST_ASSERT_EQUAL_INT(11, Widget__FromLocalFlag());
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
void test_FromNested_ReturnsNestedMacro(void)
|
|
42
|
+
{
|
|
43
|
+
TEST_ASSERT_EQUAL_INT(17, Widget__FromNested());
|
|
44
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* =========================================================================
|
|
2
|
+
Ceedling - Test-Centered Build System for C
|
|
3
|
+
ThrowTheSwitch.org
|
|
4
|
+
Copyright (c) 2010-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
5
|
+
SPDX-License-Identifier: MIT
|
|
6
|
+
========================================================================= */
|
|
7
|
+
|
|
8
|
+
/* Partials pattern: TEST_PARTIAL_ALL_MODULE
|
|
9
|
+
* Regression test for #1223: without the fix, this fails to *compile* --
|
|
10
|
+
* FEATURE_EXTRA_MACRO is undeclared in the generated Partial implementation
|
|
11
|
+
* because feature_extra.h's conditional #include (guarded by a macro from
|
|
12
|
+
* an earlier #include in widget_feature.c) is silently dropped. See
|
|
13
|
+
* widget_feature.c for the full explanation. */
|
|
14
|
+
|
|
15
|
+
#include "unity.h"
|
|
16
|
+
#include "ceedling.h"
|
|
17
|
+
|
|
18
|
+
#include TEST_PARTIAL_ALL_MODULE(widget_feature)
|
|
19
|
+
|
|
20
|
+
void setUp(void)
|
|
21
|
+
{
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
void tearDown(void)
|
|
25
|
+
{
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
void test_FromFeatureLevel_ReturnsFeatureExtraMacro(void)
|
|
29
|
+
{
|
|
30
|
+
TEST_ASSERT_EQUAL_INT(7, WidgetFeature__FromFeatureLevel());
|
|
31
|
+
}
|
data/docs/Changelog.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
# 🌱 Ceedling Changelog
|
|
2
2
|
|
|
3
3
|
This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
@@ -10,6 +10,35 @@ This changelog is complemented by three other documents:
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
# [1.1.7] — 2026-09-03
|
|
14
|
+
|
|
15
|
+
## 💪 Fixed
|
|
16
|
+
|
|
17
|
+
- [#1251](https://github.com/ThrowTheSwitch/Ceedling/issues/1251) Fixed _Overall Test Summary_ not printing at logging verbosity of warning or error level on an otherwise all-passing test run.
|
|
18
|
+
- [#1252](https://github.com/ThrowTheSwitch/Ceedling/issues/1252) Fixed the Gcov plugin requiring `gcovr` to be installed for any build merely because the plugin was enabled, rather than only when a `gcov:` build actually runs.
|
|
19
|
+
- [#1080](https://github.com/ThrowTheSwitch/Ceedling/issues/1080) Fixed `:gcov ↳ :gcovr ↳ :fail_under_decision` failing every `gcov:` build outright — `gcovr` itself requires `--decisions` alongside `--fail-under-decision`, which Ceedling never supplied. A new `:decisions` option is also available directly. Each now reports a clear error if configured against a `gcovr` too old to support it (6.0 for `:decisions`, 7.0 for `:fail_under_decision`).
|
|
20
|
+
- Fixed a Unity `TEST_IGNORE_MESSAGE()` test case being misreported as crash evidence during crash-diagnosis retries when it shares a test file with a genuine crash.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# [1.1.6] — 2026-08-25
|
|
25
|
+
|
|
26
|
+
## 🌟 Added
|
|
27
|
+
|
|
28
|
+
- Latest patch releases of Unity, CMock, and CException.
|
|
29
|
+
|
|
30
|
+
## 💪 Fixed
|
|
31
|
+
|
|
32
|
+
- [#1223](https://github.com/ThrowTheSwitch/Ceedling/issues/1223) Fixed a conditional `#include` silently dropping out of generated code derived from preprocessed code, breaking compilation with an undeclared identifier error. The specific case involves a macro defined by another header included earlier in the same file.
|
|
33
|
+
- [#1216](https://github.com/ThrowTheSwitch/Ceedling/issues/1216) Fixed self-test issue that caused docs-related failures when the local documentation was unavailable (generated in CI but not necessarily present during self tests).
|
|
34
|
+
- [#1236](https://github.com/ThrowTheSwitch/Ceedling/issues/1236) Fixed an issue that converted system includes extracted from a test C file into user includes when generating a test runner (e.g. `#include <sys/stat.h>` became `#include "stat.h"`) and also stripped relative paths from all includes injected into a test runner.
|
|
35
|
+
|
|
36
|
+
### Partials
|
|
37
|
+
|
|
38
|
+
- [#1215](https://github.com/ThrowTheSwitch/Ceedling/issues/1215) Fixed `MOCK_PARTIAL_ALL_MODULE()`/`MOCK_PARTIAL_MODULE()` silently failing to partialize `inline` functions in some circumstances leading to duplicated symbols breaking compilation.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
13
42
|
# [1.1.5] — 2026-08-19
|
|
14
43
|
|
|
15
44
|
## 💪 Fixed
|
|
@@ -254,6 +283,7 @@ When test preprocessing is enabled, Ceedling discovers whether your toolchain su
|
|
|
254
283
|
|
|
255
284
|
## 👋 Removed
|
|
256
285
|
|
|
286
|
+
- `:use_deep_preprocessor` was a short-lived workaround option added after 1.0.0 for certain preprpocessing limitations. Those limitations are fully resolved, and test preprocessor options are now only `:use_test_preprocessor` and `:preprocess_force_fallback`. The latter should rarely be needed, leaving only the former as the only preprocessing feature toggle in Ceedling.
|
|
257
287
|
- _CeedlingPacket.md_ user manual (superseded by [new documentation site](https://throwtheswitch.github.io/Ceedling/) and local bundle).
|
|
258
288
|
- _PluginDevelopmentGuide.md_ (superseded by [new documentation site](https://throwtheswitch.github.io/Ceedling/) and local bundle).
|
|
259
289
|
|
data/docs/KnownIssues.md
CHANGED
|
@@ -29,6 +29,7 @@ Known issues are complemented by three other documents:
|
|
|
29
29
|
1. The new internal pipeline that allows builds to be parallelized and configured per-test-executable can mean a fair amount of duplication of steps. A header file may be mocked identically multiple times. The same source file may be compiled identically multiple times. The speed gains due to parallelization help make up for this. Future releases will concentrate on optimizing away duplication of build steps.
|
|
30
30
|
1. While header file search paths are now customizable per executable, this currently only applies to the search paths the compiler uses. Distinguishing test files or header files of the same name in different directories for test runner and mock generation respectively continues to rely on educated guesses in Ceedling code.
|
|
31
31
|
1. All header files needed for test compilation must be within the `:includes` path collection. Relative paths in include directives that extend outside the path collection will cause build problems.
|
|
32
|
+
1. C locales and non-ASCII characters (e.g. ©️ in a comment block) can cause parsing failures.
|
|
32
33
|
1. System header includes `#include <system.h>` may not be properly distinguished from user includes `#include "user.h"` in many test preprocessing scenarios.
|
|
33
34
|
1. Any path for a C file specified with `TEST_SOURCE_FILE(...)` is in relation to **_project root_** — that is, from where you execute `ceedling` at the command line. If you move source files or change your directory structure, many of your `TEST_SOURCE_FILE(...)` calls may need to be updated. A more flexible and dynamic approach to path handling will come in a future update.
|
|
34
35
|
1. Ceedling’s many test preprocessing improvements are not presently able to preserve Unity’s special `TEST_CASE()` and `TEST_RANGE()` features. However, preprocessing of test files is much less frequently needed than preprocessing of mockable header files. Test preprocessing can now be configured to enable only one or the other. As such, these advanced Unity features can still be used in even sophisticated projects.
|
|
@@ -8,11 +8,21 @@
|
|
|
8
8
|
|
|
9
9
|
## Some YAML Learnin’
|
|
10
10
|
|
|
11
|
-
Please consult YAML documentation for the finer points of format
|
|
12
|
-
and to understand details of our YAML-based configuration file.
|
|
13
|
-
|
|
14
11
|
We recommend [Wikipedia’s entry on YAML](http://en.wikipedia.org/wiki/Yaml)
|
|
15
|
-
|
|
12
|
+
and [educative.io’s advanced YAML cheatsheet](https://www.educative.io/blog/advanced-yaml-syntax-cheatsheet)
|
|
13
|
+
for a simple overview of YAML and its syntax sufficient for
|
|
14
|
+
understanding your Ceedling project configuration.
|
|
15
|
+
|
|
16
|
+
!!! tip "`ceedling dumpconfig` to verify your YAML"
|
|
17
|
+
Ceedling provides a means to export the final result of YAML
|
|
18
|
+
processing for your inspection via [`dumpconfig`](../getting-started/command-line.md#ceedling-dumpconfig-filepath-sections).
|
|
19
|
+
Dump output includes the resolution of advanced YAML features and
|
|
20
|
+
Ceedling’s own manipulations. This is a good way to troubleshoot
|
|
21
|
+
your project configuration.
|
|
22
|
+
|
|
23
|
+
### YAML highlights & overview
|
|
24
|
+
|
|
25
|
+
A few points from the preceding references:
|
|
16
26
|
|
|
17
27
|
* YAML streams are encoded using the set of printable Unicode
|
|
18
28
|
characters, either in UTF-8 or UTF-16.
|
|
@@ -40,9 +50,17 @@ for this. A few highlights from that reference page:
|
|
|
40
50
|
punctuation can generally be represented without needing
|
|
41
51
|
to be enclosed in quotes.
|
|
42
52
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
### YAML anchors, aliases, and extensions
|
|
54
|
+
|
|
55
|
+
YAML provides several “shortcuts” for referencing and modifying blocks
|
|
56
|
+
of YAML so you can avoid duplication. This is advanced YAML and
|
|
57
|
+
well beyond the scope of Ceedling documentation. However, know that
|
|
58
|
+
Ceedling’s YAML parser is entirely capable of handling these advanced
|
|
59
|
+
aspects of YAML.
|
|
60
|
+
|
|
61
|
+
See this [cheatsheet entry](https://www.educative.io/blog/advanced-yaml-syntax-cheatsheet#anchors)
|
|
62
|
+
and [this guide](https://blog.daemonl.com/2016/02/yaml.html)
|
|
63
|
+
for much more on these powerful but finicky features.
|
|
46
64
|
|
|
47
65
|
## Notes on Project File Structure
|
|
48
66
|
|
|
@@ -6,7 +6,7 @@ Ceedling sets values for a subset of CMock settings. All CMock options are
|
|
|
6
6
|
available to be set, but only those options set by Ceedling in an automated
|
|
7
7
|
fashion are documented below. See [CMock documentation][cmock-docs].
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Example `:cmock` YAML
|
|
10
10
|
|
|
11
11
|
```yaml
|
|
12
12
|
:cmock:
|
|
@@ -36,6 +36,11 @@ through running build tasks. Jump down just a teeny bit to see what the Ceedling
|
|
|
36
36
|
command line looks like and navigate to all the documentation for the steps
|
|
37
37
|
listed immediately below.
|
|
38
38
|
|
|
39
|
+
!!! warning "C toolchain requirement"
|
|
40
|
+
Ceedling requires a command line C toolchain be available in your path and is
|
|
41
|
+
flexible enough to work with most anything. By default, Ceedling is ready to
|
|
42
|
+
work with [GCC] out of the box (we recommend [MinGW] on Windows).
|
|
43
|
+
|
|
39
44
|
1. [Install Ceedling](installation.md)
|
|
40
45
|
1. Create a project
|
|
41
46
|
* Use Ceedling to generate an example project (see next section), or
|
|
@@ -46,15 +51,13 @@ listed immediately below.
|
|
|
46
51
|
1. Create a Ceedling project file in the root of your project directory.
|
|
47
52
|
1. Run Ceedling tasks (see next section) from the working directory of your project.
|
|
48
53
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
is ready to work with [GCC] out of the box (we recommend the [MinGW] project
|
|
53
|
-
on Windows).
|
|
54
|
+
A common build strategy is to use your target toolchain for release builds—with or
|
|
55
|
+
without Ceedling—but rely on Ceedling + GCC for test builds (more on this
|
|
56
|
+
[here][overview]).
|
|
54
57
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
!!! tip "Ceedling VS Code extension"
|
|
59
|
+
If you are a Visual Studio Code user, you may want to install the
|
|
60
|
+
[Ceedling extension](https://marketplace.visualstudio.com/items?itemName=throw-the-switch.vscode-ceedling).
|
|
58
61
|
|
|
59
62
|
[GCC]: https://gcc.gnu.org
|
|
60
63
|
[MinGW]: http://www.mingw.org/
|