ceedling 0.25.0 → 0.27.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 (434) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/project_as_gem.yml +13 -0
  4. data/assets/project_with_guts.yml +13 -0
  5. data/bin/ceedling +91 -67
  6. data/docs/CeedlingPacket.md +61 -23
  7. data/docs/CeedlingPacket.odt +0 -0
  8. data/docs/CeedlingPacket.pdf +0 -0
  9. data/docs/ThrowTheSwitchCodingStandard.md +207 -0
  10. data/examples/temp_sensor/test/TestTemperatureCalculator.c +4 -1
  11. data/lib/ceedling/configurator.rb +14 -1
  12. data/lib/ceedling/configurator_builder.rb +2 -1
  13. data/lib/ceedling/configurator_validator.rb +12 -3
  14. data/lib/ceedling/constants.rb +3 -1
  15. data/lib/ceedling/defaults.rb +12 -1
  16. data/lib/ceedling/file_finder.rb +3 -0
  17. data/lib/ceedling/file_path_utils.rb +1 -1
  18. data/lib/ceedling/file_wrapper.rb +4 -4
  19. data/lib/ceedling/generator.rb +12 -3
  20. data/lib/ceedling/preprocessinator_helper.rb +5 -5
  21. data/lib/ceedling/preprocessinator_includes_handler.rb +10 -1
  22. data/lib/ceedling/project_config_manager.rb +1 -2
  23. data/lib/ceedling/project_file_loader.rb +27 -9
  24. data/lib/ceedling/rakefile.rb +6 -6
  25. data/lib/ceedling/release_invoker.rb +21 -6
  26. data/lib/ceedling/rules_release.rake +9 -5
  27. data/lib/ceedling/rules_tests.rake +6 -1
  28. data/lib/ceedling/setupinator.rb +1 -0
  29. data/lib/ceedling/tasks_base.rake +3 -0
  30. data/lib/ceedling/tasks_filesystem.rake +10 -7
  31. data/lib/ceedling/tasks_release.rake +3 -1
  32. data/lib/ceedling/test_includes_extractor.rb +16 -12
  33. data/lib/ceedling/test_invoker.rb +40 -0
  34. data/lib/ceedling/version.rb +3 -3
  35. data/lib/ceedling/version.rb.erb +1 -1
  36. data/plugins/command_hooks/lib/command_hooks.rb +1 -1
  37. data/plugins/fake_function_framework/examples/fff_example/src/bar.h +1 -0
  38. data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +1 -0
  39. data/plugins/fake_function_framework/lib/fff_mock_generator.rb +4 -0
  40. data/plugins/fake_function_framework/spec/{fff_mock_generator_spec.rb → fff_mock_header_generator_spec.rb} +34 -194
  41. data/plugins/fake_function_framework/spec/fff_mock_source_generator_spec.rb +149 -0
  42. data/plugins/fake_function_framework/spec/header_generator.rb +51 -0
  43. data/plugins/junit_tests_report/lib/junit_tests_report.rb +115 -0
  44. data/plugins/subprojects/README.md +63 -0
  45. data/plugins/subprojects/config/defaults.yml +33 -0
  46. data/plugins/subprojects/lib/subprojects.rb +92 -0
  47. data/plugins/subprojects/subprojects.rake +78 -0
  48. data/spec/preprocessinator_includes_handler_spec.rb +15 -5
  49. data/spec/spec_helper.rb +2 -2
  50. data/spec/spec_system_helper.rb +49 -1
  51. data/spec/system/deployment_spec.rb +29 -0
  52. data/vendor/c_exception/README.md +8 -2
  53. data/vendor/c_exception/docs/{readme.txt → CException.md} +133 -102
  54. data/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
  55. data/vendor/c_exception/vendor/unity/README.md +19 -10
  56. data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +67 -64
  57. data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +20 -20
  58. data/vendor/c_exception/vendor/unity/auto/generate_module.rb +149 -142
  59. data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +234 -232
  60. data/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
  61. data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +108 -120
  62. data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +11 -9
  63. data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +1 -3
  64. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +6 -2
  65. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +45 -57
  66. data/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
  67. data/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  68. data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
  69. data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
  70. data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
  71. data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
  72. data/vendor/c_exception/vendor/unity/examples/example_1/makefile +22 -17
  73. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
  74. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
  75. data/vendor/c_exception/vendor/unity/examples/example_2/makefile +16 -17
  76. data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +15 -15
  77. data/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
  78. data/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +4 -10
  79. data/vendor/c_exception/vendor/unity/examples/unity_config.h +14 -26
  80. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +12 -12
  81. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
  82. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
  83. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
  84. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
  85. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
  86. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
  87. data/vendor/c_exception/vendor/unity/src/unity.c +396 -330
  88. data/vendor/c_exception/vendor/unity/src/unity.h +50 -4
  89. data/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -84
  90. data/vendor/c_exception/vendor/unity/test/Makefile +17 -17
  91. data/vendor/c_exception/vendor/unity/test/rakefile +63 -3
  92. data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +108 -105
  93. data/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
  94. data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -6
  95. data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +1 -9
  96. data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
  97. data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
  98. data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
  99. data/vendor/c_exception/vendor/unity/test/tests/testunity.c +1338 -151
  100. data/vendor/cmock/README.md +10 -1
  101. data/vendor/cmock/config/test_environment.rb +7 -7
  102. data/vendor/cmock/docs/CMock_Summary.md +325 -128
  103. data/vendor/cmock/docs/ThrowTheSwitchCodingStandard.md +207 -0
  104. data/vendor/cmock/examples/make_example/Makefile +2 -2
  105. data/vendor/cmock/examples/temp_sensor/gcc.yml +5 -4
  106. data/vendor/cmock/examples/temp_sensor/iar_v4.yml +5 -4
  107. data/vendor/cmock/examples/temp_sensor/iar_v5.yml +5 -4
  108. data/vendor/cmock/examples/temp_sensor/rakefile.rb +11 -1
  109. data/vendor/cmock/examples/temp_sensor/rakefile_helper.rb +12 -10
  110. data/vendor/cmock/lib/cmock.rb +0 -3
  111. data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +6 -2
  112. data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +2 -1
  113. data/vendor/cmock/lib/cmock_header_parser.rb +5 -6
  114. data/vendor/cmock/release/version.info +1 -1
  115. data/vendor/cmock/scripts/create_makefile.rb +4 -2
  116. data/vendor/cmock/scripts/test_summary.rb +17 -9
  117. data/vendor/cmock/src/cmock.c +1 -0
  118. data/vendor/cmock/src/cmock.h +1 -1
  119. data/vendor/cmock/src/cmock_internals.h +14 -1
  120. data/vendor/cmock/test/c/TestCMockC.yml +4 -4
  121. data/vendor/cmock/test/c/TestCMockCDynamic.yml +4 -4
  122. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_FLASH.mac +0 -0
  123. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_RAM.mac +0 -0
  124. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_SIM.mac +0 -0
  125. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/at91SAM7X256_FLASH.xcl +0 -0
  126. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/at91SAM7X256_RAM.xcl +0 -0
  127. data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/ioat91sam7x256.ddf +0 -0
  128. data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.dep +0 -0
  129. data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.ewd +0 -0
  130. data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.ewp +0 -0
  131. data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.eww +0 -0
  132. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X-EK.h +0 -0
  133. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.inc +0 -0
  134. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.rdf +0 -0
  135. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.tcl +0 -0
  136. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256_inc.h +0 -0
  137. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/ioat91sam7x256.h +0 -0
  138. data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/lib_AT91SAM7X256.h +0 -0
  139. data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.cspy.bat +0 -0
  140. data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.dbgdt +0 -0
  141. data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.dni +0 -0
  142. data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.wsdt +0 -0
  143. data/vendor/cmock/{iar → test/iar}/iar_v4/srcIAR/Cstartup.s79 +0 -0
  144. data/vendor/cmock/{iar → test/iar}/iar_v4/srcIAR/Cstartup_SAM7.c +0 -0
  145. data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_FLASH.mac +0 -0
  146. data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_RAM.mac +0 -0
  147. data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_SIM.mac +0 -0
  148. data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/at91SAM7X256_FLASH.icf +0 -0
  149. data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/at91SAM7X256_RAM.icf +0 -0
  150. data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.dep +0 -0
  151. data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.ewd +0 -0
  152. data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.ewp +0 -0
  153. data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.eww +0 -0
  154. data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/AT91SAM7X-EK.h +0 -0
  155. data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/AT91SAM7X256_inc.h +0 -0
  156. data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/lib_AT91SAM7X256.h +0 -0
  157. data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/project.h +0 -0
  158. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +0 -0
  159. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.dbgdt +0 -0
  160. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.dni +0 -0
  161. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.wsdt +0 -0
  162. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +0 -0
  163. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.cspy.bat +0 -0
  164. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.dbgdt +0 -0
  165. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.dni +0 -0
  166. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.wsdt +0 -0
  167. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_Binary.jlink +0 -0
  168. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +0 -0
  169. data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_RAM_Debug.jlink +0 -0
  170. data/vendor/cmock/{iar → test/iar}/iar_v5/srcIAR/Cstartup.s +0 -0
  171. data/vendor/cmock/{iar → test/iar}/iar_v5/srcIAR/Cstartup_SAM7.c +0 -0
  172. data/vendor/cmock/{Rakefile → test/rakefile} +9 -9
  173. data/vendor/cmock/{rakefile_helper.rb → test/rakefile_helper.rb} +13 -13
  174. data/vendor/cmock/test/system/test_compilation/config.yml +4 -4
  175. data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +2 -0
  176. data/vendor/cmock/{targets → test/targets}/clang_strict.yml +11 -11
  177. data/vendor/cmock/{targets → test/targets}/gcc.yml +9 -9
  178. data/vendor/cmock/{targets → test/targets}/gcc_64.yml +9 -9
  179. data/vendor/cmock/{targets → test/targets}/gcc_tiny.yml +9 -9
  180. data/vendor/cmock/{targets → test/targets}/iar_arm_v4.yml +9 -9
  181. data/vendor/cmock/{targets → test/targets}/iar_arm_v5.yml +10 -10
  182. data/vendor/cmock/test/test_helper.rb +4 -8
  183. data/vendor/cmock/test/unit/cmock_config_test.rb +1 -1
  184. data/vendor/cmock/test/unit/cmock_file_writer_test.rb +1 -1
  185. data/vendor/cmock/test/unit/cmock_generator_main_test.rb +1 -1
  186. data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +1 -1
  187. data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +3 -1
  188. data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +1 -1
  189. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +1 -1
  190. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +1 -1
  191. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +1 -1
  192. data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +1 -1
  193. data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +1 -1
  194. data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +1 -1
  195. data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +1 -1
  196. data/vendor/cmock/test/unit/cmock_header_parser_test.rb +15 -2
  197. data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +6 -10
  198. data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +1 -1
  199. data/vendor/cmock/vendor/c_exception/README.md +8 -2
  200. data/vendor/cmock/vendor/c_exception/docs/{readme.txt → CException.md} +133 -102
  201. data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
  202. data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +19 -10
  203. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +67 -64
  204. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +20 -20
  205. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +149 -142
  206. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +234 -232
  207. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
  208. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +108 -120
  209. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +11 -9
  210. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +1 -3
  211. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +6 -2
  212. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +45 -57
  213. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
  214. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  215. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
  216. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
  217. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
  218. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
  219. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +22 -17
  220. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
  221. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
  222. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +16 -17
  223. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +15 -15
  224. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
  225. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +4 -10
  226. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +14 -26
  227. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +12 -12
  228. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
  229. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
  230. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
  231. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
  232. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
  233. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
  234. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +396 -330
  235. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +50 -4
  236. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -84
  237. data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +17 -17
  238. data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +63 -3
  239. data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +108 -105
  240. data/vendor/cmock/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
  241. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -6
  242. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +1 -9
  243. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
  244. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
  245. data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
  246. data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testunity.c +1338 -151
  247. data/vendor/cmock/vendor/unity/README.md +19 -10
  248. data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +67 -64
  249. data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +20 -20
  250. data/vendor/cmock/vendor/unity/auto/generate_module.rb +149 -142
  251. data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +234 -232
  252. data/vendor/cmock/vendor/unity/auto/parse_output.rb +220 -0
  253. data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +108 -120
  254. data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +11 -9
  255. data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +1 -3
  256. data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +6 -2
  257. data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +45 -57
  258. data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
  259. data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  260. data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +716 -0
  261. data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
  262. data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
  263. data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
  264. data/vendor/cmock/vendor/unity/examples/example_1/makefile +22 -17
  265. data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
  266. data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
  267. data/vendor/cmock/vendor/unity/examples/example_2/makefile +16 -17
  268. data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +15 -15
  269. data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
  270. data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +4 -10
  271. data/vendor/cmock/vendor/unity/examples/unity_config.h +14 -26
  272. data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +12 -12
  273. data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
  274. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
  275. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
  276. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
  277. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
  278. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
  279. data/vendor/cmock/vendor/unity/release/version.info +1 -1
  280. data/vendor/cmock/vendor/unity/src/unity.c +396 -330
  281. data/vendor/cmock/vendor/unity/src/unity.h +50 -4
  282. data/vendor/cmock/vendor/unity/src/unity_internals.h +119 -84
  283. data/vendor/cmock/vendor/unity/test/Makefile +17 -17
  284. data/vendor/cmock/vendor/unity/test/rakefile +63 -3
  285. data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +108 -105
  286. data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
  287. data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +0 -6
  288. data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +1 -9
  289. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
  290. data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
  291. data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
  292. data/vendor/cmock/vendor/unity/test/tests/testunity.c +1338 -151
  293. data/vendor/deep_merge/Rakefile +1 -1
  294. data/vendor/unity/README.md +19 -10
  295. data/vendor/unity/auto/colour_prompt.rb +67 -64
  296. data/vendor/unity/auto/colour_reporter.rb +20 -20
  297. data/vendor/unity/auto/generate_module.rb +149 -142
  298. data/vendor/unity/auto/generate_test_runner.rb +234 -232
  299. data/vendor/unity/auto/parse_output.rb +220 -0
  300. data/vendor/unity/auto/stylize_as_junit.rb +108 -120
  301. data/vendor/unity/auto/test_file_filter.rb +11 -9
  302. data/vendor/unity/auto/type_sanitizer.rb +1 -3
  303. data/vendor/unity/auto/unity_test_summary.py +6 -2
  304. data/vendor/unity/auto/unity_test_summary.rb +45 -57
  305. data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
  306. data/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
  307. data/vendor/unity/docs/UnityAssertionsReference.md +716 -0
  308. data/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
  309. data/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
  310. data/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
  311. data/vendor/unity/examples/example_1/makefile +22 -17
  312. data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
  313. data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
  314. data/vendor/unity/examples/example_2/makefile +16 -17
  315. data/vendor/unity/examples/example_3/rakefile.rb +15 -15
  316. data/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
  317. data/vendor/unity/examples/example_3/readme.txt +4 -10
  318. data/vendor/unity/examples/unity_config.h +14 -26
  319. data/vendor/unity/extras/fixture/rakefile.rb +12 -12
  320. data/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
  321. data/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
  322. data/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
  323. data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
  324. data/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
  325. data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
  326. data/vendor/unity/release/version.info +1 -1
  327. data/vendor/unity/src/unity.c +396 -330
  328. data/vendor/unity/src/unity.h +50 -4
  329. data/vendor/unity/src/unity_internals.h +119 -84
  330. data/vendor/unity/test/Makefile +17 -17
  331. data/vendor/unity/test/rakefile +63 -3
  332. data/vendor/unity/test/rakefile_helper.rb +108 -105
  333. data/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
  334. data/vendor/unity/test/targets/clang_file.yml +0 -6
  335. data/vendor/unity/test/targets/clang_strict.yml +1 -9
  336. data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
  337. data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
  338. data/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
  339. data/vendor/unity/test/tests/testunity.c +1338 -151
  340. metadata +102 -157
  341. data/test_graveyard/integration/paths.yml +0 -17
  342. data/test_graveyard/integration/paths_test.rb +0 -80
  343. data/test_graveyard/integration/rake_rules_aux_dependencies_test.rb +0 -75
  344. data/test_graveyard/integration/rake_rules_cmock_test.rb +0 -74
  345. data/test_graveyard/integration/rake_rules_preprocess_test.rb +0 -178
  346. data/test_graveyard/integration/rake_rules_test.rb +0 -268
  347. data/test_graveyard/integration/rake_tasks_test.rb +0 -103
  348. data/test_graveyard/integration_test_helper.rb +0 -34
  349. data/test_graveyard/rakefile_rules.rb +0 -10
  350. data/test_graveyard/rakefile_rules_aux_dependencies.rb +0 -10
  351. data/test_graveyard/rakefile_rules_cmock.rb +0 -10
  352. data/test_graveyard/rakefile_rules_preprocess.rb +0 -10
  353. data/test_graveyard/rakefile_tasks.rb +0 -10
  354. data/test_graveyard/system/file_system_dependencies.yml +0 -20
  355. data/test_graveyard/system/file_system_kitchen_sink.yml +0 -20
  356. data/test_graveyard/system/file_system_mocks.yml +0 -20
  357. data/test_graveyard/system/file_system_preprocess.yml +0 -20
  358. data/test_graveyard/system/file_system_simple.yml +0 -20
  359. data/test_graveyard/system/file_system_test.rb +0 -78
  360. data/test_graveyard/system/mocks/include/a_file.h +0 -2
  361. data/test_graveyard/system/mocks/include/other_stuff.h +0 -2
  362. data/test_graveyard/system/mocks/include/stuff.h +0 -3
  363. data/test_graveyard/system/mocks/source/a_file.c +0 -9
  364. data/test_graveyard/system/mocks/test/test_a_file.c +0 -41
  365. data/test_graveyard/system/mocks/test/test_no_file.c +0 -14
  366. data/test_graveyard/system/project_mocks.yml +0 -43
  367. data/test_graveyard/system/project_mocks_test.rb +0 -38
  368. data/test_graveyard/system/project_simple.yml +0 -36
  369. data/test_graveyard/system/project_simple_test.rb +0 -39
  370. data/test_graveyard/system/rule_mocks_test.rb +0 -44
  371. data/test_graveyard/system/rule_runners_test.rb +0 -44
  372. data/test_graveyard/system/simple/include/other_stuff.h +0 -2
  373. data/test_graveyard/system/simple/include/stuff.h +0 -3
  374. data/test_graveyard/system/simple/source/other_stuff.c +0 -6
  375. data/test_graveyard/system/simple/source/stuff.c +0 -7
  376. data/test_graveyard/system/simple/test/test_other_stuff.c +0 -30
  377. data/test_graveyard/system/simple/test/test_stuff.c +0 -51
  378. data/test_graveyard/system_test_helper.rb +0 -73
  379. data/test_graveyard/test_helper.rb +0 -93
  380. data/test_graveyard/unit/busted/configurator_builder_test.rb +0 -569
  381. data/test_graveyard/unit/busted/configurator_helper_test.rb +0 -234
  382. data/test_graveyard/unit/busted/configurator_test.rb +0 -232
  383. data/test_graveyard/unit/busted/configurator_validator_test.rb +0 -169
  384. data/test_graveyard/unit/busted/deep_merge_fix_test.rb +0 -55
  385. data/test_graveyard/unit/busted/dependinator_test.rb +0 -129
  386. data/test_graveyard/unit/busted/file_finder_helper_test.rb +0 -45
  387. data/test_graveyard/unit/busted/file_finder_test.rb +0 -114
  388. data/test_graveyard/unit/busted/file_path_utils_test.rb +0 -97
  389. data/test_graveyard/unit/busted/file_system_utils_test.rb +0 -21
  390. data/test_graveyard/unit/busted/generator_test.rb +0 -187
  391. data/test_graveyard/unit/busted/generator_test_results_test.rb +0 -129
  392. data/test_graveyard/unit/busted/generator_test_runner_test.rb +0 -475
  393. data/test_graveyard/unit/busted/preprocessinator_file_handler_test.rb +0 -39
  394. data/test_graveyard/unit/busted/preprocessinator_helper_test.rb +0 -156
  395. data/test_graveyard/unit/busted/preprocessinator_includes_handler_test.rb +0 -93
  396. data/test_graveyard/unit/busted/preprocessinator_test.rb +0 -57
  397. data/test_graveyard/unit/busted/project_file_loader_test.rb +0 -142
  398. data/test_graveyard/unit/busted/setupinator_test.rb +0 -45
  399. data/test_graveyard/unit/busted/streaminator_test.rb +0 -49
  400. data/test_graveyard/unit/busted/task_invoker_test.rb +0 -69
  401. data/test_graveyard/unit/busted/test_includes_extractor_test.rb +0 -111
  402. data/test_graveyard/unit/busted/test_invoker_helper_test.rb +0 -62
  403. data/test_graveyard/unit/busted/test_invoker_test.rb +0 -47
  404. data/test_graveyard/unit/busted/tool_executor_helper_test.rb +0 -100
  405. data/test_graveyard/unit/busted/tool_executor_test.rb +0 -351
  406. data/test_graveyard/unit/busted/verbosinator_test.rb +0 -65
  407. data/test_graveyard/unit/preprocessinator_extractor_test.rb +0 -731
  408. data/test_graveyard/unit_test_helper.rb +0 -16
  409. data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  410. data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
  411. data/vendor/c_exception/vendor/unity/auto/parseOutput.rb +0 -191
  412. data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  413. data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  414. data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  415. data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
  416. data/vendor/cmock/docs/CMock Summary.odt +0 -0
  417. data/vendor/cmock/docs/CMock Summary.pdf +0 -0
  418. data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  419. data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
  420. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parseOutput.rb +0 -191
  421. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  422. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  423. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  424. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
  425. data/vendor/cmock/vendor/unity/auto/parseOutput.rb +0 -191
  426. data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  427. data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  428. data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  429. data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
  430. data/vendor/unity/auto/parseOutput.rb +0 -191
  431. data/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
  432. data/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
  433. data/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
  434. data/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
@@ -1,39 +0,0 @@
1
- require File.dirname(__FILE__) + '/../unit_test_helper'
2
- require 'ceedling/preprocessinator_file_handler'
3
-
4
-
5
- class PreprocessinatorFileHandlerTest < Test::Unit::TestCase
6
-
7
- def setup
8
- objects = create_mocks(:preprocessinator_extractor, :configurator, :tool_executor, :file_path_utils, :file_wrapper)
9
- @preprocessinator_file_handler = PreprocessinatorFileHandler.new(objects)
10
- end
11
-
12
- def teardown
13
- end
14
-
15
-
16
- should "preprocess a file" do
17
- create_mock(:tool_config)
18
-
19
- expected_file = %Q[
20
- #include "other_file.h"
21
- #include "file.h"
22
- #include "protobuf.pb-c.h"
23
-
24
- void foo(void)
25
- {
26
- }
27
- ].left_margin(0)
28
-
29
- @file_path_utils.expects.form_preprocessed_file_path('project/source/file.c').returns('project/build/preprocessed/files/file.c')
30
- @configurator.expects.tools_file_preprocessor.returns(@tool_config)
31
- @tool_executor.expects.build_command_line(@tool_config, 'project/source/file.c', 'project/build/preprocessed/files/file.c').returns('boring command line')
32
- @tool_executor.expects.exec('boring command line').returns('')
33
- @preprocessinator_extractor.expects.extract_base_file_from_preprocessed_expansion('project/build/preprocessed/files/file.c').returns(['', 'void foo(void)', '{', '}'])
34
- @file_wrapper.expects.write('project/build/preprocessed/files/file.c', expected_file.strip)
35
-
36
- @preprocessinator_file_handler.preprocess_file('project/source/file.c', ['file.h', 'other_file.h'])
37
- end
38
-
39
- end
@@ -1,156 +0,0 @@
1
- require File.dirname(__FILE__) + '/../unit_test_helper'
2
- require 'ceedling/preprocessinator_helper'
3
-
4
-
5
- class PreprocessinatorHelperTest < Test::Unit::TestCase
6
-
7
- def setup
8
- objects = create_mocks(:configurator, :test_includes_extractor, :task_invoker, :file_finder, :file_path_utils)
9
- @preprocessinator_helper = PreprocessinatorHelper.new(objects)
10
- create_mocks(:preprocess_file_proc)
11
- end
12
-
13
- def teardown
14
- end
15
-
16
-
17
- ########## assemble test list ###########
18
-
19
- should "assemble non-preprocessed test list" do
20
- test_list = ['tests/tweedle_test.c', 'tests/dumb_test.c']
21
-
22
- @configurator.expects.project_use_preprocessor.returns(false)
23
-
24
- assert_equal(test_list, @preprocessinator_helper.assemble_test_list(test_list))
25
- end
26
-
27
- should "assemble preprocessed test list" do
28
- test_list = ['tests/tweedle_test.c', 'tests/dee_test.c']
29
- preprocessed_test_list = ['project/build/preprocess/tweedle_test.c', 'project/build/preprocess/dee_test.c']
30
-
31
- @configurator.expects.project_use_preprocessor.returns(true)
32
- @file_path_utils.expects.form_preprocessed_files_filelist(test_list).returns(preprocessed_test_list)
33
-
34
- assert_equal(preprocessed_test_list, @preprocessinator_helper.assemble_test_list(test_list))
35
- end
36
-
37
- ########## preprocess includes ###########
38
-
39
- should "extract non-preprocessed includes" do
40
- test_list = ['tests/tweedle_test.c', 'tests/dumb_test.c']
41
- includes = ['unity.h', 'types.h']
42
-
43
- @configurator.expects.project_use_preprocessor.returns(false)
44
- @test_includes_extractor.expects.parse_test_files(test_list).returns(includes)
45
-
46
- assert_equal(includes, @preprocessinator_helper.preprocess_includes(test_list))
47
- end
48
-
49
- should "extract preprocessed includes" do
50
- test_list = ['tests/tweedle_test.c', 'tests/dumb_test.c']
51
- includes_lists = ['project/build/preprocess/includes/tweedle_test.c', 'project/build/preprocess/includes/dumb_test.c']
52
- includes = ['unity.h', 'types.h']
53
-
54
- @configurator.expects.project_use_preprocessor.returns(true)
55
- @file_path_utils.expects.form_preprocessed_includes_list_filelist(test_list).returns(includes_lists)
56
- @task_invoker.expects.invoke_shallow_include_lists(includes_lists)
57
- @test_includes_extractor.expects.parse_includes_lists(includes_lists).returns(includes)
58
-
59
- assert_equal(includes, @preprocessinator_helper.preprocess_includes(test_list))
60
- end
61
-
62
- ########## assemble mocks list ###########
63
-
64
- should "assemble mocks list" do
65
- mocks_list = ['mock_and_roll.h', 'mock_em_sock_em.h']
66
- mocks_filelist = ['project/build/mocks/mock_and_roll.c', 'project/build/mocks/mock_em_sock_em.c']
67
-
68
- @test_includes_extractor.expects.lookup_all_mocks.returns(mocks_list)
69
- @file_path_utils.expects.form_mocks_filelist(mocks_list).returns(mocks_filelist)
70
-
71
- assert_equal(mocks_filelist, @preprocessinator_helper.assemble_mocks_list)
72
- end
73
-
74
- ########## preprocess mockable headers ###########
75
-
76
- should "preprocess no mockable headers" do
77
- mocks_list = ['project/build/mocks/mock_and_roll.c', 'project/build/mocks/mock_em_sock_em.c']
78
-
79
- @configurator.expects.project_use_preprocessor.returns(false)
80
-
81
- @preprocessinator_helper.preprocess_mockable_headers(mocks_list, @preprocess_file_proc)
82
- end
83
-
84
- should "preprocess mockable headers invoked from auxiliary dependencies" do
85
- mocks_list = ['project/build/mocks/mock_and_roll.c', 'project/build/mocks/mock_em_sock_em.c']
86
- mocks_filelist = ['project/build/preprocessed/and_roll.h', 'project/build/preprocessed/em_sock_em.h']
87
-
88
- @configurator.expects.project_use_preprocessor.returns(true)
89
-
90
- @file_path_utils.expects.form_preprocessed_mockable_headers_filelist(mocks_list).returns(mocks_filelist)
91
-
92
- @configurator.expects.project_use_deep_dependencies.returns(true)
93
-
94
- @task_invoker.expects.invoke_preprocessed_files(mocks_filelist)
95
-
96
- @preprocessinator_helper.preprocess_mockable_headers(mocks_list, @preprocess_file_proc)
97
- end
98
-
99
- should "force preprocessing of mockable headers" do
100
- mocks_list = ['project/build/mocks/mock_and_roll.c', 'project/build/mocks/mock_em_sock_em.c']
101
- mocks_filelist = ['project/build/preprocessed/and_roll.h', 'project/build/preprocessed/em_sock_em.h']
102
- headers_list = ['source/lib/and_roll.h', 'source/em_sock_em.h']
103
-
104
- @configurator.expects.project_use_preprocessor.returns(true)
105
-
106
- @file_path_utils.expects.form_preprocessed_mockable_headers_filelist(mocks_list).returns(mocks_filelist)
107
-
108
- @configurator.expects.project_use_deep_dependencies.returns(false)
109
-
110
- @file_finder.expects.find_mockable_header(mocks_filelist[0]).returns(headers_list[0])
111
- @preprocess_file_proc.expects.call(headers_list[0])
112
- @file_finder.expects.find_mockable_header(mocks_filelist[1]).returns(headers_list[1])
113
- @preprocess_file_proc.expects.call(headers_list[1])
114
-
115
- @preprocessinator_helper.preprocess_mockable_headers(mocks_list, @preprocess_file_proc)
116
- end
117
-
118
- ########## preprocess test files ###########
119
-
120
- should "preprocess no test files" do
121
- preprocessed_test_list = ['project/build/preprocess/tweedle_test.c', 'project/build/preprocess/dee_test.c']
122
-
123
- @configurator.expects.project_use_preprocessor.returns(false)
124
-
125
- @preprocessinator_helper.preprocess_test_files(preprocessed_test_list, @preprocess_file_proc)
126
- end
127
-
128
- should "preprocess test files invoked from auxiliary dependencies" do
129
- preprocessed_test_list = ['project/build/preprocess/tweedle_test.c', 'project/build/preprocess/dee_test.c']
130
-
131
- @configurator.expects.project_use_preprocessor.returns(true)
132
-
133
- @configurator.expects.project_use_deep_dependencies.returns(true)
134
-
135
- @task_invoker.expects.invoke_preprocessed_files(preprocessed_test_list)
136
-
137
- @preprocessinator_helper.preprocess_test_files(preprocessed_test_list, @preprocess_file_proc)
138
- end
139
-
140
- should "force preprocessing of test files" do
141
- preprocessed_test_list = ['project/build/preprocess/tweedle_test.c', 'project/build/preprocess/dee_test.c']
142
- test_list = ['tests/tweedle_test.c', 'tests/dee_test.c']
143
-
144
- @configurator.expects.project_use_preprocessor.returns(true)
145
-
146
- @configurator.expects.project_use_deep_dependencies.returns(false)
147
-
148
- @file_finder.expects.find_test_from_file_path(preprocessed_test_list[0]).returns(test_list[0])
149
- @preprocess_file_proc.expects.call(test_list[0])
150
- @file_finder.expects.find_test_from_file_path(preprocessed_test_list[1]).returns(test_list[1])
151
- @preprocess_file_proc.expects.call(test_list[1])
152
-
153
- @preprocessinator_helper.preprocess_test_files(preprocessed_test_list, @preprocess_file_proc)
154
- end
155
-
156
- end
@@ -1,93 +0,0 @@
1
- require File.dirname(__FILE__) + '/../unit_test_helper'
2
- require 'ceedling/preprocessinator_includes_handler'
3
-
4
-
5
- class PreprocessinatorIncludesHandlerTest < Test::Unit::TestCase
6
-
7
- def setup
8
- objects = create_mocks(:configurator, :tool_executor, :task_invoker, :file_path_utils, :yaml_wrapper, :file_wrapper)
9
- @preprocessinator_includes_handler = PreprocessinatorIncludesHandler.new(objects)
10
- end
11
-
12
- def teardown
13
- end
14
-
15
-
16
- should "invoke a shallow includes list" do
17
- @file_path_utils.expects.form_preprocessed_includes_list_path('tests/test_me_please.c').returns('project/build/preprocess/includes/test_me_please.c')
18
- @task_invoker.expects.invoke_shallow_include_lists('project/build/preprocess/includes/test_me_please.c')
19
-
20
- @preprocessinator_includes_handler.invoke_shallow_includes_list('tests/test_me_please.c')
21
- end
22
-
23
-
24
- should "form a make-style dependency rule that lists decorated names of only those headers included in a source file" do
25
- source_file = %Q[
26
- #include "unity.h"
27
- #include "CException.h"
28
- #include "extra_thing2.h"
29
- #include <setjmp.h>
30
- #include <stdio.h>
31
- #include "mock_abc.h"
32
-
33
- int Stuff;
34
-
35
- void foo(void);
36
- ].left_margin(0)
37
-
38
- decorated_temp_file = %Q[
39
- #include "@@@@unity.h"
40
- #include "@@@@CException.h"
41
- #include "@@@@extra_thing2.h"
42
- #include <setjmp.h>
43
- #include <stdio.h>
44
- #include "@@@@mock_abc.h"
45
-
46
- int Stuff;
47
-
48
- void foo(void);
49
- ].left_margin(0)
50
-
51
- includes_preprocessor_tool = {:name => 'includes preprocessor', :executable => 'gcc'}
52
-
53
- @file_path_utils.expects.form_temp_path('tests/test_me_please.c').returns('build/temp/test_me_please.c')
54
-
55
- @file_wrapper.expects.read('tests/test_me_please.c').returns(source_file)
56
- @file_wrapper.expects.write('build/temp/test_me_please.c', decorated_temp_file)
57
-
58
- @configurator.expects.tools_includes_preprocessor.returns(includes_preprocessor_tool)
59
- @tool_executor.expects.build_command_line(includes_preprocessor_tool, 'build/temp/test_me_please.c').returns("gcc -MG preprocessor args")
60
- @tool_executor.expects.exec("gcc -MG preprocessor args").returns("fake make-style dependency rule")
61
- @file_wrapper.expects.rm_f('build/temp/test_me_please.c')
62
-
63
- assert_equal("fake make-style dependency rule", @preprocessinator_includes_handler.form_shallow_dependencies_rule('tests/test_me_please.c'))
64
- end
65
-
66
-
67
- should "extract immediately included header files from source file's decorated dependencies scan" do
68
- dependency_rule = %Q[
69
- project/build/out/a_file.o: \
70
- project/source/a_file.c \
71
- @@@@a_file.h \
72
- @@@@api.h \
73
- @@@@types.h \
74
- @@@@ignore.c
75
- ].left_margin(0)
76
-
77
- @configurator.expects.extension_header.returns('.h')
78
-
79
- assert_equal(
80
- ['a_file.h', 'api.h', 'types.h'],
81
- @preprocessinator_includes_handler.extract_shallow_includes(dependency_rule))
82
- end
83
-
84
-
85
- should "write shallow includes list to yaml file" do
86
- includes = ['unity.h', 'a_file.h']
87
-
88
- @yaml_wrapper.expects.dump('project/build/preprocess/includes/test_me_please.c', includes)
89
-
90
- @preprocessinator_includes_handler.write_shallow_includes_list('project/build/preprocess/includes/test_me_please.c', includes)
91
- end
92
-
93
- end
@@ -1,57 +0,0 @@
1
- require File.dirname(__FILE__) + '/../unit_test_helper'
2
- require 'ceedling/preprocessinator'
3
-
4
-
5
- class PreprocessinatorTest < Test::Unit::TestCase
6
-
7
- def setup
8
- objects = create_mocks(:configurator, :preprocessinator_helper, :preprocessinator_includes_handler, :preprocessinator_file_handler, :task_invoker, :file_path_utils, :yaml_wrapper)
9
- @preprocessinator = Preprocessinator.new(objects)
10
- end
11
-
12
- def teardown
13
- end
14
-
15
-
16
- should "preprocess tests and invoke mocks" do
17
- create_mocks(:tests_list, :mocks_list)
18
-
19
- @preprocessinator_helper.expects.assemble_test_list(['tests/tweedle_test.c', 'tests/dumb_test.c']).returns(@tests_list)
20
- @preprocessinator_helper.expects.preprocess_includes(@tests_list)
21
- @preprocessinator_helper.expects.assemble_mocks_list.returns(@mocks_list)
22
- @preprocessinator_helper.expects.preprocess_mockable_headers(@mocks_list, @preprocessinator.preprocess_file_proc)
23
- @task_invoker.expects.invoke_mocks(@mocks_list)
24
- @preprocessinator_helper.expects.preprocess_test_files(@tests_list, @preprocessinator.preprocess_file_proc)
25
-
26
- assert_equal(@mocks_list, @preprocessinator.preprocess_tests_and_invoke_mocks(['tests/tweedle_test.c', 'tests/dumb_test.c']))
27
- end
28
-
29
- should "preprocess shallow includes for a given file and write them to disk" do
30
- @preprocessinator_includes_handler.expects.form_shallow_dependencies_rule('project/source/software.c').returns('project/build/output/thing.o: header.h')
31
- @preprocessinator_includes_handler.expects.extract_shallow_includes('project/build/output/thing.o: header.h').returns(['header.h'])
32
- @file_path_utils.expects.form_preprocessed_includes_list_path('project/source/software.c').returns('project/build/preprocessed/includes/software.c')
33
- @preprocessinator_includes_handler.expects.write_shallow_includes_list('project/build/preprocessed/includes/software.c', ['header.h'])
34
-
35
- @preprocessinator.preprocess_shallow_includes('project/source/software.c')
36
- end
37
-
38
- should "preprocess a file" do
39
- includes = ['types.h', 'a_widdle_file.h']
40
- mocks_filelist = ['project/build/mocks/mock_and_roll.c', 'project/build/mocks/mock_em_sock_em.c']
41
-
42
- @preprocessinator_includes_handler.expects.invoke_shallow_includes_list('source/a_widdle_file.c')
43
- @file_path_utils.expects.form_preprocessed_includes_list_path('source/a_widdle_file.c').returns('project/build/preprocess/includes/a_widdle_file.c')
44
- @yaml_wrapper.expects.load('project/build/preprocess/includes/a_widdle_file.c').returns(includes)
45
- @preprocessinator_file_handler.expects.preprocess_file('source/a_widdle_file.c', includes)
46
-
47
- @preprocessinator.preprocess_file('source/a_widdle_file.c')
48
- end
49
-
50
- should "form preprocessed file path if preprocessing is enabled" do
51
- @configurator.expects.project_use_preprocessor.returns(true)
52
- @file_path_utils.expects.form_preprocessed_file_path('project/files/a_file.c').returns('project/build/preprocessed/files/a_file.c')
53
-
54
- assert_equal('project/build/preprocessed/files/a_file.c', @preprocessinator.form_file_path('project/files/a_file.c'))
55
- end
56
-
57
- end
@@ -1,142 +0,0 @@
1
- require File.dirname(__FILE__) + '/../unit_test_helper'
2
- require 'ceedling/project_config_manager'
3
- require 'yaml'
4
-
5
- class ProjectFileLoaderTest < Test::Unit::TestCase
6
-
7
- def setup
8
- @objects = create_mocks(:yaml_wrapper, :stream_wrapper, :system_wrapper, :file_wrapper)
9
- @loader = ProjectFileLoader.new(@objects)
10
- end
11
-
12
- def teardown
13
- end
14
-
15
-
16
- ### find project file ###
17
-
18
- should "find both default project files if no environment variables are set and both exist on-disk" do
19
- @system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
20
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(true)
21
-
22
- @system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(nil)
23
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(true)
24
-
25
- @loader.find_project_files
26
-
27
- assert_equal(DEFAULT_CEEDLING_MAIN_PROJECT_FILE, @loader.main_project_filepath)
28
- assert_equal(DEFAULT_CEEDLING_USER_PROJECT_FILE, @loader.user_project_filepath)
29
- end
30
-
31
- should "find only main default project files if no environment variables are set and it exist on-disk" do
32
- @system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
33
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(false)
34
-
35
- @system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(nil)
36
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(true)
37
-
38
- @loader.find_project_files
39
-
40
- assert_equal(DEFAULT_CEEDLING_MAIN_PROJECT_FILE, @loader.main_project_filepath)
41
- assert_equal('', @loader.user_project_filepath)
42
- end
43
-
44
-
45
- should "find main project file specified in environment variable if it exists on disk (no default user file found)" do
46
- test_config_file = 'tests/config.yml'
47
-
48
- @system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
49
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(false)
50
-
51
- @system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(test_config_file)
52
- @file_wrapper.expects.exist?(test_config_file).returns(true)
53
-
54
- @loader.find_project_files
55
-
56
- assert_equal(test_config_file, @loader.main_project_filepath)
57
- assert_equal('', @loader.user_project_filepath)
58
- end
59
-
60
- should "find both project files specified in environment variables if they exist on disk" do
61
- test_main_config_file = 'tests/project.yml'
62
- test_user_config_file = 'tests/user.yml'
63
-
64
- @system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(test_user_config_file)
65
- @file_wrapper.expects.exist?(test_user_config_file).returns(true)
66
-
67
- @system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(test_main_config_file)
68
- @file_wrapper.expects.exist?(test_main_config_file).returns(true)
69
-
70
- @loader.find_project_files
71
-
72
- assert_equal(test_main_config_file, @loader.main_project_filepath)
73
- assert_equal(test_user_config_file, @loader.user_project_filepath)
74
- end
75
-
76
-
77
- should "raise if main project file cannot be found from environment variable or on disk" do
78
- test_config_file = 'files/config/tests.yml'
79
-
80
- @system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
81
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(false)
82
-
83
- @system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(test_config_file)
84
- @file_wrapper.expects.exist?(test_config_file).returns(false)
85
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(false)
86
-
87
- @stream_wrapper.expects.stderr_puts('Found no Ceedling project file (*.yml)')
88
-
89
- assert_raise(RuntimeError) { @loader.find_project_files }
90
- end
91
-
92
- should "raise if main test project file cannot be found on disk and no environment variable is set" do
93
-
94
- @system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
95
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(false)
96
-
97
- @system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(nil)
98
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(false)
99
-
100
- @stream_wrapper.expects.stderr_puts('Found no Ceedling project file (*.yml)')
101
-
102
- assert_raise(RuntimeError) { @loader.find_project_files }
103
- end
104
-
105
- ### load project file ###
106
-
107
- should "load yaml of main project file only" do
108
- yaml = {:config => []}
109
-
110
- @system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
111
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(false)
112
-
113
- @system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(nil)
114
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(true)
115
- @yaml_wrapper.expects.load(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(yaml)
116
-
117
- @loader.find_project_files
118
-
119
- assert_equal(yaml, @loader.load_project_config)
120
- end
121
-
122
- should "load yaml of main project file merged with user project file" do
123
- main_yaml = {:config => [], :more => 'more'}
124
- user_yaml = {:more => 'less', :smore => 'yum'}
125
- merged_yaml = {:config => [], :more => 'less', :smore => 'yum'}
126
-
127
- @system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
128
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(true)
129
-
130
- @system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(nil)
131
- @file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(true)
132
-
133
- @yaml_wrapper.expects.load(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(main_yaml)
134
- @yaml_wrapper.expects.load(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(user_yaml)
135
-
136
- @loader.find_project_files
137
-
138
- assert_equal(merged_yaml, @loader.load_project_config)
139
- end
140
-
141
- end
142
-