ceedling 0.15.1 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +9 -13
  4. data/README.md +21 -3
  5. data/{rakefile.rb → Rakefile} +0 -0
  6. data/lib/ceedling/version.rb +4 -4
  7. data/lib/ceedling/version.rb.erb +1 -1
  8. data/release/version.info +1 -1
  9. data/vendor/c_exception/Gemfile +1 -1
  10. data/vendor/c_exception/Gemfile.lock +12 -0
  11. data/vendor/c_exception/{docs/license.txt → LICENSE.txt} +9 -9
  12. data/vendor/c_exception/README.md +146 -0
  13. data/vendor/c_exception/{rakefile.rb → Rakefile} +6 -5
  14. data/vendor/c_exception/lib/CException.c +9 -6
  15. data/vendor/c_exception/release/build.info +1 -1
  16. data/vendor/c_exception/release/version.info +1 -1
  17. data/vendor/c_exception/test/CExceptionConfig.h +2 -0
  18. data/vendor/c_exception/test/TestException.c +4 -1
  19. data/vendor/cmock/README.md +24 -0
  20. data/vendor/cmock/{rakefile.rb → Rakefile} +12 -12
  21. data/vendor/cmock/docs/CMock Summary.odt +0 -0
  22. data/vendor/cmock/docs/CMock Summary.pdf +0 -0
  23. data/vendor/cmock/docs/CMock_Summary.md +130 -111
  24. data/vendor/cmock/docs/license.txt +1 -1
  25. data/vendor/cmock/lib/cmock.rb +36 -12
  26. data/vendor/cmock/lib/cmock_config.rb +39 -36
  27. data/vendor/cmock/lib/cmock_generator.rb +33 -25
  28. data/vendor/cmock/lib/cmock_generator_plugin_expect_any_args.rb +68 -0
  29. data/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +18 -42
  30. data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +2 -2
  31. data/vendor/cmock/lib/cmock_generator_utils.rb +39 -29
  32. data/vendor/cmock/lib/cmock_header_parser.rb +46 -39
  33. data/vendor/cmock/rakefile_helper.rb +38 -38
  34. data/vendor/cmock/src/cmock.c +20 -4
  35. data/vendor/cmock/src/cmock.h +6 -1
  36. data/vendor/cmock/src/cmock_internals.h +26 -3
  37. data/vendor/cmock/targets/clang_strict.yml +85 -0
  38. data/vendor/cmock/targets/gcc.yml +4 -2
  39. data/vendor/cmock/targets/gcc_64.yml +55 -0
  40. data/vendor/cmock/test/c/TestCMockC.c +3 -3
  41. data/vendor/cmock/test/c/TestCMockCDynamic.c +11 -11
  42. data/vendor/cmock/test/c/TestCMockCDynamic_Runner.c +4 -2
  43. data/vendor/cmock/test/c/TestCMockC_Runner.c +1 -1
  44. data/vendor/cmock/test/system/systest_generator.rb +38 -26
  45. data/vendor/cmock/test/system/test_compilation/const.h +8 -3
  46. data/vendor/cmock/test/system/test_interactions/all_plugins_but_other_limits.yml +92 -58
  47. data/vendor/cmock/test/system/test_interactions/all_plugins_coexist.yml +53 -48
  48. data/vendor/cmock/test/system/test_interactions/array_and_pointer_handling.yml +58 -56
  49. data/vendor/cmock/test/system/test_interactions/basic_expect_and_return.yml +19 -18
  50. data/vendor/cmock/test/system/test_interactions/expect_and_return_custom_types.yml +13 -13
  51. data/vendor/cmock/test/system/test_interactions/expect_and_return_treat_as.yml +20 -20
  52. data/vendor/cmock/test/system/test_interactions/expect_any_args.yml +238 -0
  53. data/vendor/cmock/test/system/test_interactions/fancy_pointer_handling.yml +36 -34
  54. data/vendor/cmock/test/system/test_interactions/ignore_and_return.yml +24 -15
  55. data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml +11 -11
  56. data/vendor/cmock/test/system/test_interactions/return_thru_ptr_and_expect_any_args.yml +235 -0
  57. data/vendor/cmock/test/system/test_interactions/return_thru_ptr_ignore_arg.yml +22 -26
  58. data/vendor/cmock/test/system/test_interactions/stubs_with_callbacks.yml +31 -31
  59. data/vendor/cmock/test/unit/cmock_generator_main_test.rb +141 -109
  60. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +82 -0
  61. data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +17 -81
  62. data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +10 -10
  63. data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +47 -41
  64. data/vendor/cmock/test/unit/cmock_header_parser_test.rb +290 -227
  65. data/vendor/unity/{rakefile.rb → Rakefile} +13 -6
  66. data/vendor/unity/auto/colour_prompt.rb +33 -12
  67. data/vendor/unity/auto/generate_test_runner.rb +67 -63
  68. data/vendor/unity/auto/parseOutput.rb +189 -0
  69. data/vendor/{cmock/vendor/unity/examples → unity/examples/example_1}/makefile +41 -40
  70. data/vendor/unity/examples/example_1/readme.txt +5 -0
  71. data/vendor/{cmock/vendor/unity/examples → unity/examples/example_1}/src/ProductionCode.c +24 -24
  72. data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_1}/src/ProductionCode.h +3 -3
  73. data/vendor/{cmock/vendor/unity/examples → unity/examples/example_1}/src/ProductionCode2.c +9 -9
  74. data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_1}/src/ProductionCode2.h +2 -2
  75. data/vendor/{cmock/vendor/unity/examples → unity/examples/example_1}/test/TestProductionCode.c +62 -62
  76. data/vendor/unity/examples/{test → example_1/test}/TestProductionCode2.c +31 -31
  77. data/vendor/unity/examples/{test/no_ruby → example_1/test/test_runners}/TestProductionCode2_Runner.c +46 -46
  78. data/vendor/unity/examples/{test/no_ruby → example_1/test/test_runners}/TestProductionCode_Runner.c +50 -50
  79. data/vendor/unity/examples/example_2/makefile +45 -0
  80. data/vendor/unity/examples/example_2/readme.txt +5 -0
  81. data/vendor/unity/examples/{src → example_2/src}/ProductionCode.c +24 -24
  82. data/vendor/unity/examples/{src → example_2/src}/ProductionCode.h +3 -3
  83. data/vendor/unity/examples/{src → example_2/src}/ProductionCode2.c +9 -9
  84. data/vendor/unity/examples/{src → example_2/src}/ProductionCode2.h +2 -2
  85. data/vendor/unity/examples/{test → example_2/test}/TestProductionCode.c +64 -62
  86. data/vendor/{cmock/vendor/unity/examples → unity/examples/example_2}/test/TestProductionCode2.c +33 -31
  87. data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +9 -0
  88. data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +11 -0
  89. data/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -0
  90. data/vendor/unity/examples/{helper → example_3/helper}/UnityHelper.c +10 -10
  91. data/vendor/{cmock/vendor/unity/examples → unity/examples/example_3}/helper/UnityHelper.h +12 -12
  92. data/vendor/unity/examples/{makefile → example_3/makefile} +41 -40
  93. data/vendor/unity/examples/{rakefile.rb → example_3/rakefile.rb} +44 -43
  94. data/vendor/{cmock/vendor/unity/examples → unity/examples/example_3}/rakefile_helper.rb +256 -256
  95. data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/readme.txt +18 -17
  96. data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/src/ProductionCode.c +24 -24
  97. data/vendor/{cmock/vendor/unity/examples → unity/examples/example_3}/src/ProductionCode.h +3 -3
  98. data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/src/ProductionCode2.c +9 -9
  99. data/vendor/{cmock/vendor/unity/examples → unity/examples/example_3}/src/ProductionCode2.h +2 -2
  100. data/vendor/{c_exception/vendor/unity/targets/gcc_64.yml → unity/examples/example_3/target_gcc_32.yml} +46 -44
  101. data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/test/TestProductionCode.c +62 -62
  102. data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/test/TestProductionCode2.c +31 -31
  103. data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/test/no_ruby/TestProductionCode2_Runner.c +46 -46
  104. data/vendor/{cmock/vendor/unity/examples → unity/examples/example_3}/test/no_ruby/TestProductionCode_Runner.c +50 -50
  105. data/vendor/unity/extras/eclipse/error_parsers.txt +26 -0
  106. data/vendor/unity/extras/fixture/src/unity_fixture.c +4 -1
  107. data/vendor/unity/extras/fixture/src/unity_fixture.h +17 -16
  108. data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +7 -7
  109. data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +17 -0
  110. data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +1 -0
  111. data/vendor/unity/makefile +6 -4
  112. data/vendor/unity/rakefile_helper.rb +36 -27
  113. data/vendor/unity/src/unity.c +180 -181
  114. data/vendor/unity/src/unity.h +64 -2
  115. data/vendor/unity/src/unity_internals.h +188 -102
  116. data/vendor/unity/targets/clang_strict.yml +83 -0
  117. data/vendor/unity/targets/gcc_32.yml +5 -0
  118. data/vendor/unity/targets/gcc_64.yml +5 -0
  119. data/vendor/{c_exception/vendor/unity/targets/gcc.yml → unity/targets/gcc_auto_limits.yml} +5 -2
  120. data/vendor/{cmock/vendor/unity/targets/gcc_64.yml → unity/targets/gcc_auto_sizeof.yml} +6 -3
  121. data/vendor/{cmock/vendor/unity/targets/gcc.yml → unity/targets/gcc_auto_stdint.yml} +4 -2
  122. data/vendor/unity/test/expectdata/testsample_cmd.c +57 -54
  123. data/vendor/unity/test/expectdata/testsample_def.c +53 -50
  124. data/vendor/unity/test/expectdata/testsample_mock_cmd.c +79 -76
  125. data/vendor/unity/test/expectdata/testsample_mock_def.c +75 -72
  126. data/vendor/unity/test/expectdata/testsample_mock_new1.c +88 -85
  127. data/vendor/unity/test/expectdata/testsample_mock_new2.c +88 -85
  128. data/vendor/unity/test/expectdata/testsample_mock_param.c +76 -73
  129. data/vendor/unity/test/expectdata/testsample_mock_run1.c +88 -85
  130. data/vendor/unity/test/expectdata/testsample_mock_run2.c +88 -85
  131. data/vendor/unity/test/expectdata/testsample_mock_yaml.c +89 -86
  132. data/vendor/unity/test/expectdata/testsample_new1.c +63 -60
  133. data/vendor/unity/test/expectdata/testsample_new2.c +66 -63
  134. data/vendor/unity/test/expectdata/testsample_param.c +54 -51
  135. data/vendor/unity/test/expectdata/testsample_run1.c +63 -60
  136. data/vendor/unity/test/expectdata/testsample_run2.c +66 -63
  137. data/vendor/unity/test/expectdata/testsample_yaml.c +67 -64
  138. data/vendor/unity/test/test_generate_test_runner.rb +66 -72
  139. data/vendor/unity/test/testunity.c +591 -111
  140. metadata +58 -195
  141. data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +0 -94
  142. data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +0 -39
  143. data/vendor/c_exception/vendor/unity/auto/generate_config.yml +0 -36
  144. data/vendor/c_exception/vendor/unity/auto/generate_module.rb +0 -202
  145. data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +0 -313
  146. data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +0 -23
  147. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +0 -139
  148. data/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
  149. data/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
  150. data/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -217
  151. data/vendor/c_exception/vendor/unity/docs/license.txt +0 -31
  152. data/vendor/c_exception/vendor/unity/examples/helper/UnityHelper.c +0 -10
  153. data/vendor/c_exception/vendor/unity/examples/helper/UnityHelper.h +0 -12
  154. data/vendor/c_exception/vendor/unity/examples/makefile +0 -40
  155. data/vendor/c_exception/vendor/unity/examples/rakefile.rb +0 -32
  156. data/vendor/c_exception/vendor/unity/examples/rakefile_helper.rb +0 -256
  157. data/vendor/c_exception/vendor/unity/examples/test/no_ruby/TestProductionCode_Runner.c +0 -50
  158. data/vendor/c_exception/vendor/unity/extras/fixture/build/MakefileWorker.mk +0 -331
  159. data/vendor/c_exception/vendor/unity/extras/fixture/build/filterGcov.sh +0 -61
  160. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +0 -37
  161. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +0 -178
  162. data/vendor/c_exception/vendor/unity/extras/fixture/readme.txt +0 -9
  163. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +0 -381
  164. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +0 -81
  165. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +0 -44
  166. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +0 -16
  167. data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +0 -21
  168. data/vendor/c_exception/vendor/unity/extras/fixture/test/testunity_fixture.c +0 -39
  169. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +0 -321
  170. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +0 -40
  171. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +0 -56
  172. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +0 -17
  173. data/vendor/c_exception/vendor/unity/makefile +0 -35
  174. data/vendor/c_exception/vendor/unity/rakefile.rb +0 -59
  175. data/vendor/c_exception/vendor/unity/rakefile_helper.rb +0 -240
  176. data/vendor/c_exception/vendor/unity/release/build.info +0 -2
  177. data/vendor/c_exception/vendor/unity/release/version.info +0 -2
  178. data/vendor/c_exception/vendor/unity/src/unity.c +0 -979
  179. data/vendor/c_exception/vendor/unity/src/unity.h +0 -232
  180. data/vendor/c_exception/vendor/unity/src/unity_internals.h +0 -424
  181. data/vendor/c_exception/vendor/unity/targets/hitech_picc18.yml +0 -101
  182. data/vendor/c_exception/vendor/unity/targets/iar_arm_v4.yml +0 -89
  183. data/vendor/c_exception/vendor/unity/targets/iar_arm_v5.yml +0 -79
  184. data/vendor/c_exception/vendor/unity/targets/iar_arm_v5_3.yml +0 -79
  185. data/vendor/c_exception/vendor/unity/targets/iar_armcortex_LM3S9B92_v5_4.yml +0 -93
  186. data/vendor/c_exception/vendor/unity/targets/iar_cortexm3_v5.yml +0 -83
  187. data/vendor/c_exception/vendor/unity/targets/iar_msp430.yml +0 -94
  188. data/vendor/c_exception/vendor/unity/targets/iar_sh2a_v6.yml +0 -85
  189. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +0 -54
  190. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +0 -50
  191. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +0 -76
  192. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +0 -72
  193. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +0 -85
  194. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +0 -85
  195. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +0 -73
  196. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +0 -85
  197. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +0 -85
  198. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +0 -86
  199. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +0 -60
  200. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +0 -63
  201. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +0 -51
  202. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +0 -60
  203. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +0 -63
  204. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +0 -64
  205. data/vendor/c_exception/vendor/unity/test/test_generate_test_runner.rb +0 -94
  206. data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +0 -51
  207. data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +0 -9
  208. data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +0 -51
  209. data/vendor/c_exception/vendor/unity/test/testparameterized.c +0 -101
  210. data/vendor/c_exception/vendor/unity/test/testunity.c +0 -2024
  211. data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  212. data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
  213. data/vendor/cmock/vendor/c_exception/docs/license.txt +0 -30
  214. data/vendor/cmock/vendor/c_exception/docs/readme.txt +0 -236
  215. data/vendor/cmock/vendor/c_exception/lib/CException.c +0 -39
  216. data/vendor/cmock/vendor/c_exception/lib/CException.h +0 -70
  217. data/vendor/cmock/vendor/c_exception/makefile +0 -24
  218. data/vendor/cmock/vendor/c_exception/rakefile.rb +0 -41
  219. data/vendor/cmock/vendor/c_exception/release/build.info +0 -2
  220. data/vendor/cmock/vendor/c_exception/release/version.info +0 -2
  221. data/vendor/cmock/vendor/c_exception/test/CExceptionConfig.h +0 -27
  222. data/vendor/cmock/vendor/c_exception/test/TestException.c +0 -291
  223. data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +0 -62
  224. data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +0 -94
  225. data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +0 -39
  226. data/vendor/cmock/vendor/unity/auto/generate_config.yml +0 -36
  227. data/vendor/cmock/vendor/unity/auto/generate_module.rb +0 -202
  228. data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +0 -313
  229. data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +0 -23
  230. data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +0 -139
  231. data/vendor/cmock/vendor/unity/docs/Unity Summary.odt +0 -0
  232. data/vendor/cmock/vendor/unity/docs/Unity Summary.pdf +0 -0
  233. data/vendor/cmock/vendor/unity/docs/Unity Summary.txt +0 -217
  234. data/vendor/cmock/vendor/unity/docs/license.txt +0 -31
  235. data/vendor/cmock/vendor/unity/examples/helper/UnityHelper.c +0 -10
  236. data/vendor/cmock/vendor/unity/examples/rakefile.rb +0 -32
  237. data/vendor/cmock/vendor/unity/examples/readme.txt +0 -18
  238. data/vendor/cmock/vendor/unity/examples/test/no_ruby/TestProductionCode2_Runner.c +0 -46
  239. data/vendor/cmock/vendor/unity/extras/fixture/build/MakefileWorker.mk +0 -331
  240. data/vendor/cmock/vendor/unity/extras/fixture/build/filterGcov.sh +0 -61
  241. data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +0 -37
  242. data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +0 -178
  243. data/vendor/cmock/vendor/unity/extras/fixture/readme.txt +0 -9
  244. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +0 -381
  245. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +0 -81
  246. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +0 -44
  247. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +0 -16
  248. data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +0 -21
  249. data/vendor/cmock/vendor/unity/extras/fixture/test/testunity_fixture.c +0 -39
  250. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +0 -321
  251. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +0 -40
  252. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +0 -56
  253. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.h +0 -17
  254. data/vendor/cmock/vendor/unity/makefile +0 -35
  255. data/vendor/cmock/vendor/unity/rakefile.rb +0 -48
  256. data/vendor/cmock/vendor/unity/rakefile_helper.rb +0 -240
  257. data/vendor/cmock/vendor/unity/release/build.info +0 -2
  258. data/vendor/cmock/vendor/unity/release/version.info +0 -2
  259. data/vendor/cmock/vendor/unity/src/unity.c +0 -979
  260. data/vendor/cmock/vendor/unity/src/unity.h +0 -232
  261. data/vendor/cmock/vendor/unity/src/unity_internals.h +0 -424
  262. data/vendor/cmock/vendor/unity/targets/hitech_picc18.yml +0 -101
  263. data/vendor/cmock/vendor/unity/targets/iar_arm_v4.yml +0 -89
  264. data/vendor/cmock/vendor/unity/targets/iar_arm_v5.yml +0 -79
  265. data/vendor/cmock/vendor/unity/targets/iar_arm_v5_3.yml +0 -79
  266. data/vendor/cmock/vendor/unity/targets/iar_armcortex_LM3S9B92_v5_4.yml +0 -93
  267. data/vendor/cmock/vendor/unity/targets/iar_cortexm3_v5.yml +0 -83
  268. data/vendor/cmock/vendor/unity/targets/iar_msp430.yml +0 -94
  269. data/vendor/cmock/vendor/unity/targets/iar_sh2a_v6.yml +0 -85
  270. data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +0 -54
  271. data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +0 -50
  272. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +0 -76
  273. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +0 -72
  274. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +0 -85
  275. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +0 -85
  276. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +0 -73
  277. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +0 -85
  278. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +0 -85
  279. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +0 -86
  280. data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +0 -60
  281. data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +0 -63
  282. data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +0 -51
  283. data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +0 -60
  284. data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +0 -63
  285. data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +0 -64
  286. data/vendor/cmock/vendor/unity/test/test_generate_test_runner.rb +0 -94
  287. data/vendor/cmock/vendor/unity/test/testdata/mocksample.c +0 -51
  288. data/vendor/cmock/vendor/unity/test/testdata/sample.yml +0 -9
  289. data/vendor/cmock/vendor/unity/test/testdata/testsample.c +0 -51
  290. data/vendor/cmock/vendor/unity/test/testparameterized.c +0 -101
  291. data/vendor/cmock/vendor/unity/test/testunity.c +0 -2024
  292. data/vendor/unity/Gemfile +0 -4
  293. data/vendor/unity/examples/helper/UnityHelper.h +0 -12
  294. data/vendor/unity/examples/rakefile_helper.rb +0 -256
  295. data/vendor/unity/examples/readme.txt +0 -18
@@ -38,7 +38,7 @@ CMOCK_MEM_INDEX_TYPE CMock_Guts_MemNew(CMOCK_MEM_INDEX_TYPE size)
38
38
  {
39
39
  #ifdef CMOCK_MEM_DYNAMIC
40
40
  CMock_Guts_BufferSize += CMOCK_MEM_SIZE + size;
41
- CMock_Guts_Buffer = realloc(CMock_Guts_Buffer, CMock_Guts_BufferSize);
41
+ CMock_Guts_Buffer = realloc(CMock_Guts_Buffer, (size_t)CMock_Guts_BufferSize);
42
42
  if (CMock_Guts_Buffer == NULL)
43
43
  #endif //yes that if will continue to the return below if TRUE
44
44
  return CMOCK_GUTS_NONE;
@@ -78,7 +78,7 @@ CMOCK_MEM_INDEX_TYPE CMock_Guts_MemChain(CMOCK_MEM_INDEX_TYPE root_index, CMOCK_
78
78
  {
79
79
  return CMOCK_GUTS_NONE;
80
80
  }
81
-
81
+
82
82
  root = (void*)(&CMock_Guts_Buffer[root_index]);
83
83
  obj = (void*)(&CMock_Guts_Buffer[obj_index]);
84
84
 
@@ -91,7 +91,7 @@ CMOCK_MEM_INDEX_TYPE CMock_Guts_MemChain(CMOCK_MEM_INDEX_TYPE root_index, CMOCK_
91
91
  if (index > 0)
92
92
  next = (void*)(&CMock_Guts_Buffer[index]);
93
93
  } while (index > 0);
94
- *(CMOCK_MEM_INDEX_TYPE*)((CMOCK_MEM_PTR_AS_INT)next - CMOCK_MEM_INDEX_SIZE) = ((CMOCK_MEM_PTR_AS_INT)obj - (CMOCK_MEM_PTR_AS_INT)CMock_Guts_Buffer);
94
+ *(CMOCK_MEM_INDEX_TYPE*)((CMOCK_MEM_PTR_AS_INT)next - CMOCK_MEM_INDEX_SIZE) = (CMOCK_MEM_INDEX_TYPE)((CMOCK_MEM_PTR_AS_INT)obj - (CMOCK_MEM_PTR_AS_INT)CMock_Guts_Buffer);
95
95
  return root_index;
96
96
  }
97
97
  }
@@ -125,7 +125,7 @@ CMOCK_MEM_INDEX_TYPE CMock_Guts_MemEndOfChain(CMOCK_MEM_INDEX_TYPE root_index)
125
125
  {
126
126
  CMOCK_MEM_INDEX_TYPE index = root_index;
127
127
  CMOCK_MEM_INDEX_TYPE next_index;
128
-
128
+
129
129
  for (next_index = root_index;
130
130
  next_index != CMOCK_GUTS_NONE;
131
131
  next_index = CMock_Guts_MemNext(index))
@@ -174,3 +174,19 @@ void CMock_Guts_MemFreeAll(void)
174
174
  {
175
175
  CMock_Guts_FreePtr = CMOCK_MEM_ALIGN_SIZE; //skip the very beginning
176
176
  }
177
+
178
+ //-------------------------------------------------------
179
+ // CMock_Guts_MemFreeFinal
180
+ //-------------------------------------------------------
181
+ void CMock_Guts_MemFreeFinal(void)
182
+ {
183
+ CMock_Guts_FreePtr = CMOCK_MEM_ALIGN_SIZE;
184
+ #ifdef CMOCK_MEM_DYNAMIC
185
+ if (CMock_Guts_Buffer)
186
+ {
187
+ free(CMock_Guts_Buffer);
188
+ CMock_Guts_Buffer = NULL;
189
+ }
190
+ #endif
191
+ }
192
+
@@ -12,7 +12,11 @@
12
12
  #define CMOCK_MEM_INDEX_TYPE unsigned int
13
13
  #endif
14
14
 
15
- #define CMOCK_GUTS_NONE (0)
15
+ #define CMOCK_GUTS_NONE (0)
16
+
17
+ #define CMOCK_ARG_MODE CMOCK_MEM_INDEX_TYPE
18
+ #define CMOCK_ARG_ALL 0
19
+ #define CMOCK_ARG_NONE ((CMOCK_MEM_INDEX_TYPE)(~0))
16
20
 
17
21
  //-------------------------------------------------------
18
22
  // Memory API
@@ -27,5 +31,6 @@ void* CMock_Guts_GetAddressFor(CMOCK_MEM_INDEX_TYPE index);
27
31
  CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesFree(void);
28
32
  CMOCK_MEM_INDEX_TYPE CMock_Guts_MemBytesUsed(void);
29
33
  void CMock_Guts_MemFreeAll(void);
34
+ void CMock_Guts_MemFreeFinal(void);
30
35
 
31
36
  #endif //CMOCK_FRAMEWORK
@@ -20,6 +20,29 @@
20
20
  #endif
21
21
 
22
22
  //this is used internally during pointer arithmetic. make sure this type is the same size as the target's pointer type
23
+ #ifndef CMOCK_MEM_PTR_AS_INT
24
+ #ifdef UNITY_POINTER_WIDTH
25
+ #ifdef UNITY_INT_WIDTH
26
+ #if UNITY_POINTER_WIDTH == UNITY_INT_WIDTH
27
+ #define CMOCK_MEM_PTR_AS_INT unsigned int
28
+ #endif
29
+ #endif
30
+ #endif
31
+ #endif
32
+
33
+ #ifndef CMOCK_MEM_PTR_AS_INT
34
+ #ifdef UNITY_POINTER_WIDTH
35
+ #ifdef UNITY_LONG_WIDTH
36
+ #if UNITY_POINTER_WIDTH == UNITY_LONG_WIDTH
37
+ #define CMOCK_MEM_PTR_AS_INT unsigned long
38
+ #endif
39
+ #if UNITY_POINTER_WIDTH > UNITY_LONG_WIDTH
40
+ #define CMOCK_MEM_PTR_AS_INT unsigned long long
41
+ #endif
42
+ #endif
43
+ #endif
44
+ #endif
45
+
23
46
  #ifndef CMOCK_MEM_PTR_AS_INT
24
47
  #define CMOCK_MEM_PTR_AS_INT unsigned long
25
48
  #endif
@@ -35,9 +58,9 @@
35
58
  #endif
36
59
 
37
60
  //automatically calculated defs for easier reading
38
- #define CMOCK_MEM_ALIGN_SIZE (1u << CMOCK_MEM_ALIGN)
39
- #define CMOCK_MEM_ALIGN_MASK (CMOCK_MEM_ALIGN_SIZE - 1)
40
- #define CMOCK_MEM_INDEX_SIZE (CMOCK_MEM_PTR_AS_INT)((sizeof(CMOCK_MEM_INDEX_TYPE) > CMOCK_MEM_ALIGN_SIZE) ? sizeof(CMOCK_MEM_INDEX_TYPE) : CMOCK_MEM_ALIGN_SIZE)
61
+ #define CMOCK_MEM_ALIGN_SIZE (CMOCK_MEM_INDEX_TYPE)(1u << CMOCK_MEM_ALIGN)
62
+ #define CMOCK_MEM_ALIGN_MASK (CMOCK_MEM_INDEX_TYPE)(CMOCK_MEM_ALIGN_SIZE - 1)
63
+ #define CMOCK_MEM_INDEX_SIZE (CMOCK_MEM_INDEX_TYPE)(CMOCK_MEM_PTR_AS_INT)((sizeof(CMOCK_MEM_INDEX_TYPE) > CMOCK_MEM_ALIGN_SIZE) ? sizeof(CMOCK_MEM_INDEX_TYPE) : CMOCK_MEM_ALIGN_SIZE)
41
64
 
42
65
 
43
66
  #endif //CMOCK_FRAMEWORK_INTERNALS
@@ -0,0 +1,85 @@
1
+ ---
2
+ compiler:
3
+ path: clang
4
+ source_path: &systest_generated_path 'test/system/generated/'
5
+ unit_tests_path: &unit_tests_path 'examples/test/'
6
+ mocks_path: &systest_mocks_path 'test/system/generated/'
7
+ build_path: &systest_build_path 'test/system/build/'
8
+ options:
9
+ - '-c'
10
+ - '-Wall'
11
+ - '-Wextra'
12
+ - '-Werror'
13
+ - '-Wcast-qual'
14
+ - '-Wconversion'
15
+ - '-Wdisabled-optimization'
16
+ - '-Wformat=2'
17
+ - '-Winit-self'
18
+ - '-Winline'
19
+ - '-Winvalid-pch'
20
+ - '-Wmissing-declarations'
21
+ - '-Wmissing-include-dirs'
22
+ - '-Wmissing-prototypes'
23
+ - '-Wnonnull'
24
+ - '-Wpacked'
25
+ - '-Wpointer-arith'
26
+ - '-Wredundant-decls'
27
+ - '-Wswitch-default'
28
+ - '-Wstrict-aliasing=2'
29
+ - '-Wstrict-overflow=5'
30
+ - '-Wuninitialized'
31
+ - '-Wunused'
32
+ - '-Wunreachable-code'
33
+ - '-Wreturn-type'
34
+ - '-Wshadow'
35
+ - '-Wundef'
36
+ - '-Wwrite-strings'
37
+ - '-Wbad-function-cast'
38
+ - '-Wno-missing-prototypes' #we've been lazy about things like setUp and tearDown
39
+ - '-fms-extensions'
40
+ - '-fno-omit-frame-pointer'
41
+ - '-ffloat-store'
42
+ - '-fno-common'
43
+ - '-fstrict-aliasing'
44
+ - '-std=gnu99'
45
+ - '-pedantic'
46
+ - '-O0'
47
+ includes:
48
+ prefix: '-I'
49
+ items:
50
+ - *systest_generated_path
51
+ - *unit_tests_path
52
+ - *systest_mocks_path
53
+ - 'src/'
54
+ - 'vendor/unity/src/'
55
+ - 'vendor/c_exception/lib/'
56
+ - 'test/system/test_compilation/'
57
+ - 'test/'
58
+ defines:
59
+ prefix: '-D'
60
+ items:
61
+ - 'UNITY_SUPPORT_64'
62
+ - 'UNITY_POINTER_WIDTH=64'
63
+ object_files:
64
+ prefix: '-o'
65
+ extension: '.o'
66
+ destination: *systest_build_path
67
+
68
+ linker:
69
+ path: gcc
70
+ options:
71
+ - -lm
72
+ includes:
73
+ prefix: '-I'
74
+ object_files:
75
+ path: *systest_build_path
76
+ extension: '.o'
77
+ bin_files:
78
+ prefix: '-o'
79
+ extension: '.exe'
80
+ destination: *systest_build_path
81
+
82
+ unsupported:
83
+ - callingconv
84
+
85
+ colour: true
@@ -8,10 +8,12 @@ compiler:
8
8
  options:
9
9
  - '-c'
10
10
  - '-Wall'
11
+ - '-Wextra'
11
12
  - '-Wunused-parameter'
12
13
  - '-Wno-address'
13
14
  - '-std=c99'
14
15
  - '-pedantic'
16
+ - '-O0'
15
17
  includes:
16
18
  prefix: '-I'
17
19
  items:
@@ -31,7 +33,7 @@ compiler:
31
33
  prefix: '-o'
32
34
  extension: '.o'
33
35
  destination: *systest_build_path
34
-
36
+
35
37
  linker:
36
38
  path: gcc
37
39
  options:
@@ -46,7 +48,7 @@ linker:
46
48
  extension: '.exe'
47
49
  destination: *systest_build_path
48
50
 
49
- unsupported:
51
+ unsupported:
50
52
  - unity_64bit_support
51
53
  - callingconv
52
54
 
@@ -0,0 +1,55 @@
1
+ ---
2
+ compiler:
3
+ path: gcc
4
+ source_path: &systest_generated_path 'test/system/generated/'
5
+ unit_tests_path: &unit_tests_path 'examples/test/'
6
+ mocks_path: &systest_mocks_path 'test/system/generated/'
7
+ build_path: &systest_build_path 'test/system/build/'
8
+ options:
9
+ - '-c'
10
+ - '-m64'
11
+ - '-Wall'
12
+ - '-Wunused-parameter'
13
+ - '-Wno-address'
14
+ - '-std=c99'
15
+ - '-pedantic'
16
+ includes:
17
+ prefix: '-I'
18
+ items:
19
+ - *systest_generated_path
20
+ - *unit_tests_path
21
+ - *systest_mocks_path
22
+ - 'src/'
23
+ - 'vendor/unity/src/'
24
+ - 'vendor/c_exception/lib/'
25
+ - 'test/system/test_compilation/'
26
+ - 'test/'
27
+ defines:
28
+ prefix: '-D'
29
+ items:
30
+ - 'UNITY_SUPPORT_64'
31
+ - 'UNITY_POINTER_WIDTH=64'
32
+ object_files:
33
+ prefix: '-o'
34
+ extension: '.o'
35
+ destination: *systest_build_path
36
+
37
+ linker:
38
+ path: gcc
39
+ options:
40
+ - -lm
41
+ - '-m64'
42
+ includes:
43
+ prefix: '-I'
44
+ object_files:
45
+ path: *systest_build_path
46
+ extension: '.o'
47
+ bin_files:
48
+ prefix: '-o'
49
+ extension: '.exe'
50
+ destination: *systest_build_path
51
+
52
+ unsupported:
53
+ - callingconv
54
+
55
+ colour: true
@@ -240,9 +240,9 @@ void test_ThatWeCanAskForAllSortsOfSizes(void)
240
240
  unsigned int i;
241
241
  CMOCK_MEM_INDEX_TYPE first = CMOCK_GUTS_NONE;
242
242
  CMOCK_MEM_INDEX_TYPE next;
243
- unsigned int sizes[5] = {3, 1, 80, 5, 4};
244
- unsigned int sizes_buffered[5] = {4, 4, 80, 8, 4};
245
- unsigned int sum = 0;
243
+ CMOCK_MEM_INDEX_TYPE sizes[5] = {3, 1, 80, 5, 4};
244
+ CMOCK_MEM_INDEX_TYPE sizes_buffered[5] = {4, 4, 80, 8, 4};
245
+ CMOCK_MEM_INDEX_TYPE sum = 0;
246
246
 
247
247
  for (i = 0; i < 5; i++)
248
248
  {
@@ -7,10 +7,10 @@
7
7
  #include "unity.h"
8
8
  #include "cmock.h"
9
9
 
10
- #define TEST_MEM_INDEX_SIZE (sizeof(CMOCK_MEM_INDEX_TYPE))
11
- #define TEST_MEM_INDEX_PAD ((sizeof(CMOCK_MEM_INDEX_TYPE) + 7) & ~7) //round up to nearest 4 byte boundary
10
+ #define TEST_MEM_INDEX_SIZE (CMOCK_MEM_INDEX_TYPE)(sizeof(CMOCK_MEM_INDEX_TYPE))
11
+ #define TEST_MEM_INDEX_PAD (CMOCK_MEM_INDEX_TYPE)(((CMOCK_MEM_INDEX_TYPE)sizeof(CMOCK_MEM_INDEX_TYPE) + 7) & ~7) //round up to nearest 4 byte boundary
12
12
 
13
- unsigned int StartingSize;
13
+ CMOCK_MEM_INDEX_TYPE StartingSize;
14
14
 
15
15
  void setUp(void)
16
16
  {
@@ -35,11 +35,11 @@ void test_MemNewWillReturnNullIfGivenIllegalSizes(void)
35
35
  void test_MemNewWillNowSupportSizesGreaterThanTheDefinesCMockSize(void)
36
36
  {
37
37
  TEST_ASSERT_EQUAL(0, CMock_Guts_MemBytesFree());
38
-
38
+
39
39
  TEST_ASSERT_MESSAGE(CMock_Guts_MemNew(CMOCK_MEM_SIZE - TEST_MEM_INDEX_SIZE + 1) != CMOCK_GUTS_NONE, "Should Not Have Returned CMOCK_GUTS_NONE");
40
40
 
41
- TEST_ASSERT_EQUAL(CMOCK_MEM_SIZE + TEST_MEM_INDEX_PAD, CMock_Guts_MemBytesUsed());
42
- TEST_ASSERT_EQUAL(CMOCK_MEM_SIZE, CMock_Guts_MemBytesFree());
41
+ TEST_ASSERT_EQUAL(((CMOCK_MEM_INDEX_TYPE)CMOCK_MEM_SIZE + TEST_MEM_INDEX_PAD), CMock_Guts_MemBytesUsed());
42
+ TEST_ASSERT_EQUAL((CMOCK_MEM_INDEX_TYPE)CMOCK_MEM_SIZE, CMock_Guts_MemBytesFree());
43
43
  }
44
44
 
45
45
  void test_MemChainWillReturnNullAndDoNothingIfGivenIllegalInformation(void)
@@ -151,13 +151,13 @@ void test_ThatWeCanClaimAndChainAFewElementsTogether(void)
151
151
 
152
152
  void test_ThatWeCanAskForAllSortsOfSizes(void)
153
153
  {
154
- unsigned int i;
154
+ CMOCK_MEM_INDEX_TYPE i;
155
155
  CMOCK_MEM_INDEX_TYPE first = CMOCK_GUTS_NONE;
156
156
  CMOCK_MEM_INDEX_TYPE next;
157
- unsigned int sizes[10] = {3, 1, 80, 5, 8, 31, 7, 911, 2, 80};
158
- unsigned int sizes_buffered[10] = {16, 16, 88, 16, 16, 40, 16, 920, 16, 88}; //includes counter
159
- unsigned int sum = 0;
160
- unsigned int cap;
157
+ CMOCK_MEM_INDEX_TYPE sizes[10] = {3, 1, 80, 5, 8, 31, 7, 911, 2, 80};
158
+ CMOCK_MEM_INDEX_TYPE sizes_buffered[10] = {16, 16, 88, 16, 16, 40, 16, 920, 16, 88}; //includes counter
159
+ CMOCK_MEM_INDEX_TYPE sum = 0;
160
+ CMOCK_MEM_INDEX_TYPE cap;
161
161
 
162
162
  for (i = 0; i < 10; i++)
163
163
  {
@@ -5,6 +5,7 @@
5
5
  ========================================== */
6
6
 
7
7
  #include "unity.h"
8
+ #include "cmock.h"
8
9
  #include <setjmp.h>
9
10
  #include <stdio.h>
10
11
 
@@ -20,9 +21,9 @@ extern void test_ThatWeCanAskForAllSortsOfSizes(void);
20
21
 
21
22
  int main(void)
22
23
  {
23
- Unity.TestFile = "TestCMockDynamic.c";
24
24
  UnityBegin();
25
-
25
+ Unity.TestFile = "TestCMockDynamic.c";
26
+
26
27
  RUN_TEST(test_MemNewWillReturnNullIfGivenIllegalSizes, 26);
27
28
  RUN_TEST(test_MemNewWillNowSupportSizesGreaterThanTheDefinesCMockSize, 35);
28
29
  RUN_TEST(test_MemChainWillReturnNullAndDoNothingIfGivenIllegalInformation, 45);
@@ -31,5 +32,6 @@ int main(void)
31
32
  RUN_TEST(test_ThatWeCanAskForAllSortsOfSizes, 152);
32
33
 
33
34
  UnityEnd();
35
+ CMock_Guts_MemFreeFinal();
34
36
  return 0;
35
37
  }
@@ -22,8 +22,8 @@ extern void test_ThatWeCanAskForAllSortsOfSizes(void);
22
22
 
23
23
  int main(void)
24
24
  {
25
- Unity.TestFile = "TestCMock.c";
26
25
  UnityBegin();
26
+ Unity.TestFile = "TestCMock.c";
27
27
 
28
28
  RUN_TEST(test_MemNewWillReturnNullIfGivenIllegalSizes, 21);
29
29
  RUN_TEST(test_MemChainWillReturnNullAndDoNothingIfGivenIllegalInformation, 32);
@@ -2,7 +2,7 @@
2
2
  # CMock Project - Automatic Mock Generation for C
3
3
  # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
4
4
  # [Released under MIT License. Please refer to license.txt for details]
5
- # ==========================================
5
+ # ==========================================
6
6
 
7
7
  require 'yaml'
8
8
 
@@ -26,31 +26,31 @@ C_EXTENSION = '.c'
26
26
 
27
27
 
28
28
  class SystemTestGenerator
29
-
29
+
30
30
  def generate_files(test_cases)
31
31
  test_cases.each do |filename|
32
32
  yaml_hash = YAML.load_file(filename)
33
-
33
+
34
34
  name = File.basename(filename, YAML_EXTENSION)
35
35
  namix = "#{name}_"
36
-
36
+
37
37
  generate_cmock_config(yaml_hash, namix)
38
38
  generate_code(yaml_hash, namix, name)
39
39
  end
40
40
  end
41
41
 
42
42
  private
43
-
43
+
44
44
  def generate_cmock_config(yaml_hash, namix)
45
45
  cmock_yaml = yaml_hash.clone
46
46
  cmock_yaml.delete(:systest)
47
47
  cmock = cmock_yaml[:cmock]
48
-
48
+
49
49
  cmock[:mock_path] = GENERATED_PATH
50
50
  cmock[:includes] = (cmock[:includes] || []) + [namix + TYPES_H]
51
51
  cmock[:mock_prefix] = MOCK_PREFIX
52
52
  if not yaml_hash[:systest][:unity_helper].nil?
53
- cmock[:includes] << namix + UNITY_HELPER_H
53
+ cmock[:includes] << namix + UNITY_HELPER_H
54
54
  cmock[:unity_helper_path] = GENERATED_PATH + namix + UNITY_HELPER_H
55
55
  end
56
56
 
@@ -58,29 +58,29 @@ class SystemTestGenerator
58
58
  YAML.dump(cmock_yaml, out)
59
59
  end
60
60
  end
61
-
62
- def generate_code(yaml_hash, namix, name)
61
+
62
+ def generate_code(yaml_hash, namix, name)
63
63
  generate_types_file(yaml_hash, namix)
64
64
  generate_mockable_file(yaml_hash, namix)
65
65
  generate_unity_helper_files(yaml_hash, namix)
66
-
66
+
67
67
  generate_test_file(yaml_hash, namix, name)
68
68
  generate_source_file(yaml_hash, namix, name)
69
69
  end
70
-
70
+
71
71
  def generate_types_file(yaml_hash, namix)
72
72
  types = yaml_hash[:systest][:types]
73
73
  return if types.nil?
74
-
74
+
75
75
  write_header_file(GENERATED_PATH + namix + TYPES_H, namix.upcase + 'TYPES_H') do |out|
76
76
  out.puts(types)
77
77
  end
78
78
  end
79
-
79
+
80
80
  def generate_mockable_file(yaml_hash, namix)
81
81
  mockable = yaml_hash[:systest][:mockable]
82
82
  return if mockable.nil?
83
-
83
+
84
84
  write_header_file(GENERATED_PATH + namix + MOCKABLE_H, namix.upcase + 'MOCKABLE_H', [namix + TYPES_H]) do |out|
85
85
  out.puts(mockable)
86
86
  end
@@ -89,7 +89,7 @@ class SystemTestGenerator
89
89
  def generate_unity_helper_files(yaml_hash, namix)
90
90
  unity_helper = yaml_hash[:systest][:unity_helper]
91
91
  return if unity_helper.nil?
92
-
92
+
93
93
  write_header_file(GENERATED_PATH + namix + UNITY_HELPER_H, namix.upcase + 'UNITY_HELPER_H', [namix + TYPES_H]) do |out|
94
94
  out.puts(unity_helper[:header])
95
95
  end
@@ -102,12 +102,12 @@ class SystemTestGenerator
102
102
  def generate_test_file(yaml_hash, namix, name)
103
103
  tests = yaml_hash[:systest][:tests]
104
104
  return if tests.nil?
105
-
105
+
106
106
  includes = [UNITY_H, CMOCK_H]
107
107
  includes << (namix + UNITY_HELPER_H) if not yaml_hash[:systest][:unity_helper].nil?
108
108
  includes << [MOCK_PREFIX + namix + MOCKABLE_H]
109
109
  includes << [name + H_EXTENSION]
110
-
110
+
111
111
  write_source_file(GENERATED_PATH + TEST_PREFIX + name + C_EXTENSION, includes.flatten) do |out|
112
112
  out.puts(tests[:common])
113
113
  out.puts('')
@@ -117,29 +117,29 @@ class SystemTestGenerator
117
117
  out.puts(test[:code].gsub!(/test\(\)/, "void test#{index+1}(void)"))
118
118
  out.puts('')
119
119
  end
120
- end
120
+ end
121
121
  end
122
122
 
123
123
  def generate_source_file(yaml_hash, namix, name)
124
124
  source = yaml_hash[:systest][:source]
125
125
  return if source.nil?
126
-
126
+
127
127
  header_file = name + H_EXTENSION
128
-
128
+
129
129
  includes = yaml_hash[:systest][:types].nil? ? [] : [(namix + TYPES_H)]
130
130
 
131
131
  write_header_file(GENERATED_PATH + header_file, name.upcase, includes) do |out|
132
132
  out.puts(source[:header])
133
- end
133
+ end
134
134
 
135
135
  includes = []
136
136
  includes << (namix + TYPES_H) if not yaml_hash[:systest][:types].nil?
137
137
  includes << (namix + MOCKABLE_H) if not yaml_hash[:systest][:mockable].nil?
138
138
  includes << header_file
139
-
139
+
140
140
  write_source_file(GENERATED_PATH + name + C_EXTENSION, includes.flatten) do |out|
141
141
  out.puts(source[:code])
142
- end
142
+ end
143
143
  end
144
144
 
145
145
  def write_header_file(filename, upcase_name, include_list=[])
@@ -151,11 +151,17 @@ class SystemTestGenerator
151
151
  out.puts("#include \"#{include}\"")
152
152
  end
153
153
  out.puts('')
154
+ out.puts("#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)")
155
+ out.puts("#pragma GCC diagnostic ignored \"-Wpragmas\"")
156
+ out.puts("#endif")
157
+ out.puts('#pragma GCC diagnostic ignored "-Wunknown-pragmas"')
158
+ out.puts('#pragma GCC diagnostic ignored "-Wduplicate-decl-specifier"')
159
+ out.puts('')
154
160
  yield(out)
155
161
  out.puts('')
156
162
  out.puts("#endif // _#{upcase_name}")
157
163
  out.puts('')
158
- end
164
+ end
159
165
  end
160
166
 
161
167
  def write_source_file(filename, include_list=[])
@@ -164,11 +170,17 @@ class SystemTestGenerator
164
170
  out.puts("#include \"#{include}\"")
165
171
  end
166
172
  out.puts('')
173
+ out.puts("#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)")
174
+ out.puts("#pragma GCC diagnostic ignored \"-Wpragmas\"")
175
+ out.puts("#endif")
176
+ out.puts('#pragma GCC diagnostic ignored "-Wunknown-pragmas"')
177
+ out.puts('#pragma GCC diagnostic ignored "-Wduplicate-decl-specifier"')
178
+ out.puts('')
167
179
  yield(out)
168
180
  out.puts('')
169
- end
181
+ end
170
182
  end
171
-
183
+
172
184
  end
173
185
 
174
186