ceedling 0.19.0 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (426) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +10 -10
  3. data/bin/ceedling +205 -92
  4. data/ceedling-0.19.0.gem +0 -0
  5. data/config/test_environment.rb +12 -12
  6. data/docs/CeedlingPacket.md +866 -853
  7. data/docs/CeedlingPacket.odt +0 -0
  8. data/docs/CeedlingPacket.pdf +0 -0
  9. data/examples/temp_sensor/rakefile.rb +4 -4
  10. data/examples/temp_sensor/src/AdcConductor.c +42 -42
  11. data/examples/temp_sensor/src/AdcConductor.h +13 -13
  12. data/examples/temp_sensor/src/AdcHardware.c +27 -27
  13. data/examples/temp_sensor/src/AdcHardware.h +11 -11
  14. data/examples/temp_sensor/src/AdcHardwareConfigurator.c +18 -18
  15. data/examples/temp_sensor/src/AdcHardwareConfigurator.h +10 -10
  16. data/examples/temp_sensor/src/AdcModel.c +33 -33
  17. data/examples/temp_sensor/src/AdcModel.h +13 -13
  18. data/examples/temp_sensor/src/AdcTemperatureSensor.c +51 -51
  19. data/examples/temp_sensor/src/AdcTemperatureSensor.h +10 -10
  20. data/examples/temp_sensor/src/Executor.c +25 -25
  21. data/examples/temp_sensor/src/Executor.h +9 -9
  22. data/examples/temp_sensor/src/IntrinsicsWrapper.c +18 -18
  23. data/examples/temp_sensor/src/IntrinsicsWrapper.h +7 -7
  24. data/examples/temp_sensor/src/Main.c +46 -46
  25. data/examples/temp_sensor/src/Main.h +7 -7
  26. data/examples/temp_sensor/src/Model.c +10 -10
  27. data/examples/temp_sensor/src/Model.h +8 -8
  28. data/examples/temp_sensor/src/ModelConfig.h +7 -7
  29. data/examples/temp_sensor/src/TaskScheduler.c +72 -72
  30. data/examples/temp_sensor/src/TaskScheduler.h +11 -11
  31. data/examples/temp_sensor/src/TemperatureCalculator.c +27 -27
  32. data/examples/temp_sensor/src/TemperatureCalculator.h +8 -8
  33. data/examples/temp_sensor/src/TemperatureFilter.c +38 -38
  34. data/examples/temp_sensor/src/TemperatureFilter.h +10 -10
  35. data/examples/temp_sensor/src/TimerConductor.c +15 -15
  36. data/examples/temp_sensor/src/TimerConductor.h +9 -9
  37. data/examples/temp_sensor/src/TimerConfigurator.c +51 -51
  38. data/examples/temp_sensor/src/TimerConfigurator.h +15 -15
  39. data/examples/temp_sensor/src/TimerHardware.c +15 -15
  40. data/examples/temp_sensor/src/TimerHardware.h +8 -8
  41. data/examples/temp_sensor/src/TimerInterruptConfigurator.c +55 -55
  42. data/examples/temp_sensor/src/TimerInterruptConfigurator.h +13 -13
  43. data/examples/temp_sensor/src/TimerInterruptHandler.c +25 -25
  44. data/examples/temp_sensor/src/TimerInterruptHandler.h +10 -10
  45. data/examples/temp_sensor/src/TimerModel.c +9 -9
  46. data/examples/temp_sensor/src/TimerModel.h +8 -8
  47. data/examples/temp_sensor/src/Types.h +90 -90
  48. data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +18 -18
  49. data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +8 -8
  50. data/examples/temp_sensor/src/UsartConductor.c +21 -21
  51. data/examples/temp_sensor/src/UsartConductor.h +7 -7
  52. data/examples/temp_sensor/src/UsartConfigurator.c +39 -39
  53. data/examples/temp_sensor/src/UsartConfigurator.h +13 -13
  54. data/examples/temp_sensor/src/UsartHardware.c +22 -22
  55. data/examples/temp_sensor/src/UsartHardware.h +9 -9
  56. data/examples/temp_sensor/src/UsartModel.c +34 -34
  57. data/examples/temp_sensor/src/UsartModel.h +10 -10
  58. data/examples/temp_sensor/src/UsartPutChar.c +16 -16
  59. data/examples/temp_sensor/src/UsartPutChar.h +8 -8
  60. data/examples/temp_sensor/src/UsartTransmitBufferStatus.c +7 -7
  61. data/examples/temp_sensor/src/UsartTransmitBufferStatus.h +8 -8
  62. data/examples/temp_sensor/test/TestAdcConductor.c +121 -121
  63. data/examples/temp_sensor/test/TestAdcHardware.c +44 -44
  64. data/examples/temp_sensor/test/TestAdcModel.c +33 -33
  65. data/examples/temp_sensor/test/TestExecutor.c +36 -36
  66. data/examples/temp_sensor/test/TestMain.c +24 -24
  67. data/examples/temp_sensor/test/TestModel.c +20 -20
  68. data/examples/temp_sensor/test/TestTaskScheduler.c +104 -104
  69. data/examples/temp_sensor/test/TestTemperatureCalculator.c +33 -33
  70. data/examples/temp_sensor/test/TestTemperatureFilter.c +79 -79
  71. data/examples/temp_sensor/test/TestTimerConductor.c +32 -32
  72. data/examples/temp_sensor/test/TestTimerHardware.c +26 -26
  73. data/examples/temp_sensor/test/TestTimerModel.c +18 -18
  74. data/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +21 -21
  75. data/examples/temp_sensor/test/TestUsartConductor.c +40 -40
  76. data/examples/temp_sensor/test/TestUsartHardware.c +36 -36
  77. data/examples/temp_sensor/test/TestUsartModel.c +36 -36
  78. data/examples/temp_sensor/test/support/UnityHelper.c +12 -12
  79. data/examples/temp_sensor/test/support/UnityHelper.h +12 -12
  80. data/lib/ceedling/configurator_builder.rb +1 -1
  81. data/lib/ceedling/tasks_base.rake +10 -2
  82. data/lib/ceedling/tool_executor.rb +3 -0
  83. data/lib/ceedling/version.rb +3 -3
  84. data/license.txt +1 -1
  85. data/plugins/bullseye/bullseye.rake +162 -162
  86. data/plugins/gcov/gcov.rake +152 -152
  87. data/plugins/module_generator/lib/module_generator.rb +145 -145
  88. data/plugins/module_generator/module_generator.rake +14 -14
  89. data/plugins/stdout_gtestlike_tests_report/assets/template.erb +84 -0
  90. data/plugins/stdout_gtestlike_tests_report/assets/template.erb copy +59 -0
  91. data/plugins/stdout_gtestlike_tests_report/config/stdout_gtestlike_tests_report.yml +4 -0
  92. data/plugins/stdout_gtestlike_tests_report/lib/stdout_gtestlike_tests_report.rb +43 -0
  93. data/spec/system/deployment_spec.rb +0 -1
  94. data/test_graveyard/integration/paths_test.rb +80 -80
  95. data/test_graveyard/integration/rake_rules_aux_dependencies_test.rb +75 -75
  96. data/test_graveyard/integration/rake_rules_cmock_test.rb +74 -74
  97. data/test_graveyard/integration/rake_rules_preprocess_test.rb +178 -178
  98. data/test_graveyard/integration/rake_rules_test.rb +268 -268
  99. data/test_graveyard/integration/rake_tasks_test.rb +103 -103
  100. data/test_graveyard/integration_test_helper.rb +34 -34
  101. data/test_graveyard/rakefile_rules.rb +10 -10
  102. data/test_graveyard/rakefile_rules_aux_dependencies.rb +10 -10
  103. data/test_graveyard/rakefile_rules_cmock.rb +10 -10
  104. data/test_graveyard/rakefile_rules_preprocess.rb +10 -10
  105. data/test_graveyard/rakefile_tasks.rb +10 -10
  106. data/test_graveyard/system/file_system_test.rb +78 -78
  107. data/test_graveyard/system/project_mocks_test.rb +38 -38
  108. data/test_graveyard/system/project_simple_test.rb +39 -39
  109. data/test_graveyard/system/rule_mocks_test.rb +44 -44
  110. data/test_graveyard/system/rule_runners_test.rb +44 -44
  111. data/test_graveyard/system_test_helper.rb +73 -73
  112. data/test_graveyard/test_helper.rb +93 -93
  113. data/test_graveyard/unit/busted/configurator_builder_test.rb +569 -569
  114. data/test_graveyard/unit/busted/configurator_helper_test.rb +234 -234
  115. data/test_graveyard/unit/busted/configurator_test.rb +232 -232
  116. data/test_graveyard/unit/busted/configurator_validator_test.rb +169 -169
  117. data/test_graveyard/unit/busted/deep_merge_fix_test.rb +55 -55
  118. data/test_graveyard/unit/busted/dependinator_test.rb +129 -129
  119. data/test_graveyard/unit/busted/file_finder_helper_test.rb +45 -45
  120. data/test_graveyard/unit/busted/file_finder_test.rb +114 -114
  121. data/test_graveyard/unit/busted/file_path_utils_test.rb +97 -97
  122. data/test_graveyard/unit/busted/file_system_utils_test.rb +21 -21
  123. data/test_graveyard/unit/busted/generator_test.rb +187 -187
  124. data/test_graveyard/unit/busted/generator_test_results_test.rb +129 -129
  125. data/test_graveyard/unit/busted/generator_test_runner_test.rb +475 -475
  126. data/test_graveyard/unit/busted/preprocessinator_file_handler_test.rb +39 -39
  127. data/test_graveyard/unit/busted/preprocessinator_helper_test.rb +156 -156
  128. data/test_graveyard/unit/busted/preprocessinator_includes_handler_test.rb +93 -93
  129. data/test_graveyard/unit/busted/preprocessinator_test.rb +57 -57
  130. data/test_graveyard/unit/busted/project_file_loader_test.rb +142 -142
  131. data/test_graveyard/unit/busted/setupinator_test.rb +45 -45
  132. data/test_graveyard/unit/busted/streaminator_test.rb +49 -49
  133. data/test_graveyard/unit/busted/task_invoker_test.rb +69 -69
  134. data/test_graveyard/unit/busted/test_includes_extractor_test.rb +111 -111
  135. data/test_graveyard/unit/busted/test_invoker_helper_test.rb +62 -62
  136. data/test_graveyard/unit/busted/test_invoker_test.rb +47 -47
  137. data/test_graveyard/unit/busted/tool_executor_helper_test.rb +100 -100
  138. data/test_graveyard/unit/busted/tool_executor_test.rb +351 -351
  139. data/test_graveyard/unit/busted/verbosinator_test.rb +65 -65
  140. data/test_graveyard/unit/preprocessinator_extractor_test.rb +731 -731
  141. data/test_graveyard/unit_test_helper.rb +16 -16
  142. data/vendor/c_exception/LICENSE.txt +30 -30
  143. data/vendor/c_exception/README.md +11 -1
  144. data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  145. data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
  146. data/vendor/c_exception/docs/readme.txt +261 -242
  147. data/vendor/c_exception/lib/CException.c +46 -46
  148. data/vendor/c_exception/lib/CException.h +110 -86
  149. data/vendor/c_exception/makefile +23 -23
  150. data/vendor/c_exception/test/CExceptionConfig.h +46 -46
  151. data/vendor/c_exception/test/TestException.c +391 -342
  152. data/vendor/c_exception/test/TestException_Runner.c +5 -12
  153. data/vendor/c_exception/vendor/unity/README.md +211 -0
  154. data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +1 -1
  155. data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +38 -38
  156. data/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -36
  157. data/vendor/c_exception/vendor/unity/auto/generate_module.rb +202 -202
  158. data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +391 -320
  159. data/vendor/c_exception/vendor/unity/auto/parseOutput.rb +2 -0
  160. data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +260 -0
  161. data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +8 -0
  162. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +135 -0
  163. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +148 -139
  164. data/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
  165. data/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
  166. data/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +224 -216
  167. data/vendor/c_exception/vendor/unity/docs/license.txt +21 -31
  168. data/vendor/c_exception/vendor/unity/examples/example_1/makefile +40 -15
  169. data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -0
  170. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +32 -25
  171. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +29 -22
  172. data/vendor/c_exception/vendor/unity/examples/example_2/makefile +40 -14
  173. data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +2 -0
  174. data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +2 -2
  175. data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +0 -1
  176. data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +2 -0
  177. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -37
  178. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +179 -179
  179. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +135 -94
  180. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +13 -17
  181. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -18
  182. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +30 -0
  183. data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +60 -0
  184. data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +4 -3
  185. data/vendor/c_exception/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
  186. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +182 -27
  187. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +13 -0
  188. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +8 -6
  189. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +2 -2
  190. data/vendor/c_exception/vendor/unity/release/build.info +1 -1
  191. data/vendor/c_exception/vendor/unity/release/version.info +1 -1
  192. data/vendor/c_exception/vendor/unity/src/unity.c +1333 -1145
  193. data/vendor/c_exception/vendor/unity/src/unity.h +290 -307
  194. data/vendor/c_exception/vendor/unity/src/unity_internals.h +758 -620
  195. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +7 -3
  196. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +7 -3
  197. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -0
  198. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -0
  199. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +4 -3
  200. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +4 -3
  201. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
  202. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
  203. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -5
  204. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +4 -3
  205. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +4 -3
  206. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -5
  207. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +4 -3
  208. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -6
  209. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +9 -5
  210. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -3
  211. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +7 -3
  212. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +9 -5
  213. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -3
  214. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +10 -6
  215. data/vendor/c_exception/vendor/unity/{rakefile.rb → test/rakefile} +60 -61
  216. data/vendor/c_exception/vendor/unity/{rakefile_helper.rb → test/rakefile_helper.rb} +255 -249
  217. data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +83 -0
  218. data/vendor/c_exception/vendor/unity/{targets → test/targets}/clang_strict.yml +83 -83
  219. data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -0
  220. data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -0
  221. data/vendor/c_exception/vendor/unity/{targets/gcc_64.yml → test/targets/gcc_auto_limits.yml} +46 -45
  222. data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +47 -0
  223. data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +58 -0
  224. data/vendor/{cmock/vendor/c_exception/vendor/unity/targets/gcc_64.yml → c_exception/vendor/unity/test/targets/gcc_manual_math.yml} +46 -45
  225. data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/hitech_picc18.yml +101 -101
  226. data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_arm_v4.yml +89 -89
  227. data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_arm_v5.yml +79 -79
  228. data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_arm_v5_3.yml +79 -79
  229. data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -93
  230. data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_cortexm3_v5.yml +83 -83
  231. data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_msp430.yml +94 -94
  232. data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_sh2a_v6.yml +85 -85
  233. data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +51 -51
  234. data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +8 -8
  235. data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +68 -51
  236. data/vendor/{cmock/vendor/c_exception/vendor/unity/test → c_exception/vendor/unity/test/tests}/test_generate_test_runner.rb +102 -88
  237. data/vendor/{cmock/vendor/c_exception/vendor/unity/test → c_exception/vendor/unity/test/tests}/testparameterized.c +104 -101
  238. data/vendor/c_exception/vendor/unity/test/{testunity.c → tests/testunity.c} +3682 -3447
  239. data/vendor/cmock/docs/CMock_Summary.md +3 -0
  240. data/vendor/cmock/lib/cmock_config.rb +1 -0
  241. data/vendor/cmock/lib/cmock_file_writer.rb +7 -3
  242. data/vendor/cmock/lib/cmock_generator.rb +3 -2
  243. data/vendor/cmock/lib/cmock_header_parser.rb +12 -5
  244. data/vendor/cmock/release/version.info +1 -1
  245. data/vendor/cmock/test/system/test_compilation/parsing.h +3 -0
  246. data/vendor/cmock/test/unit/cmock_generator_main_test.rb +7 -0
  247. data/vendor/cmock/test/unit/cmock_header_parser_test.rb +57 -1
  248. data/vendor/cmock/vendor/c_exception/LICENSE.txt +30 -30
  249. data/vendor/cmock/vendor/c_exception/README.md +11 -1
  250. data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  251. data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
  252. data/vendor/cmock/vendor/c_exception/docs/readme.txt +261 -242
  253. data/vendor/cmock/vendor/c_exception/lib/CException.c +46 -46
  254. data/vendor/cmock/vendor/c_exception/lib/CException.h +110 -86
  255. data/vendor/cmock/vendor/c_exception/makefile +23 -23
  256. data/vendor/cmock/vendor/c_exception/test/CExceptionConfig.h +46 -46
  257. data/vendor/cmock/vendor/c_exception/test/TestException.c +391 -342
  258. data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +5 -12
  259. data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +211 -0
  260. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +1 -1
  261. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +38 -38
  262. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -36
  263. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +202 -202
  264. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +391 -320
  265. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parseOutput.rb +2 -0
  266. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +260 -0
  267. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +8 -0
  268. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +135 -0
  269. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +148 -139
  270. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
  271. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
  272. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +224 -216
  273. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/license.txt +21 -31
  274. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +40 -15
  275. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -0
  276. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +32 -25
  277. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +29 -22
  278. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +40 -14
  279. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +2 -0
  280. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +2 -2
  281. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +0 -1
  282. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +2 -0
  283. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -37
  284. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +179 -179
  285. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +135 -94
  286. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +13 -17
  287. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -18
  288. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +30 -0
  289. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +60 -0
  290. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +4 -3
  291. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
  292. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +182 -27
  293. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +13 -0
  294. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +8 -6
  295. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +2 -2
  296. data/vendor/cmock/vendor/c_exception/vendor/unity/release/build.info +1 -1
  297. data/vendor/cmock/vendor/c_exception/vendor/unity/release/version.info +1 -1
  298. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +1333 -1145
  299. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +290 -307
  300. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +758 -620
  301. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +7 -3
  302. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +7 -3
  303. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -0
  304. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -0
  305. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +4 -3
  306. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +4 -3
  307. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
  308. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
  309. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -5
  310. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +4 -3
  311. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +4 -3
  312. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -5
  313. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +4 -3
  314. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -6
  315. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +9 -5
  316. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -3
  317. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +7 -3
  318. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +9 -5
  319. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -3
  320. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +10 -6
  321. data/vendor/cmock/vendor/c_exception/vendor/unity/{rakefile.rb → test/rakefile} +60 -61
  322. data/vendor/cmock/vendor/c_exception/vendor/unity/{rakefile_helper.rb → test/rakefile_helper.rb} +255 -249
  323. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +83 -0
  324. data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/clang_strict.yml +83 -83
  325. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -0
  326. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -0
  327. data/vendor/cmock/vendor/c_exception/vendor/unity/{targets/gcc_32.yml → test/targets/gcc_auto_limits.yml} +46 -44
  328. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +47 -0
  329. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +58 -0
  330. data/vendor/{c_exception/vendor/unity/targets/gcc_32.yml → cmock/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml} +46 -44
  331. data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/hitech_picc18.yml +101 -101
  332. data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_arm_v4.yml +89 -89
  333. data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_arm_v5.yml +79 -79
  334. data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_arm_v5_3.yml +79 -79
  335. data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -93
  336. data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_cortexm3_v5.yml +83 -83
  337. data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_msp430.yml +94 -94
  338. data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_sh2a_v6.yml +85 -85
  339. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +51 -51
  340. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/sample.yml +8 -8
  341. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testsample.c +68 -51
  342. data/vendor/{c_exception/vendor/unity/test → cmock/vendor/c_exception/vendor/unity/test/tests}/test_generate_test_runner.rb +102 -88
  343. data/vendor/{c_exception/vendor/unity/test → cmock/vendor/c_exception/vendor/unity/test/tests}/testparameterized.c +104 -101
  344. data/vendor/cmock/vendor/c_exception/vendor/unity/test/{testunity.c → tests/testunity.c} +3682 -3447
  345. data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +30 -13
  346. data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +260 -0
  347. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +96 -93
  348. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +1 -1
  349. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -19
  350. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +18 -17
  351. data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +66 -5
  352. data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +2 -1
  353. data/vendor/cmock/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
  354. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +187 -27
  355. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +14 -0
  356. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +6 -5
  357. data/vendor/cmock/vendor/unity/release/version.info +1 -1
  358. data/vendor/cmock/vendor/unity/src/unity.c +38 -27
  359. data/vendor/cmock/vendor/unity/src/unity.h +5 -0
  360. data/vendor/cmock/vendor/unity/src/unity_internals.h +22 -18
  361. data/vendor/cmock/vendor/unity/test/Makefile +52 -0
  362. data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +4 -0
  363. data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +4 -0
  364. data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +4 -0
  365. data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +7 -4
  366. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +6 -4
  367. data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +4 -0
  368. data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +4 -0
  369. data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +4 -0
  370. data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +4 -0
  371. data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +4 -0
  372. data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +4 -0
  373. data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +1 -1
  374. data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +0 -1
  375. data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +0 -1
  376. data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +0 -1
  377. data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +0 -1
  378. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +0 -1
  379. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_sizeof.yml +0 -1
  380. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +0 -1
  381. data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +0 -1
  382. data/vendor/cmock/vendor/unity/test/testdata/testsample.c +19 -2
  383. data/vendor/cmock/vendor/unity/test/tests/testunity.c +55 -4
  384. data/vendor/unity/auto/generate_test_runner.rb +4 -2
  385. data/vendor/unity/auto/stylize_as_junit.rb +260 -0
  386. data/vendor/unity/extras/fixture/src/unity_fixture.c +24 -41
  387. data/vendor/unity/extras/fixture/src/unity_fixture.h +1 -1
  388. data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +5 -7
  389. data/vendor/unity/extras/fixture/test/Makefile +53 -8
  390. data/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
  391. data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +129 -32
  392. data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +6 -0
  393. data/vendor/unity/extras/fixture/test/unity_output_Spy.c +4 -4
  394. data/vendor/unity/release/version.info +1 -1
  395. data/vendor/unity/src/unity.c +32 -21
  396. data/vendor/unity/src/unity.h +5 -0
  397. data/vendor/unity/src/unity_internals.h +7 -3
  398. data/vendor/unity/test/Makefile +52 -0
  399. data/vendor/unity/test/expectdata/testsample_cmd.c +4 -0
  400. data/vendor/unity/test/expectdata/testsample_def.c +4 -0
  401. data/vendor/unity/test/expectdata/testsample_head1.c +4 -0
  402. data/vendor/unity/test/expectdata/testsample_head1.h +7 -4
  403. data/vendor/unity/test/expectdata/testsample_mock_head1.h +6 -4
  404. data/vendor/unity/test/expectdata/testsample_new1.c +4 -0
  405. data/vendor/unity/test/expectdata/testsample_new2.c +4 -0
  406. data/vendor/unity/test/expectdata/testsample_param.c +4 -0
  407. data/vendor/unity/test/expectdata/testsample_run1.c +4 -0
  408. data/vendor/unity/test/expectdata/testsample_run2.c +4 -0
  409. data/vendor/unity/test/expectdata/testsample_yaml.c +4 -0
  410. data/vendor/unity/test/testdata/testsample.c +19 -2
  411. data/vendor/unity/test/tests/testunity.c +35 -4
  412. metadata +75 -52
  413. data/ceedling-0.18.0.gem +0 -0
  414. data/docs/CeedlingLogo.png +0 -0
  415. data/vendor/c_exception/vendor/unity/Gemfile +0 -4
  416. data/vendor/c_exception/vendor/unity/Gemfile.lock +0 -12
  417. data/vendor/c_exception/vendor/unity/examples/example_3/makefile +0 -41
  418. data/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c +0 -46
  419. data/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c +0 -50
  420. data/vendor/c_exception/vendor/unity/makefile +0 -37
  421. data/vendor/cmock/vendor/c_exception/vendor/unity/Gemfile +0 -4
  422. data/vendor/cmock/vendor/c_exception/vendor/unity/Gemfile.lock +0 -12
  423. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/makefile +0 -41
  424. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c +0 -46
  425. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c +0 -50
  426. data/vendor/cmock/vendor/c_exception/vendor/unity/makefile +0 -37
@@ -1,320 +1,391 @@
1
- # ==========================================
2
- # Unity Project - A Test Framework for C
3
- # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
4
- # [Released under MIT License. Please refer to license.txt for details]
5
- # ==========================================
6
-
7
- $QUICK_RUBY_VERSION = RUBY_VERSION.split('.').inject(0){|vv,v| vv * 100 + v.to_i }
8
- File.expand_path(File.join(File.dirname(__FILE__),'colour_prompt'))
9
-
10
- class UnityTestRunnerGenerator
11
-
12
- def initialize(options = nil)
13
- @options = { :includes => [], :plugins => [], :framework => :unity }
14
- case(options)
15
- when NilClass then @options
16
- when String then @options.merge!(UnityTestRunnerGenerator.grab_config(options))
17
- when Hash then @options.merge!(options)
18
- else raise "If you specify arguments, it should be a filename or a hash of options"
19
- end
20
- end
21
-
22
- def self.grab_config(config_file)
23
- options = { :includes => [], :plugins => [], :framework => :unity }
24
- unless (config_file.nil? or config_file.empty?)
25
- require 'yaml'
26
- yaml_guts = YAML.load_file(config_file)
27
- options.merge!(yaml_guts[:unity] ? yaml_guts[:unity] : yaml_guts[:cmock])
28
- raise "No :unity or :cmock section found in #{config_file}" unless options
29
- end
30
- return(options)
31
- end
32
-
33
- def run(input_file, output_file, options=nil)
34
- tests = []
35
- testfile_includes = []
36
- used_mocks = []
37
-
38
- @options.merge!(options) unless options.nil?
39
- module_name = File.basename(input_file)
40
-
41
- #pull required data from source file
42
- source = File.read(input_file)
43
- source = source.force_encoding("ISO-8859-1").encode("utf-8", :replace => nil) if ($QUICK_RUBY_VERSION > 10900)
44
- tests = find_tests(source)
45
- testfile_includes = find_includes(source)
46
- used_mocks = find_mocks(testfile_includes)
47
-
48
- #build runner file
49
- generate(input_file, output_file, tests, used_mocks, testfile_includes)
50
-
51
- #determine which files were used to return them
52
- all_files_used = [input_file, output_file]
53
- all_files_used += testfile_includes.map {|filename| filename + '.c'} unless testfile_includes.empty?
54
- all_files_used += @options[:includes] unless @options[:includes].empty?
55
- return all_files_used.uniq
56
- end
57
-
58
- def generate(input_file, output_file, tests, used_mocks, testfile_includes)
59
- File.open(output_file, 'w') do |output|
60
- create_header(output, used_mocks, testfile_includes)
61
- create_externs(output, tests, used_mocks)
62
- create_mock_management(output, used_mocks)
63
- create_suite_setup_and_teardown(output)
64
- create_reset(output, used_mocks)
65
- create_main(output, input_file, tests, used_mocks)
66
- end
67
- end
68
-
69
- def find_tests(source)
70
- tests_raw = []
71
- tests_args = []
72
- tests_and_line_numbers = []
73
-
74
- source_scrubbed = source.gsub(/\/\/.*$/, '') # remove line comments
75
- source_scrubbed = source_scrubbed.gsub(/\/\*.*?\*\//m, '') # remove block comments
76
- lines = source_scrubbed.split(/(^\s*\#.*$) # Treat preprocessor directives as a logical line
77
- | (;|\{|\}) /x) # Match ;, {, and } as end of lines
78
-
79
- lines.each_with_index do |line, index|
80
- #find tests
81
- if line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+(test.*?)\s*\(\s*(.*)\s*\)/
82
- arguments = $1
83
- name = $2
84
- call = $3
85
- args = nil
86
- if (@options[:use_param_tests] and !arguments.empty?)
87
- args = []
88
- arguments.scan(/\s*TEST_CASE\s*\((.*)\)\s*$/) {|a| args << a[0]}
89
- end
90
- tests_and_line_numbers << { :test => name, :args => args, :call => call, :line_number => 0 }
91
- tests_args = []
92
- end
93
- end
94
-
95
- #determine line numbers and create tests to run
96
- source_lines = source.split("\n")
97
- source_index = 0;
98
- tests_and_line_numbers.size.times do |i|
99
- source_lines[source_index..-1].each_with_index do |line, index|
100
- if (line =~ /#{tests_and_line_numbers[i][:test]}/)
101
- source_index += index
102
- tests_and_line_numbers[i][:line_number] = source_index + 1
103
- break
104
- end
105
- end
106
- end
107
-
108
- return tests_and_line_numbers
109
- end
110
-
111
- def find_includes(source)
112
-
113
- #remove comments (block and line, in three steps to ensure correct precedence)
114
- source.gsub!(/\/\/(?:.+\/\*|\*(?:$|[^\/])).*$/, '') # remove line comments that comment out the start of blocks
115
- source.gsub!(/\/\*.*?\*\//m, '') # remove block comments
116
- source.gsub!(/\/\/.*$/, '') # remove line comments (all that remain)
117
-
118
- #parse out includes
119
- includes = source.scan(/^\s*#include\s+\"\s*(.+)\.[hH]\s*\"/).flatten
120
- brackets_includes = source.scan(/^\s*#include\s+<\s*(.+)\s*>/).flatten
121
- brackets_includes.each { |inc| includes << '<' + inc +'>' }
122
- return includes
123
- end
124
-
125
- def find_mocks(includes)
126
- mock_headers = []
127
- includes.each do |include_file|
128
- mock_headers << File.basename(include_file) if (include_file =~ /^mock/i)
129
- end
130
- return mock_headers
131
- end
132
-
133
- def create_header(output, mocks, testfile_includes)
134
- output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
135
- create_runtest(output, mocks)
136
- output.puts("\n//=======Automagically Detected Files To Include=====")
137
- output.puts("#include \"#{@options[:framework].to_s}.h\"")
138
- output.puts('#include "cmock.h"') unless (mocks.empty?)
139
- @options[:includes].flatten.uniq.compact.each do |inc|
140
- output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
141
- end
142
- output.puts('#include <setjmp.h>')
143
- output.puts('#include <stdio.h>')
144
- output.puts('#include "CException.h"') if @options[:plugins].include?(:cexception)
145
- testfile_includes.delete("unity").delete("cmock")
146
- testrunner_includes = testfile_includes - mocks
147
- testrunner_includes.each do |inc|
148
- output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
149
- end
150
- mocks.each do |mock|
151
- output.puts("#include \"#{mock.gsub('.h','')}.h\"")
152
- end
153
- if @options[:enforce_strict_ordering]
154
- output.puts('')
155
- output.puts('int GlobalExpectCount;')
156
- output.puts('int GlobalVerifyOrder;')
157
- output.puts('char* GlobalOrderError;')
158
- end
159
- end
160
-
161
- def create_externs(output, tests, mocks)
162
- output.puts("\n//=======External Functions This Runner Calls=====")
163
- output.puts("extern void setUp(void);")
164
- output.puts("extern void tearDown(void);")
165
- tests.each do |test|
166
- output.puts("extern void #{test[:test]}(#{test[:call] || 'void'});")
167
- end
168
- output.puts('')
169
- end
170
-
171
- def create_mock_management(output, mocks)
172
- unless (mocks.empty?)
173
- output.puts("\n//=======Mock Management=====")
174
- output.puts("static void CMock_Init(void)")
175
- output.puts("{")
176
- if @options[:enforce_strict_ordering]
177
- output.puts(" GlobalExpectCount = 0;")
178
- output.puts(" GlobalVerifyOrder = 0;")
179
- output.puts(" GlobalOrderError = NULL;")
180
- end
181
- mocks.each do |mock|
182
- mock_clean = mock.gsub(/(?:-|\s+)/, "_")
183
- output.puts(" #{mock_clean}_Init();")
184
- end
185
- output.puts("}\n")
186
-
187
- output.puts("static void CMock_Verify(void)")
188
- output.puts("{")
189
- mocks.each do |mock|
190
- mock_clean = mock.gsub(/(?:-|\s+)/, "_")
191
- output.puts(" #{mock_clean}_Verify();")
192
- end
193
- output.puts("}\n")
194
-
195
- output.puts("static void CMock_Destroy(void)")
196
- output.puts("{")
197
- mocks.each do |mock|
198
- mock_clean = mock.gsub(/(?:-|\s+)/, "_")
199
- output.puts(" #{mock_clean}_Destroy();")
200
- end
201
- output.puts("}\n")
202
- end
203
- end
204
-
205
- def create_suite_setup_and_teardown(output)
206
- unless (@options[:suite_setup].nil?)
207
- output.puts("\n//=======Suite Setup=====")
208
- output.puts("static int suite_setup(void)")
209
- output.puts("{")
210
- output.puts(@options[:suite_setup])
211
- output.puts("}")
212
- end
213
- unless (@options[:suite_teardown].nil?)
214
- output.puts("\n//=======Suite Teardown=====")
215
- output.puts("static int suite_teardown(int num_failures)")
216
- output.puts("{")
217
- output.puts(@options[:suite_teardown])
218
- output.puts("}")
219
- end
220
- end
221
-
222
- def create_runtest(output, used_mocks)
223
- cexception = @options[:plugins].include? :cexception
224
- va_args1 = @options[:use_param_tests] ? ', ...' : ''
225
- va_args2 = @options[:use_param_tests] ? '__VA_ARGS__' : ''
226
- output.puts("\n//=======Test Runner Used To Run Each Test Below=====")
227
- output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests]
228
- output.puts("#define RUN_TEST(TestFunc, TestLineNum#{va_args1}) \\")
229
- output.puts("{ \\")
230
- output.puts(" Unity.CurrentTestName = #TestFunc#{va_args2.empty? ? '' : " \"(\" ##{va_args2} \")\""}; \\")
231
- output.puts(" Unity.CurrentTestLineNumber = TestLineNum; \\")
232
- output.puts(" Unity.NumberOfTests++; \\")
233
- output.puts(" CMock_Init(); \\") unless (used_mocks.empty?)
234
- output.puts(" if (TEST_PROTECT()) \\")
235
- output.puts(" { \\")
236
- output.puts(" CEXCEPTION_T e; \\") if cexception
237
- output.puts(" Try { \\") if cexception
238
- output.puts(" setUp(); \\")
239
- output.puts(" TestFunc(#{va_args2}); \\")
240
- output.puts(" } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, \"Unhandled Exception!\"); } \\") if cexception
241
- output.puts(" } \\")
242
- output.puts(" if (TEST_PROTECT() && !TEST_IS_IGNORED) \\")
243
- output.puts(" { \\")
244
- output.puts(" tearDown(); \\")
245
- output.puts(" CMock_Verify(); \\") unless (used_mocks.empty?)
246
- output.puts(" } \\")
247
- output.puts(" CMock_Destroy(); \\") unless (used_mocks.empty?)
248
- output.puts(" UnityConcludeTest(); \\")
249
- output.puts("}\n")
250
- end
251
-
252
- def create_reset(output, used_mocks)
253
- output.puts("\n//=======Test Reset Option=====")
254
- output.puts("void resetTest()")
255
- output.puts("{")
256
- output.puts(" CMock_Verify();") unless (used_mocks.empty?)
257
- output.puts(" CMock_Destroy();") unless (used_mocks.empty?)
258
- output.puts(" tearDown();")
259
- output.puts(" CMock_Init();") unless (used_mocks.empty?)
260
- output.puts(" setUp();")
261
- output.puts("}")
262
- end
263
-
264
- def create_main(output, filename, tests, used_mocks)
265
- output.puts("\n\n//=======MAIN=====")
266
- output.puts("int main(void)")
267
- output.puts("{")
268
- output.puts(" suite_setup();") unless @options[:suite_setup].nil?
269
- output.puts(" UnityBegin();")
270
- output.puts(" Unity.TestFile = \"#{filename}\";")
271
- if (@options[:use_param_tests])
272
- tests.each do |test|
273
- if ((test[:args].nil?) or (test[:args].empty?))
274
- output.puts(" RUN_TEST(#{test[:test]}, #{test[:line_number]}, RUN_TEST_NO_ARGS);")
275
- else
276
- test[:args].each {|args| output.puts(" RUN_TEST(#{test[:test]}, #{test[:line_number]}, #{args});")}
277
- end
278
- end
279
- else
280
- tests.each { |test| output.puts(" RUN_TEST(#{test[:test]}, #{test[:line_number]});") }
281
- end
282
- output.puts()
283
- output.puts(" CMock_Guts_MemFreeFinal();") unless used_mocks.empty?
284
- output.puts(" return #{@options[:suite_teardown].nil? ? "" : "suite_teardown"}(UnityEnd());")
285
- output.puts("}")
286
- end
287
- end
288
-
289
-
290
- if ($0 == __FILE__)
291
- options = { :includes => [] }
292
- yaml_file = nil
293
-
294
- #parse out all the options first
295
- ARGV.reject! do |arg|
296
- case(arg)
297
- when '-cexception'
298
- options[:plugins] = [:cexception]; true
299
- when /\.*\.yml/
300
- options = UnityTestRunnerGenerator.grab_config(arg); true
301
- else false
302
- end
303
- end
304
-
305
- #make sure there is at least one parameter left (the input file)
306
- if !ARGV[0]
307
- puts ["usage: ruby #{__FILE__} (yaml) (options) input_test_file output_test_runner (includes)",
308
- " blah.yml - will use config options in the yml file (see docs)",
309
- " -cexception - include cexception support"].join("\n")
310
- exit 1
311
- end
312
-
313
- #create the default test runner name if not specified
314
- ARGV[1] = ARGV[0].gsub(".c","_Runner.c") if (!ARGV[1])
315
-
316
- #everything else is an include file
317
- options[:includes] ||= (ARGV.slice(2..-1).flatten.compact) if (ARGV.size > 2)
318
-
319
- UnityTestRunnerGenerator.new(options).run(ARGV[0], ARGV[1])
320
- end
1
+ # ==========================================
2
+ # Unity Project - A Test Framework for C
3
+ # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
4
+ # [Released under MIT License. Please refer to license.txt for details]
5
+ # ==========================================
6
+
7
+ $QUICK_RUBY_VERSION = RUBY_VERSION.split('.').inject(0){|vv,v| vv * 100 + v.to_i }
8
+ File.expand_path(File.join(File.dirname(__FILE__),'colour_prompt'))
9
+
10
+ class UnityTestRunnerGenerator
11
+
12
+ def initialize(options = nil)
13
+ @options = UnityTestRunnerGenerator.default_options
14
+ case(options)
15
+ when NilClass then @options
16
+ when String then @options.merge!(UnityTestRunnerGenerator.grab_config(options))
17
+ when Hash then @options.merge!(options)
18
+ else raise "If you specify arguments, it should be a filename or a hash of options"
19
+ end
20
+ require "#{File.expand_path(File.dirname(__FILE__))}/type_sanitizer"
21
+ end
22
+
23
+ def self.default_options
24
+ {
25
+ :includes => [],
26
+ :plugins => [],
27
+ :framework => :unity,
28
+ :test_prefix => "test|spec|should",
29
+ :setup_name => "setUp",
30
+ :teardown_name => "tearDown",
31
+ :main_name => "main",
32
+ }
33
+ end
34
+
35
+ def self.grab_config(config_file)
36
+ options = self.default_options
37
+ unless (config_file.nil? or config_file.empty?)
38
+ require 'yaml'
39
+ yaml_guts = YAML.load_file(config_file)
40
+ options.merge!(yaml_guts[:unity] || yaml_guts[:cmock])
41
+ raise "No :unity or :cmock section found in #{config_file}" unless options
42
+ end
43
+ return(options)
44
+ end
45
+
46
+ def run(input_file, output_file, options=nil)
47
+ tests = []
48
+ testfile_includes = []
49
+ used_mocks = []
50
+
51
+ @options.merge!(options) unless options.nil?
52
+ module_name = File.basename(input_file)
53
+
54
+ #pull required data from source file
55
+ source = File.read(input_file)
56
+ source = source.force_encoding("ISO-8859-1").encode("utf-8", :replace => nil) if ($QUICK_RUBY_VERSION > 10900)
57
+ tests = find_tests(source)
58
+ headers = find_includes(source)
59
+ testfile_includes = (headers[:local] + headers[:system])
60
+ used_mocks = find_mocks(testfile_includes)
61
+ testfile_includes = (testfile_includes - used_mocks)
62
+ testfile_includes.delete_if{|inc| inc =~ /(unity|cmock)/}
63
+
64
+ #build runner file
65
+ generate(input_file, output_file, tests, used_mocks, testfile_includes)
66
+
67
+ #determine which files were used to return them
68
+ all_files_used = [input_file, output_file]
69
+ all_files_used += testfile_includes.map {|filename| filename + '.c'} unless testfile_includes.empty?
70
+ all_files_used += @options[:includes] unless @options[:includes].empty?
71
+ return all_files_used.uniq
72
+ end
73
+
74
+ def generate(input_file, output_file, tests, used_mocks, testfile_includes)
75
+ File.open(output_file, 'w') do |output|
76
+ create_header(output, used_mocks, testfile_includes)
77
+ create_externs(output, tests, used_mocks)
78
+ create_mock_management(output, used_mocks)
79
+ create_suite_setup_and_teardown(output)
80
+ create_reset(output, used_mocks)
81
+ create_main(output, input_file, tests, used_mocks)
82
+ end
83
+
84
+ if (@options[:header_file] && !@options[:header_file].empty?)
85
+ File.open(@options[:header_file], 'w') do |output|
86
+ create_h_file(output, @options[:header_file], tests, testfile_includes, used_mocks)
87
+ end
88
+ end
89
+ end
90
+
91
+ def find_tests(source)
92
+ tests_and_line_numbers = []
93
+
94
+ source_scrubbed = source.clone
95
+ source_scrubbed = source_scrubbed.gsub(/"[^"]*"/, '') # remove things in strings
96
+ source_scrubbed = source_scrubbed.gsub(/\/\/.*$/, '') # remove line comments
97
+ source_scrubbed = source_scrubbed.gsub(/\/\*.*?\*\//m, '') # remove block comments
98
+ lines = source_scrubbed.split(/(^\s*\#.*$) # Treat preprocessor directives as a logical line
99
+ | (;|\{|\}) /x) # Match ;, {, and } as end of lines
100
+
101
+ lines.each_with_index do |line, index|
102
+ #find tests
103
+ if line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+((?:#{@options[:test_prefix]}).*)\s*\(\s*(.*)\s*\)/
104
+ arguments = $1
105
+ name = $2
106
+ call = $3
107
+ params = $4
108
+ args = nil
109
+ if (@options[:use_param_tests] and !arguments.empty?)
110
+ args = []
111
+ arguments.scan(/\s*TEST_CASE\s*\((.*)\)\s*$/) {|a| args << a[0]}
112
+ end
113
+ tests_and_line_numbers << { :test => name, :args => args, :call => call, :params => params, :line_number => 0 }
114
+ end
115
+ end
116
+ tests_and_line_numbers.uniq! {|v| v[:test] }
117
+
118
+ #determine line numbers and create tests to run
119
+ source_lines = source.split("\n")
120
+ source_index = 0;
121
+ tests_and_line_numbers.size.times do |i|
122
+ source_lines[source_index..-1].each_with_index do |line, index|
123
+ if (line =~ /#{tests_and_line_numbers[i][:test]}/)
124
+ source_index += index
125
+ tests_and_line_numbers[i][:line_number] = source_index + 1
126
+ break
127
+ end
128
+ end
129
+ end
130
+
131
+ return tests_and_line_numbers
132
+ end
133
+
134
+ def find_includes(source)
135
+
136
+ #remove comments (block and line, in three steps to ensure correct precedence)
137
+ source.gsub!(/\/\/(?:.+\/\*|\*(?:$|[^\/])).*$/, '') # remove line comments that comment out the start of blocks
138
+ source.gsub!(/\/\*.*?\*\//m, '') # remove block comments
139
+ source.gsub!(/\/\/.*$/, '') # remove line comments (all that remain)
140
+
141
+ #parse out includes
142
+ includes = {
143
+ :local => source.scan(/^\s*#include\s+\"\s*(.+)\.[hH]\s*\"/).flatten,
144
+ :system => source.scan(/^\s*#include\s+<\s*(.+)\s*>/).flatten.map { |inc| "<#{inc}>" }
145
+ }
146
+ return includes
147
+ end
148
+
149
+ def find_mocks(includes)
150
+ mock_headers = []
151
+ includes.each do |include_path|
152
+ include_file = File.basename(include_path)
153
+ mock_headers << include_path if (include_file =~ /^mock/i)
154
+ end
155
+ return mock_headers
156
+ end
157
+
158
+ def create_header(output, mocks, testfile_includes=[])
159
+ output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
160
+ create_runtest(output, mocks)
161
+ output.puts("\n//=======Automagically Detected Files To Include=====")
162
+ output.puts("#include \"#{@options[:framework].to_s}.h\"")
163
+ output.puts('#include "cmock.h"') unless (mocks.empty?)
164
+ output.puts('#include <setjmp.h>')
165
+ output.puts('#include <stdio.h>')
166
+ output.puts('#include "CException.h"') if @options[:plugins].include?(:cexception)
167
+ if (@options[:header_file] && !@options[:header_file].empty?)
168
+ output.puts("#include \"#{File.basename(@options[:header_file])}\"")
169
+ else
170
+ @options[:includes].flatten.uniq.compact.each do |inc|
171
+ output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
172
+ end
173
+ testfile_includes.each do |inc|
174
+ output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
175
+ end
176
+ end
177
+ mocks.each do |mock|
178
+ output.puts("#include \"#{mock.gsub('.h','')}.h\"")
179
+ end
180
+ if @options[:enforce_strict_ordering]
181
+ output.puts('')
182
+ output.puts('int GlobalExpectCount;')
183
+ output.puts('int GlobalVerifyOrder;')
184
+ output.puts('char* GlobalOrderError;')
185
+ end
186
+ end
187
+
188
+ def create_externs(output, tests, mocks)
189
+ output.puts("\n//=======External Functions This Runner Calls=====")
190
+ output.puts("extern void #{@options[:setup_name]}(void);")
191
+ output.puts("extern void #{@options[:teardown_name]}(void);")
192
+ tests.each do |test|
193
+ output.puts("extern void #{test[:test]}(#{test[:call] || 'void'});")
194
+ end
195
+ output.puts('')
196
+ end
197
+
198
+ def create_mock_management(output, mock_headers)
199
+ unless (mock_headers.empty?)
200
+ output.puts("\n//=======Mock Management=====")
201
+ output.puts("static void CMock_Init(void)")
202
+ output.puts("{")
203
+ if @options[:enforce_strict_ordering]
204
+ output.puts(" GlobalExpectCount = 0;")
205
+ output.puts(" GlobalVerifyOrder = 0;")
206
+ output.puts(" GlobalOrderError = NULL;")
207
+ end
208
+ mocks = mock_headers.map {|mock| File.basename(mock)}
209
+ mocks.each do |mock|
210
+ mock_clean = TypeSanitizer.sanitize_c_identifier(mock)
211
+ output.puts(" #{mock_clean}_Init();")
212
+ end
213
+ output.puts("}\n")
214
+
215
+ output.puts("static void CMock_Verify(void)")
216
+ output.puts("{")
217
+ mocks.each do |mock|
218
+ mock_clean = TypeSanitizer.sanitize_c_identifier(mock)
219
+ output.puts(" #{mock_clean}_Verify();")
220
+ end
221
+ output.puts("}\n")
222
+
223
+ output.puts("static void CMock_Destroy(void)")
224
+ output.puts("{")
225
+ mocks.each do |mock|
226
+ mock_clean = TypeSanitizer.sanitize_c_identifier(mock)
227
+ output.puts(" #{mock_clean}_Destroy();")
228
+ end
229
+ output.puts("}\n")
230
+ end
231
+ end
232
+
233
+ def create_suite_setup_and_teardown(output)
234
+ unless (@options[:suite_setup].nil?)
235
+ output.puts("\n//=======Suite Setup=====")
236
+ output.puts("static int suite_setup(void)")
237
+ output.puts("{")
238
+ output.puts(@options[:suite_setup])
239
+ output.puts("}")
240
+ end
241
+ unless (@options[:suite_teardown].nil?)
242
+ output.puts("\n//=======Suite Teardown=====")
243
+ output.puts("static int suite_teardown(int num_failures)")
244
+ output.puts("{")
245
+ output.puts(@options[:suite_teardown])
246
+ output.puts("}")
247
+ end
248
+ end
249
+
250
+ def create_runtest(output, used_mocks)
251
+ cexception = @options[:plugins].include? :cexception
252
+ va_args1 = @options[:use_param_tests] ? ', ...' : ''
253
+ va_args2 = @options[:use_param_tests] ? '__VA_ARGS__' : ''
254
+ output.puts("\n//=======Test Runner Used To Run Each Test Below=====")
255
+ output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests]
256
+ output.puts("#define RUN_TEST(TestFunc, TestLineNum#{va_args1}) \\")
257
+ output.puts("{ \\")
258
+ output.puts(" Unity.CurrentTestName = #TestFunc#{va_args2.empty? ? '' : " \"(\" ##{va_args2} \")\""}; \\")
259
+ output.puts(" Unity.CurrentTestLineNumber = TestLineNum; \\")
260
+ output.puts(" Unity.NumberOfTests++; \\")
261
+ output.puts(" CMock_Init(); \\") unless (used_mocks.empty?)
262
+ output.puts(" UNITY_CLR_DETAILS(); \\") unless (used_mocks.empty?)
263
+ output.puts(" if (TEST_PROTECT()) \\")
264
+ output.puts(" { \\")
265
+ output.puts(" CEXCEPTION_T e; \\") if cexception
266
+ output.puts(" Try { \\") if cexception
267
+ output.puts(" #{@options[:setup_name]}(); \\")
268
+ output.puts(" TestFunc(#{va_args2}); \\")
269
+ output.puts(" } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, \"Unhandled Exception!\"); } \\") if cexception
270
+ output.puts(" } \\")
271
+ output.puts(" if (TEST_PROTECT() && !TEST_IS_IGNORED) \\")
272
+ output.puts(" { \\")
273
+ output.puts(" #{@options[:teardown_name]}(); \\")
274
+ output.puts(" CMock_Verify(); \\") unless (used_mocks.empty?)
275
+ output.puts(" } \\")
276
+ output.puts(" CMock_Destroy(); \\") unless (used_mocks.empty?)
277
+ output.puts(" UnityConcludeTest(); \\")
278
+ output.puts("}\n")
279
+ end
280
+
281
+ def create_reset(output, used_mocks)
282
+ output.puts("\n//=======Test Reset Option=====")
283
+ output.puts("void resetTest(void);")
284
+ output.puts("void resetTest(void)")
285
+ output.puts("{")
286
+ output.puts(" CMock_Verify();") unless (used_mocks.empty?)
287
+ output.puts(" CMock_Destroy();") unless (used_mocks.empty?)
288
+ output.puts(" #{@options[:teardown_name]}();")
289
+ output.puts(" CMock_Init();") unless (used_mocks.empty?)
290
+ output.puts(" #{@options[:setup_name]}();")
291
+ output.puts("}")
292
+ end
293
+
294
+ def create_main(output, filename, tests, used_mocks)
295
+ output.puts("\n\n//=======MAIN=====")
296
+ if (@options[:main_name] != "main")
297
+ output.puts("int #{@options[:main_name]}(void);")
298
+ end
299
+ output.puts("int #{@options[:main_name]}(void)")
300
+ output.puts("{")
301
+ output.puts(" suite_setup();") unless @options[:suite_setup].nil?
302
+ output.puts(" UnityBegin(\"#{filename.gsub(/\\/,'\\\\')}\");")
303
+ if (@options[:use_param_tests])
304
+ tests.each do |test|
305
+ if ((test[:args].nil?) or (test[:args].empty?))
306
+ output.puts(" RUN_TEST(#{test[:test]}, #{test[:line_number]}, RUN_TEST_NO_ARGS);")
307
+ else
308
+ test[:args].each {|args| output.puts(" RUN_TEST(#{test[:test]}, #{test[:line_number]}, #{args});")}
309
+ end
310
+ end
311
+ else
312
+ tests.each { |test| output.puts(" RUN_TEST(#{test[:test]}, #{test[:line_number]});") }
313
+ end
314
+ output.puts()
315
+ output.puts(" CMock_Guts_MemFreeFinal();") unless used_mocks.empty?
316
+ output.puts(" return #{@options[:suite_teardown].nil? ? "" : "suite_teardown"}(UnityEnd());")
317
+ output.puts("}")
318
+ end
319
+
320
+ def create_h_file(output, filename, tests, testfile_includes, used_mocks)
321
+ filename = File.basename(filename).gsub(/[-\/\\\.\,\s]/, "_").upcase
322
+ output.puts("/* AUTOGENERATED FILE. DO NOT EDIT. */")
323
+ output.puts("#ifndef _#{filename}")
324
+ output.puts("#define _#{filename}\n\n")
325
+ output.puts("#include \"#{@options[:framework].to_s}.h\"")
326
+ output.puts('#include "cmock.h"') unless (used_mocks.empty?)
327
+ @options[:includes].flatten.uniq.compact.each do |inc|
328
+ output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
329
+ end
330
+ testfile_includes.each do |inc|
331
+ output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
332
+ end
333
+ output.puts "\n"
334
+ tests.each do |test|
335
+ if ((test[:params].nil?) or (test[:params].empty?))
336
+ output.puts("void #{test[:test]}(void);")
337
+ else
338
+ output.puts("void #{test[:test]}(#{test[:params]});")
339
+ end
340
+ end
341
+ output.puts("#endif\n\n")
342
+ end
343
+ end
344
+
345
+ if ($0 == __FILE__)
346
+ options = { :includes => [] }
347
+ yaml_file = nil
348
+
349
+ #parse out all the options first (these will all be removed as we go)
350
+ ARGV.reject! do |arg|
351
+ case(arg)
352
+ when '-cexception'
353
+ options[:plugins] = [:cexception]; true
354
+ when /\.*\.ya?ml/
355
+ options = UnityTestRunnerGenerator.grab_config(arg); true
356
+ when /--(\w+)=\"?(.*)\"?/
357
+ options[$1.to_sym] = $2; true
358
+ when /\.*\.h/
359
+ options[:includes] << arg; true
360
+ else false
361
+ end
362
+ end
363
+
364
+ #make sure there is at least one parameter left (the input file)
365
+ if !ARGV[0]
366
+ puts ["\nusage: ruby #{__FILE__} (files) (options) input_test_file (output)",
367
+ "\n input_test_file - this is the C file you want to create a runner for",
368
+ " output - this is the name of the runner file to generate",
369
+ " defaults to (input_test_file)_Runner",
370
+ " files:",
371
+ " *.yml / *.yaml - loads configuration from here in :unity or :cmock",
372
+ " *.h - header files are added as #includes in runner",
373
+ " options:",
374
+ " -cexception - include cexception support",
375
+ " --setup_name=\"\" - redefine setUp func name to something else",
376
+ " --teardown_name=\"\" - redefine tearDown func name to something else",
377
+ " --main_name=\"\" - redefine main func name to something else",
378
+ " --test_prefix=\"\" - redefine test prefix from default test|spec|should",
379
+ " --suite_setup=\"\" - code to execute for setup of entire suite",
380
+ " --suite_teardown=\"\" - code to execute for teardown of entire suite",
381
+ " --use_param_tests=1 - enable parameterized tests (disabled by default)",
382
+ " --header_file=\"\" - path/name of test header file to generate too"
383
+ ].join("\n")
384
+ exit 1
385
+ end
386
+
387
+ #create the default test runner name if not specified
388
+ ARGV[1] = ARGV[0].gsub(".c","_Runner.c") if (!ARGV[1])
389
+
390
+ UnityTestRunnerGenerator.new(options).run(ARGV[0], ARGV[1])
391
+ end