ceedling 1.1.4 → 1.1.6

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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/GIT_COMMIT_SHA +1 -1
  3. data/README.md +1 -1
  4. data/assets/tests_with_conditional_includes/src/feature_config.h +13 -0
  5. data/assets/tests_with_conditional_includes/src/feature_extra.h +13 -0
  6. data/assets/tests_with_conditional_includes/src/local_flag_extra.h +13 -0
  7. data/assets/tests_with_conditional_includes/src/nested_extra.h +13 -0
  8. data/assets/tests_with_conditional_includes/src/nested_wrapper.h +16 -0
  9. data/assets/tests_with_conditional_includes/src/project_flag_extra.h +13 -0
  10. data/assets/tests_with_conditional_includes/src/widget.c +48 -0
  11. data/assets/tests_with_conditional_includes/src/widget.h +15 -0
  12. data/assets/tests_with_conditional_includes/src/widget_feature.c +29 -0
  13. data/assets/tests_with_conditional_includes/src/widget_feature.h +13 -0
  14. data/assets/tests_with_conditional_includes/test/test_widget.c +44 -0
  15. data/assets/tests_with_conditional_includes/test/test_widget_feature.c +31 -0
  16. data/docs/Changelog.md +31 -1
  17. data/docs/mkdocs/configuration/reference/partials.md +7 -7
  18. data/examples/wondrous_forest/src/SensorHal.h +13 -0
  19. data/examples/wondrous_forest/src/TemperatureSensor.c +12 -5
  20. data/examples/wondrous_forest/src/TemperatureSensor.h +5 -4
  21. data/examples/wondrous_forest/test/TestTemperatureSensor.c +32 -3
  22. data/lib/ceedling/generators/generator_partials.rb +20 -1
  23. data/lib/ceedling/generators/generator_test_runner.rb +25 -1
  24. data/lib/ceedling/partials/partializer.rb +8 -1
  25. data/lib/ceedling/preprocess/preprocessinator.rb +22 -0
  26. data/lib/ceedling/preprocess/preprocessinator_includes_handler.rb +33 -0
  27. data/lib/ceedling/test_invoker/test_build_executor.rb +3 -1
  28. data/lib/version.rb +1 -1
  29. data/site-local/configuration/reference/partials.html +11 -10
  30. data/site-local/sitemap.xml.gz +0 -0
  31. data/spec/support/system/spec_system_helper.rb +11 -0
  32. data/spec/support/system/system_context.rb +18 -9
  33. data/spec/system/conditional_include_macro_visibility_spec.rb +152 -0
  34. data/spec/system/encoding_stress_spec.rb +4 -4
  35. data/spec/system/example_wondrous_forest_spec.rb +2 -2
  36. data/spec/system/support/common_test_cases.rb +5 -1
  37. data/spec/system/test_runner_system_include_spec.rb +90 -0
  38. data/spec/units/generators/generator_partials_spec.rb +111 -8
  39. data/spec/units/generators/generator_test_runner_spec.rb +69 -0
  40. data/spec/units/partials/partializer_spec.rb +69 -0
  41. data/spec/units/preprocess/preprocessinator_includes_handler_spec.rb +61 -0
  42. data/spec/units/preprocess/preprocessinator_spec.rb +136 -0
  43. data/vendor/c_exception/lib/CException.h +1 -1
  44. data/vendor/c_exception/project.yml +2 -2
  45. data/vendor/c_exception/test/TestException.c +1 -1
  46. data/vendor/c_exception/test/support/CExceptionConfig.h +5 -11
  47. data/vendor/cmock/docs/CMockChangeLog.md +23 -22
  48. data/vendor/cmock/scripts/create_makefile.rb +4 -3
  49. data/vendor/cmock/src/cmock.h +1 -1
  50. data/vendor/cmock/vendor/c_exception/lib/CException.h +1 -1
  51. data/vendor/cmock/vendor/c_exception/project.yml +2 -2
  52. data/vendor/cmock/vendor/c_exception/test/TestException.c +1 -1
  53. data/vendor/cmock/vendor/c_exception/test/support/CExceptionConfig.h +5 -11
  54. data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +85 -29
  55. data/vendor/cmock/vendor/unity/docs/UnityChangeLog.md +1 -0
  56. data/vendor/cmock/vendor/unity/examples/unity_config.h +8 -0
  57. data/vendor/cmock/vendor/unity/src/unity.c +9 -1
  58. data/vendor/cmock/vendor/unity/src/unity.h +1 -1
  59. data/vendor/cmock/vendor/unity/test/rakefile +2 -1
  60. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorEmpty.c +13 -0
  61. data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +31 -0
  62. data/vendor/unity/auto/generate_test_runner.rb +63 -57
  63. data/vendor/unity/docs/UnityChangeLog.md +1 -0
  64. data/vendor/unity/examples/unity_config.h +8 -0
  65. data/vendor/unity/src/unity.c +9 -1
  66. data/vendor/unity/src/unity.h +1 -1
  67. data/vendor/unity/test/rakefile +2 -1
  68. data/vendor/unity/test/tests/test_generate_test_runner.rb +20 -0
  69. metadata +21 -3
  70. data/vendor/cmock/vendor/unity/auto/run_test.erb +0 -37
@@ -1314,6 +1314,26 @@ def verify_number(expected, expression, output)
1314
1314
  end
1315
1315
  end
1316
1316
 
1317
+ should 'GenerateSuiteTeardownWhenBeginAndEndAreOmitted' do
1318
+ runner_name = OUT_FILE + 'SuiteTeardownWithoutBeginEnd_runner.c'
1319
+ UnityTestRunnerGenerator.new(
1320
+ :test_prefix => 'test',
1321
+ :suite_teardown => ' return num_failures;',
1322
+ :omit_begin_end => true,
1323
+ ).run('testdata/testRunnerGenerator.c', runner_name)
1324
+
1325
+ runner = File.read(runner_name)
1326
+ correct_call = runner.include?('(void) suiteTearDown(0);')
1327
+ incorrect_call = runner.include?('(void) suite_teardown(0);')
1328
+ if correct_call && !incorrect_call
1329
+ report 'Runner_GenerateSuiteTeardownWhenBeginAndEndAreOmitted:PASS'
1330
+ else
1331
+ report 'Runner_GenerateSuiteTeardownWhenBeginAndEndAreOmitted:FAIL'
1332
+ $generate_test_runner_failures += 1
1333
+ end
1334
+ $generate_test_runner_tests += 1
1335
+ end
1336
+
1317
1337
  RUNNER_TESTS.each do |testset|
1318
1338
  basename = File.basename(testset[:testfile], C_EXTENSION)
1319
1339
  testset_name = "Runner_#{basename}_#{testset[:name]}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ceedling
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark VanderVoord
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2026-08-14 00:00:00.000000000 Z
13
+ date: 2026-08-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -203,6 +203,18 @@ files:
203
203
  - assets/test_example_with_parameterized_tests.c
204
204
  - assets/test_partial_all_module.c
205
205
  - assets/test_same_dir_pairing.c
206
+ - assets/tests_with_conditional_includes/src/feature_config.h
207
+ - assets/tests_with_conditional_includes/src/feature_extra.h
208
+ - assets/tests_with_conditional_includes/src/local_flag_extra.h
209
+ - assets/tests_with_conditional_includes/src/nested_extra.h
210
+ - assets/tests_with_conditional_includes/src/nested_wrapper.h
211
+ - assets/tests_with_conditional_includes/src/project_flag_extra.h
212
+ - assets/tests_with_conditional_includes/src/widget.c
213
+ - assets/tests_with_conditional_includes/src/widget.h
214
+ - assets/tests_with_conditional_includes/src/widget_feature.c
215
+ - assets/tests_with_conditional_includes/src/widget_feature.h
216
+ - assets/tests_with_conditional_includes/test/test_widget.c
217
+ - assets/tests_with_conditional_includes/test/test_widget_feature.c
206
218
  - assets/tests_with_defines/src/adc_hardware.c
207
219
  - assets/tests_with_defines/src/adc_hardware.h
208
220
  - assets/tests_with_defines/src/adc_hardware_configurator.c
@@ -923,6 +935,7 @@ files:
923
935
  - spec/support/test_example_ignore.pass
924
936
  - spec/support/test_example_mangled.pass
925
937
  - spec/support/test_example_with_time.pass
938
+ - spec/system/conditional_include_macro_visibility_spec.rb
926
939
  - spec/system/cppcheck_deployment_spec.rb
927
940
  - spec/system/deployment_as_gem_spec.rb
928
941
  - spec/system/deployment_as_vendor_spec.rb
@@ -945,6 +958,7 @@ files:
945
958
  - spec/system/support/gcov_partials_test_cases.rb
946
959
  - spec/system/support/valgrind_common_test_cases.rb
947
960
  - spec/system/support/valgrind_helpers.rb
961
+ - spec/system/test_runner_system_include_spec.rb
948
962
  - spec/system/upgrade_as_vendor_spec.rb
949
963
  - spec/system/valgrind_deployment_spec.rb
950
964
  - spec/units/bin/cli_helper_spec.rb
@@ -990,6 +1004,7 @@ files:
990
1004
  - spec/units/preprocess/preprocessinator_file_assembler_spec.rb
991
1005
  - spec/units/preprocess/preprocessinator_includes_handler_spec.rb
992
1006
  - spec/units/preprocess/preprocessinator_reconstructor_spec.rb
1007
+ - spec/units/preprocess/preprocessinator_spec.rb
993
1008
  - spec/units/reportinator_spec.rb
994
1009
  - spec/units/ruby_expandinator_spec.rb
995
1010
  - spec/units/system_utils_spec.rb
@@ -1306,7 +1321,6 @@ files:
1306
1321
  - vendor/cmock/vendor/unity/auto/generate_module.rb
1307
1322
  - vendor/cmock/vendor/unity/auto/generate_test_runner.rb
1308
1323
  - vendor/cmock/vendor/unity/auto/parse_output.rb
1309
- - vendor/cmock/vendor/unity/auto/run_test.erb
1310
1324
  - vendor/cmock/vendor/unity/auto/stylize_as_junit.py
1311
1325
  - vendor/cmock/vendor/unity/auto/stylize_as_junit.rb
1312
1326
  - vendor/cmock/vendor/unity/auto/test_file_filter.rb
@@ -1449,6 +1463,7 @@ files:
1449
1463
  - vendor/cmock/vendor/unity/test/testdata/cmock.h
1450
1464
  - vendor/cmock/vendor/unity/test/testdata/mockMock.h
1451
1465
  - vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c
1466
+ - vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorEmpty.c
1452
1467
  - vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c
1453
1468
  - vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c
1454
1469
  - vendor/cmock/vendor/unity/test/tests/self_assessment_utils.h
@@ -1771,6 +1786,7 @@ test_files:
1771
1786
  - spec/support/test_example_ignore.pass
1772
1787
  - spec/support/test_example_mangled.pass
1773
1788
  - spec/support/test_example_with_time.pass
1789
+ - spec/system/conditional_include_macro_visibility_spec.rb
1774
1790
  - spec/system/cppcheck_deployment_spec.rb
1775
1791
  - spec/system/deployment_as_gem_spec.rb
1776
1792
  - spec/system/deployment_as_vendor_spec.rb
@@ -1793,6 +1809,7 @@ test_files:
1793
1809
  - spec/system/support/gcov_partials_test_cases.rb
1794
1810
  - spec/system/support/valgrind_common_test_cases.rb
1795
1811
  - spec/system/support/valgrind_helpers.rb
1812
+ - spec/system/test_runner_system_include_spec.rb
1796
1813
  - spec/system/upgrade_as_vendor_spec.rb
1797
1814
  - spec/system/valgrind_deployment_spec.rb
1798
1815
  - spec/units/bin/cli_helper_spec.rb
@@ -1838,6 +1855,7 @@ test_files:
1838
1855
  - spec/units/preprocess/preprocessinator_file_assembler_spec.rb
1839
1856
  - spec/units/preprocess/preprocessinator_includes_handler_spec.rb
1840
1857
  - spec/units/preprocess/preprocessinator_reconstructor_spec.rb
1858
+ - spec/units/preprocess/preprocessinator_spec.rb
1841
1859
  - spec/units/reportinator_spec.rb
1842
1860
  - spec/units/ruby_expandinator_spec.rb
1843
1861
  - spec/units/system_utils_spec.rb
@@ -1,37 +0,0 @@
1
- /*=======Test Runner Used To Run Each Test=====*/
2
- static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE line_num)
3
- {
4
- Unity.CurrentTestName = name;
5
- Unity.CurrentTestLineNumber = (UNITY_UINT) line_num;
6
- #ifdef UNITY_USE_COMMAND_LINE_ARGS
7
- if (!UnityTestMatches())
8
- return;
9
- #endif
10
- Unity.NumberOfTests++;
11
- UNITY_CLR_DETAILS();
12
- UNITY_EXEC_TIME_START();
13
- CMock_Init();
14
- if (TEST_PROTECT())
15
- {
16
- <% if @options[:plugins].include?(:cexception) %>
17
- volatile CEXCEPTION_T e;
18
- Try {
19
- <%= @options[:setup_name] %>();
20
- func();
21
- } Catch(e) {
22
- TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!");
23
- }
24
- <% else %>
25
- <%= @options[:setup_name] %>();
26
- func();
27
- <% end %>
28
- }
29
- if (TEST_PROTECT())
30
- {
31
- <%= @options[:teardown_name] %>();
32
- CMock_Verify();
33
- }
34
- CMock_Destroy();
35
- UNITY_EXEC_TIME_STOP();
36
- UnityConcludeTest();
37
- }