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
@@ -8,7 +8,7 @@
8
8
  :systest:
9
9
  :types: |
10
10
  #define UINT32 unsigned int
11
-
11
+
12
12
  typedef signed int custom_type;
13
13
 
14
14
  :mockable: |
@@ -17,57 +17,57 @@
17
17
  int baz(void);
18
18
  void fuz(int* args, int num);
19
19
 
20
- :source:
21
- :header: |
20
+ :source:
21
+ :header: |
22
22
  void function_a(int a, int b);
23
23
  UINT32 function_b(void);
24
24
  int function_c(void);
25
25
 
26
26
  :code: |
27
- void function_a(int a, int b)
27
+ void function_a(int a, int b)
28
28
  {
29
29
  int args[6] = {0, 1, 2, 3, 5, 5};
30
30
  args[0] = a;
31
31
  fuz(args, b);
32
- }
33
-
34
- UINT32 function_b(void)
32
+ }
33
+
34
+ UINT32 function_b(void)
35
35
  {
36
36
  UINT32 sum = 0;
37
37
  custom_type a = 0;
38
38
  custom_type b = 0;
39
39
  sum = foo(&a) + bar(&b);
40
- return sum + a + b;
40
+ return (UINT32)((custom_type)sum + a + b);
41
41
  }
42
-
43
- int function_c(void)
42
+
43
+ int function_c(void)
44
44
  {
45
45
  return (baz() + baz() + baz());
46
46
  }
47
-
47
+
48
48
  :tests:
49
49
  :common: |
50
50
  void setUp(void) {}
51
51
  void tearDown(void) {}
52
-
52
+
53
53
  UINT32 FooAndBarHelper(custom_type* data, int num)
54
54
  {
55
55
  num++;
56
56
  *data = (custom_type)(num * 2);
57
- return (*data * 2);
57
+ return (UINT32)(*data * 2);
58
58
  }
59
-
59
+
60
60
  int BazCallbackPointless(int num)
61
61
  {
62
62
  return num;
63
63
  }
64
-
64
+
65
65
  int BazCallbackComplainsIfCalledMoreThanTwice(int num)
66
66
  {
67
67
  TEST_ASSERT_MESSAGE(num < 2, "Do Not Call Baz More Than Twice");
68
68
  return num;
69
69
  }
70
-
70
+
71
71
  void FuzVerifier(int* args, int num_args, int num_calls)
72
72
  {
73
73
  int i;
@@ -75,9 +75,9 @@
75
75
  for (i = 0; i < num_args; i++)
76
76
  {
77
77
  TEST_ASSERT_EQUAL(num_calls + i, args[i]);
78
- }
78
+ }
79
79
  }
80
-
80
+
81
81
  :units:
82
82
  - :pass: TRUE
83
83
  :should: 'successfully exercise two simple ExpectAndReturn mock calls the normal way'
@@ -89,7 +89,7 @@
89
89
  bar_ExpectAndReturn(&exp, 20);
90
90
  TEST_ASSERT_EQUAL(30, function_b());
91
91
  }
92
-
92
+
93
93
  - :pass: FALSE
94
94
  :should: 'successfully exercise two simple ExpectAndReturn mock calls and catch failure the normal way'
95
95
  :code: |
@@ -100,7 +100,7 @@
100
100
  bar_ExpectAndReturn(&exp, 20);
101
101
  TEST_ASSERT_EQUAL(30, function_b());
102
102
  }
103
-
103
+
104
104
  - :pass: TRUE
105
105
  :should: 'successfully exercise using some basic callbacks'
106
106
  :code: |
@@ -110,7 +110,7 @@
110
110
  bar_StubWithCallback((CMOCK_bar_CALLBACK)FooAndBarHelper);
111
111
  TEST_ASSERT_EQUAL(12, function_b());
112
112
  }
113
-
113
+
114
114
  - :pass: TRUE
115
115
  :should: 'successfully exercise using some basic callbacks even if there were expects'
116
116
  :code: |
@@ -132,7 +132,7 @@
132
132
  bar_StubWithCallback((CMOCK_bar_CALLBACK)FooAndBarHelper);
133
133
  TEST_ASSERT_EQUAL(10, function_b());
134
134
  }
135
-
135
+
136
136
  - :pass: TRUE
137
137
  :should: 'successfully exercise a callback with no arguments'
138
138
  :code: |
@@ -150,7 +150,7 @@
150
150
  baz_StubWithCallback((CMOCK_baz_CALLBACK)BazCallbackComplainsIfCalledMoreThanTwice);
151
151
  function_c();
152
152
  }
153
-
153
+
154
154
  - :pass: TRUE
155
155
  :should: 'be usable for things like dynamically sized memory checking for passing conditions'
156
156
  :code: |
@@ -159,7 +159,7 @@
159
159
  fuz_StubWithCallback((CMOCK_fuz_CALLBACK)FuzVerifier);
160
160
  function_a(0, 4);
161
161
  }
162
-
162
+
163
163
  - :pass: FALSE
164
164
  :should: 'be usable for things like dynamically sized memory checking for failing conditions'
165
165
  :code: |
@@ -168,7 +168,7 @@
168
168
  fuz_StubWithCallback((CMOCK_fuz_CALLBACK)FuzVerifier);
169
169
  function_a(0, 5);
170
170
  }
171
-
171
+
172
172
  - :pass: FALSE
173
173
  :should: 'be usable for things like dynamically sized memory checking for failing conditions 2'
174
174
  :code: |
@@ -177,7 +177,7 @@
177
177
  fuz_StubWithCallback((CMOCK_fuz_CALLBACK)FuzVerifier);
178
178
  function_a(1, 4);
179
179
  }
180
-
180
+
181
181
  - :pass: TRUE
182
182
  :should: 'run them interlaced'
183
183
  :code: |
@@ -190,13 +190,13 @@
190
190
  bar_ExpectAndReturn(&exp, 40);
191
191
  fuz_StubWithCallback((CMOCK_fuz_CALLBACK)FuzVerifier);
192
192
  baz_StubWithCallback((CMOCK_baz_CALLBACK)BazCallbackPointless);
193
-
193
+
194
194
  TEST_ASSERT_EQUAL(30, function_b());
195
195
  TEST_ASSERT_EQUAL(55, function_b());
196
196
  function_a(0, 4);
197
197
  TEST_ASSERT_EQUAL(3, function_c());
198
198
  }
199
-
199
+
200
200
  - :pass: TRUE
201
201
  :should: 'run them back to back'
202
202
  :code: |
@@ -206,14 +206,14 @@
206
206
  foo_ExpectAndReturn(&exp, 10);
207
207
  bar_ExpectAndReturn(&exp, 20);
208
208
  TEST_ASSERT_EQUAL(30, function_b());
209
-
209
+
210
210
  foo_ExpectAndReturn(&exp, 15);
211
211
  bar_ExpectAndReturn(&exp, 40);
212
212
  TEST_ASSERT_EQUAL(55, function_b());
213
-
213
+
214
214
  fuz_StubWithCallback((CMOCK_fuz_CALLBACK)FuzVerifier);
215
215
  function_a(0, 4);
216
-
216
+
217
217
  baz_StubWithCallback((CMOCK_baz_CALLBACK)BazCallbackPointless);
218
218
  TEST_ASSERT_EQUAL(3, function_c());
219
219
  }
@@ -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
  $ThisIsOnlyATest = true
8
8
 
@@ -13,23 +13,23 @@ class MockedPluginHelper
13
13
  def initialize return_this
14
14
  @return_this = return_this
15
15
  end
16
-
16
+
17
17
  def include_files
18
18
  return @return_this
19
19
  end
20
-
20
+
21
21
  def instance_structure( name, args, rettype )
22
22
  return " #{@return_this}_#{name}(#{args}, #{rettype})"
23
23
  end
24
-
24
+
25
25
  def mock_verify( name )
26
26
  return " #{@return_this}_#{name}"
27
27
  end
28
-
28
+
29
29
  def mock_destroy( name, args, rettype )
30
30
  return " #{@return_this}_#{name}(#{args}, #{rettype})"
31
31
  end
32
-
32
+
33
33
  def mock_implementation(name, args)
34
34
  return " Mock#{name}#{@return_this}(#{args.join(", ")})"
35
35
  end
@@ -39,7 +39,7 @@ class CMockGeneratorTest < Test::Unit::TestCase
39
39
  def setup
40
40
  create_mocks :config, :file_writer, :utils, :plugins
41
41
  @module_name = "PoutPoutFish"
42
-
42
+
43
43
  #no strict handling
44
44
  @config.expect.mock_prefix.returns("Mock")
45
45
  @config.expect.enforce_strict_ordering.returns(nil)
@@ -53,7 +53,7 @@ class CMockGeneratorTest < Test::Unit::TestCase
53
53
  @cmock_generator.module_name = @module_name
54
54
  @cmock_generator.mock_name = "Mock#{@module_name}"
55
55
  @cmock_generator.clean_mock_name = "Mock#{@module_name}"
56
-
56
+
57
57
  #strict handling
58
58
  @config.expect.mock_prefix.returns("Mock")
59
59
  @config.expect.enforce_strict_ordering.returns(true)
@@ -71,34 +71,42 @@ class CMockGeneratorTest < Test::Unit::TestCase
71
71
 
72
72
  def teardown
73
73
  end
74
-
74
+
75
75
  should "have set up internal accessors correctly on init" do
76
76
  assert_equal(@config, @cmock_generator.config)
77
77
  assert_equal(@file_writer, @cmock_generator.file_writer)
78
78
  assert_equal(@utils, @cmock_generator.utils)
79
79
  assert_equal(@plugins, @cmock_generator.plugins)
80
80
  end
81
-
81
+
82
82
  should "create the top of a header file with optional include files from config and include file from plugin" do
83
83
  @config.expect.mock_prefix.returns("Mock")
84
84
  orig_filename = "PoutPoutFish.h"
85
85
  define_name = "MOCKPOUTPOUTFISH_H"
86
86
  mock_name = "MockPoutPoutFish"
87
87
  output = []
88
- expected = [ "/* AUTOGENERATED FILE. DO NOT EDIT. */\n",
89
- "#ifndef _#{define_name}\n",
90
- "#define _#{define_name}\n\n",
91
- "#include \"ConfigRequiredHeader1.h\"\n",
92
- "#include \"ConfigRequiredHeader2.h\"\n",
93
- "#include \"#{orig_filename}\"\n",
94
- "#include \"PluginRequiredHeader.h\"\n",
95
- "\n"
96
- ]
88
+ expected = [
89
+ "/* AUTOGENERATED FILE. DO NOT EDIT. */\n",
90
+ "#ifndef _#{define_name}\n",
91
+ "#define _#{define_name}\n\n",
92
+ "#include \"ConfigRequiredHeader1.h\"\n",
93
+ "#include \"ConfigRequiredHeader2.h\"\n",
94
+ "#include \"#{orig_filename}\"\n",
95
+ "#include \"PluginRequiredHeader.h\"\n",
96
+ "\n",
97
+ "/* Ignore the following warnings, since we are copying code */\n",
98
+ "#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)\n",
99
+ "#pragma GCC diagnostic ignored \"-Wpragmas\"\n",
100
+ "#endif\n",
101
+ "#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n",
102
+ "#pragma GCC diagnostic ignored \"-Wduplicate-decl-specifier\"\n",
103
+ "\n",
104
+ ]
97
105
 
98
106
  @plugins.expect.run(:include_files).returns("#include \"PluginRequiredHeader.h\"\n")
99
-
107
+
100
108
  @cmock_generator.create_mock_header_header(output, "MockPoutPoutFish.h")
101
-
109
+
102
110
  assert_equal(expected, output)
103
111
  end
104
112
 
@@ -115,48 +123,64 @@ class CMockGeneratorTest < Test::Unit::TestCase
115
123
  @cmock_generator2.module_name = "Pout-Pout Fish"
116
124
  @cmock_generator2.mock_name = "MockPout-Pout Fish"
117
125
  @cmock_generator2.clean_mock_name = "MockPout_Pout_Fish"
118
-
126
+
119
127
  @config.expect.mock_prefix.returns("Mock")
120
128
  orig_filename = "Pout-Pout Fish.h"
121
129
  define_name = "MOCKPOUT_POUT_FISH_H"
122
130
  mock_name = "MockPout_Pout_Fish"
123
131
  output = []
124
- expected = [ "/* AUTOGENERATED FILE. DO NOT EDIT. */\n",
125
- "#ifndef _#{define_name}\n",
126
- "#define _#{define_name}\n\n",
127
- "#include \"ConfigRequiredHeader1.h\"\n",
128
- "#include \"ConfigRequiredHeader2.h\"\n",
129
- "#include \"#{orig_filename}\"\n",
130
- "#include \"PluginRequiredHeader.h\"\n",
131
- "\n"
132
- ]
132
+ expected = [
133
+ "/* AUTOGENERATED FILE. DO NOT EDIT. */\n",
134
+ "#ifndef _#{define_name}\n",
135
+ "#define _#{define_name}\n\n",
136
+ "#include \"ConfigRequiredHeader1.h\"\n",
137
+ "#include \"ConfigRequiredHeader2.h\"\n",
138
+ "#include \"#{orig_filename}\"\n",
139
+ "#include \"PluginRequiredHeader.h\"\n",
140
+ "\n",
141
+ "/* Ignore the following warnings, since we are copying code */\n",
142
+ "#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)\n",
143
+ "#pragma GCC diagnostic ignored \"-Wpragmas\"\n",
144
+ "#endif\n",
145
+ "#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n",
146
+ "#pragma GCC diagnostic ignored \"-Wduplicate-decl-specifier\"\n",
147
+ "\n",
148
+ ]
133
149
 
134
150
  @plugins.expect.run(:include_files).returns("#include \"PluginRequiredHeader.h\"\n")
135
-
151
+
136
152
  @cmock_generator2.create_mock_header_header(output, "MockPout-Pout Fish.h")
137
-
153
+
138
154
  assert_equal(expected, output)
139
155
  end
140
-
156
+
141
157
  should "create the top of a header file with optional include files from config" do
142
158
  @config.expect.mock_prefix.returns("Mock")
143
159
  orig_filename = "PoutPoutFish.h"
144
160
  define_name = "MOCKPOUTPOUTFISH_H"
145
161
  mock_name = "MockPoutPoutFish"
146
162
  output = []
147
- expected = [ "/* AUTOGENERATED FILE. DO NOT EDIT. */\n",
148
- "#ifndef _#{define_name}\n",
149
- "#define _#{define_name}\n\n",
150
- "#include \"ConfigRequiredHeader1.h\"\n",
151
- "#include \"ConfigRequiredHeader2.h\"\n",
152
- "#include \"#{orig_filename}\"\n",
153
- "\n"
154
- ]
163
+ expected = [
164
+ "/* AUTOGENERATED FILE. DO NOT EDIT. */\n",
165
+ "#ifndef _#{define_name}\n",
166
+ "#define _#{define_name}\n\n",
167
+ "#include \"ConfigRequiredHeader1.h\"\n",
168
+ "#include \"ConfigRequiredHeader2.h\"\n",
169
+ "#include \"#{orig_filename}\"\n",
170
+ "\n",
171
+ "/* Ignore the following warnings, since we are copying code */\n",
172
+ "#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)\n",
173
+ "#pragma GCC diagnostic ignored \"-Wpragmas\"\n",
174
+ "#endif\n",
175
+ "#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n",
176
+ "#pragma GCC diagnostic ignored \"-Wduplicate-decl-specifier\"\n",
177
+ "\n",
178
+ ]
155
179
 
156
180
  @plugins.expect.run(:include_files).returns('')
157
-
181
+
158
182
  @cmock_generator.create_mock_header_header(output, "MockPoutPoutFish.h")
159
-
183
+
160
184
  assert_equal(expected, output)
161
185
  end
162
186
 
@@ -166,25 +190,33 @@ class CMockGeneratorTest < Test::Unit::TestCase
166
190
  define_name = "MOCKPOUTPOUTFISH_H"
167
191
  mock_name = "MockPoutPoutFish"
168
192
  output = []
169
- expected = [ "/* AUTOGENERATED FILE. DO NOT EDIT. */\n",
170
- "#ifndef _#{define_name}\n",
171
- "#define _#{define_name}\n\n",
172
- "#include \"ConfigRequiredHeader1.h\"\n",
173
- "#include \"ConfigRequiredHeader2.h\"\n",
174
- "#include \"#{orig_filename}\"\n",
175
- "#include \"PluginRequiredHeader.h\"\n",
176
- "\n"
177
- ]
193
+ expected = [
194
+ "/* AUTOGENERATED FILE. DO NOT EDIT. */\n",
195
+ "#ifndef _#{define_name}\n",
196
+ "#define _#{define_name}\n\n",
197
+ "#include \"ConfigRequiredHeader1.h\"\n",
198
+ "#include \"ConfigRequiredHeader2.h\"\n",
199
+ "#include \"#{orig_filename}\"\n",
200
+ "#include \"PluginRequiredHeader.h\"\n",
201
+ "\n",
202
+ "/* Ignore the following warnings, since we are copying code */\n",
203
+ "#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)\n",
204
+ "#pragma GCC diagnostic ignored \"-Wpragmas\"\n",
205
+ "#endif\n",
206
+ "#pragma GCC diagnostic ignored \"-Wunknown-pragmas\"\n",
207
+ "#pragma GCC diagnostic ignored \"-Wduplicate-decl-specifier\"\n",
208
+ "\n",
209
+ ]
178
210
 
179
211
  @plugins.expect.run(:include_files).returns("#include \"PluginRequiredHeader.h\"\n")
180
-
212
+
181
213
  @cmock_generator.create_mock_header_header(output, "MockPoutPoutFish.h")
182
-
214
+
183
215
  assert_equal(expected, output)
184
216
  end
185
217
 
186
218
  should "write typedefs" do
187
- typedefs = [ 'typedef unsigned char U8;',
219
+ typedefs = [ 'typedef unsigned char U8;',
188
220
  'typedef char S8;',
189
221
  'typedef unsigned long U32;'
190
222
  ]
@@ -195,9 +227,9 @@ class CMockGeneratorTest < Test::Unit::TestCase
195
227
  "typedef unsigned long U32;\n",
196
228
  "\n\n"
197
229
  ]
198
-
230
+
199
231
  @cmock_generator.create_typedefs(output, typedefs)
200
-
232
+
201
233
  assert_equal(expected, output.flatten)
202
234
  end
203
235
 
@@ -209,21 +241,21 @@ class CMockGeneratorTest < Test::Unit::TestCase
209
241
  "void #{mock_name}_Destroy(void);\n",
210
242
  "void #{mock_name}_Verify(void);\n\n"
211
243
  ]
212
-
244
+
213
245
  @cmock_generator.create_mock_header_service_call_declarations(output)
214
-
246
+
215
247
  assert_equal(expected, output)
216
248
  end
217
-
218
- should "append the proper footer to the header file" do
249
+
250
+ should "append the proper footer to the header file" do
219
251
  output = []
220
252
  expected = ["\n#endif\n"]
221
-
253
+
222
254
  @cmock_generator.create_mock_header_footer(output)
223
-
255
+
224
256
  assert_equal(expected, output)
225
257
  end
226
-
258
+
227
259
  should "create a proper heading for a source file" do
228
260
  output = []
229
261
  expected = [ "/* AUTOGENERATED FILE. DO NOT EDIT. */\n",
@@ -235,13 +267,13 @@ class CMockGeneratorTest < Test::Unit::TestCase
235
267
  "#include \"MockPoutPoutFish.h\"\n",
236
268
  "\n"
237
269
  ]
238
-
270
+
239
271
  @cmock_generator.create_source_header_section(output, "MockPoutPoutFish.c")
240
-
272
+
241
273
  assert_equal(expected, output)
242
274
  end
243
-
244
- should "create the instance structure where it is needed when no functions" do
275
+
276
+ should "create the instance structure where it is needed when no functions" do
245
277
  output = []
246
278
  functions = []
247
279
  expected = [ "static struct MockPoutPoutFishInstance\n",
@@ -249,15 +281,15 @@ class CMockGeneratorTest < Test::Unit::TestCase
249
281
  " unsigned char placeHolder;\n",
250
282
  "} Mock;\n\n"
251
283
  ].join
252
-
284
+
253
285
  @cmock_generator.create_instance_structure(output, functions)
254
-
286
+
255
287
  assert_equal(expected, output.join)
256
288
  end
257
-
258
- should "create the instance structure where it is needed when functions required" do
289
+
290
+ should "create the instance structure where it is needed when functions required" do
259
291
  output = []
260
- functions = [ { :name => "First", :args => "int Candy", :return => test_return[:int] },
292
+ functions = [ { :name => "First", :args => "int Candy", :return => test_return[:int] },
261
293
  { :name => "Second", :args => "bool Smarty", :return => test_return[:string] }
262
294
  ]
263
295
  expected = [ "typedef struct _CMOCK_First_CALL_INSTANCE\n{\n",
@@ -279,47 +311,47 @@ class CMockGeneratorTest < Test::Unit::TestCase
279
311
 
280
312
  @plugins.expect.run(:instance_structure, functions[0]).returns([" d1"])
281
313
  @plugins.expect.run(:instance_structure, functions[1]).returns([" e1"," e2"," e3"])
282
-
314
+
283
315
  @cmock_generator.create_instance_structure(output, functions)
284
-
316
+
285
317
  assert_equal(expected, output.join)
286
318
  end
287
-
319
+
288
320
  should "create extern declarations for source file" do
289
321
  output = []
290
322
  expected = [ "extern jmp_buf AbortFrame;\n",
291
323
  "\n" ]
292
-
324
+
293
325
  @cmock_generator.create_extern_declarations(output)
294
-
326
+
295
327
  assert_equal(expected, output.flatten)
296
328
  end
297
-
329
+
298
330
  should "create extern declarations for source file when using strict ordering" do
299
331
  output = []
300
332
  expected = [ "extern jmp_buf AbortFrame;\n",
301
333
  "extern int GlobalExpectCount;\n",
302
334
  "extern int GlobalVerifyOrder;\n",
303
335
  "\n" ]
304
-
336
+
305
337
  @cmock_generator_strict.create_extern_declarations(output)
306
-
338
+
307
339
  assert_equal(expected, output.flatten)
308
340
  end
309
-
341
+
310
342
  should "create mock verify functions in source file when no functions specified" do
311
343
  functions = []
312
344
  output = []
313
345
  expected = "void MockPoutPoutFish_Verify(void)\n{\n}\n\n"
314
-
346
+
315
347
  @cmock_generator.create_mock_verify_function(output, functions)
316
-
348
+
317
349
  assert_equal(expected, output.join)
318
350
  end
319
-
351
+
320
352
  should "create mock verify functions in source file when extra functions specified" do
321
- functions = [ { :name => "First", :args => "int Candy", :return => test_return[:int] },
322
- { :name => "Second", :args => "bool Smarty", :return => test_return[:string] }
353
+ functions = [ { :name => "First", :args => "int Candy", :return => test_return[:int] },
354
+ { :name => "Second", :args => "bool Smarty", :return => test_return[:string] }
323
355
  ]
324
356
  output = []
325
357
  expected = [ "void MockPoutPoutFish_Verify(void)\n{\n",
@@ -332,13 +364,13 @@ class CMockGeneratorTest < Test::Unit::TestCase
332
364
  ]
333
365
  @plugins.expect.run(:mock_verify, functions[0]).returns([" Uno_First"," Dos_First"])
334
366
  @plugins.expect.run(:mock_verify, functions[1]).returns([" Uno_Second"," Dos_Second"])
335
-
367
+
336
368
  @cmock_generator.ordered = true
337
369
  @cmock_generator.create_mock_verify_function(output, functions)
338
-
370
+
339
371
  assert_equal(expected, output.flatten)
340
372
  end
341
-
373
+
342
374
  should "create mock init functions in source file" do
343
375
  output = []
344
376
  expected = [ "void MockPoutPoutFish_Init(void)\n{\n",
@@ -347,10 +379,10 @@ class CMockGeneratorTest < Test::Unit::TestCase
347
379
  ]
348
380
 
349
381
  @cmock_generator.create_mock_init_function(output)
350
-
382
+
351
383
  assert_equal(expected.join, output.join)
352
384
  end
353
-
385
+
354
386
  should "create mock destroy functions in source file" do
355
387
  functions = []
356
388
  output = []
@@ -364,10 +396,10 @@ class CMockGeneratorTest < Test::Unit::TestCase
364
396
 
365
397
  assert_equal(expected.join, output.join)
366
398
  end
367
-
399
+
368
400
  should "create mock destroy functions in source file when specified with strict ordering" do
369
- functions = [ { :name => "First", :args => "int Candy", :return => test_return[:int] },
370
- { :name => "Second", :args => "bool Smarty", :return => test_return[:string] }
401
+ functions = [ { :name => "First", :args => "int Candy", :return => test_return[:int] },
402
+ { :name => "Second", :args => "bool Smarty", :return => test_return[:string] }
371
403
  ]
372
404
  output = []
373
405
  expected = [ "void MockPoutPoutFish_Destroy(void)\n{\n",
@@ -380,16 +412,16 @@ class CMockGeneratorTest < Test::Unit::TestCase
380
412
  ]
381
413
  @plugins.expect.run(:mock_destroy, functions[0]).returns([])
382
414
  @plugins.expect.run(:mock_destroy, functions[1]).returns([" uno"])
383
-
415
+
384
416
  @cmock_generator_strict.create_mock_destroy_function(output, functions)
385
417
 
386
418
  assert_equal(expected.join, output.join)
387
419
  end
388
-
420
+
389
421
  should "create mock implementation functions in source file" do
390
- function = { :modifier => "static",
391
- :return => test_return[:int],
392
- :args_string => "uint32 sandwiches, const char* named",
422
+ function = { :modifier => "static",
423
+ :return => test_return[:int],
424
+ :args_string => "uint32 sandwiches, const char* named",
393
425
  :args => ["uint32 sandwiches", "const char* named"],
394
426
  :var_arg => nil,
395
427
  :name => "SupaFunction",
@@ -411,17 +443,17 @@ class CMockGeneratorTest < Test::Unit::TestCase
411
443
  ]
412
444
  @plugins.expect.run(:mock_implementation_precheck, function).returns([" uno"])
413
445
  @plugins.expect.run(:mock_implementation, function).returns([" dos"," tres"])
414
-
446
+
415
447
  @cmock_generator.create_mock_implementation(output, function)
416
-
448
+
417
449
  assert_equal(expected.join, output.join)
418
450
  end
419
-
451
+
420
452
  should "create mock implementation functions in source file with different options" do
421
- function = { :modifier => "",
453
+ function = { :modifier => "",
422
454
  :c_calling_convention => "__stdcall",
423
- :return => test_return[:int],
424
- :args_string => "uint32 sandwiches",
455
+ :return => test_return[:int],
456
+ :args_string => "uint32 sandwiches",
425
457
  :args => ["uint32 sandwiches"],
426
458
  :var_arg => "corn ...",
427
459
  :name => "SupaFunction",
@@ -443,9 +475,9 @@ class CMockGeneratorTest < Test::Unit::TestCase
443
475
  ]
444
476
  @plugins.expect.run(:mock_implementation_precheck, function).returns([" uno"])
445
477
  @plugins.expect.run(:mock_implementation, function).returns([" dos"," tres"])
446
-
478
+
447
479
  @cmock_generator.create_mock_implementation(output, function)
448
-
480
+
449
481
  assert_equal(expected.join, output.join)
450
482
  end
451
483
  end