ceedling 0.13.0.rc1 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (426) hide show
  1. data/Gemfile.lock +32 -0
  2. data/README.md +8 -8
  3. data/assets/example_file.c +5 -0
  4. data/assets/example_file.h +6 -0
  5. data/assets/project_as_gem.yml +71 -0
  6. data/assets/{project.yml → project_with_guts.yml} +2 -0
  7. data/assets/rakefile_as_gem.rb +1 -0
  8. data/assets/{rakefile.rb → rakefile_with_guts.rb} +0 -0
  9. data/assets/test_example_file.c +13 -0
  10. data/bin/ceedling +55 -31
  11. data/ceedling-0.13.0.rc4.gem +0 -0
  12. data/ceedling.gemspec +13 -12
  13. data/ceedling.sublime-project +8 -0
  14. data/ceedling.sublime-workspace +365 -0
  15. data/examples/temp_sensor/project.yml +3 -4
  16. data/lib/ceedling.rb +13 -4
  17. data/lib/ceedling/version.rb +3 -3
  18. data/lib/project_file_loader.rb +1 -1
  19. data/lib/rakefile.rb +14 -1
  20. data/lib/target_loader.rb +38 -0
  21. data/plugins/bullseye/{template.erb → assets/template.erb} +0 -0
  22. data/plugins/bullseye/{defaults.yml → config/defaults.yml} +0 -0
  23. data/plugins/bullseye/{bullseye.rb → lib/bullseye.rb} +9 -10
  24. data/spec/spec_system_helper.rb +192 -0
  25. data/spec/system/deployment_spec.rb +116 -0
  26. data/tags +977 -0
  27. data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  28. data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
  29. data/vendor/c_exception/docs/license.txt +30 -0
  30. data/vendor/c_exception/docs/readme.txt +242 -0
  31. data/vendor/c_exception/makefile +24 -0
  32. data/vendor/c_exception/rakefile.rb +41 -0
  33. data/vendor/c_exception/test/CExceptionConfig.h +44 -0
  34. data/vendor/c_exception/test/TestException.c +328 -0
  35. data/vendor/c_exception/test/TestException_Runner.c +57 -0
  36. data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +94 -0
  37. data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +39 -0
  38. data/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -0
  39. data/vendor/c_exception/vendor/unity/auto/generate_module.rb +202 -0
  40. data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +313 -0
  41. data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +23 -0
  42. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +139 -0
  43. data/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
  44. data/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
  45. data/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +217 -0
  46. data/vendor/c_exception/vendor/unity/docs/license.txt +31 -0
  47. data/vendor/c_exception/vendor/unity/examples/helper/UnityHelper.c +10 -0
  48. data/vendor/c_exception/vendor/unity/examples/helper/UnityHelper.h +12 -0
  49. data/vendor/c_exception/vendor/unity/examples/makefile +40 -0
  50. data/vendor/c_exception/vendor/unity/examples/rakefile.rb +32 -0
  51. data/vendor/c_exception/vendor/unity/examples/rakefile_helper.rb +256 -0
  52. data/vendor/c_exception/vendor/unity/examples/readme.txt +18 -0
  53. data/vendor/c_exception/vendor/unity/examples/src/ProductionCode.c +24 -0
  54. data/vendor/c_exception/vendor/unity/examples/src/ProductionCode.h +3 -0
  55. data/vendor/c_exception/vendor/unity/examples/src/ProductionCode2.c +9 -0
  56. data/vendor/c_exception/vendor/unity/examples/src/ProductionCode2.h +2 -0
  57. data/vendor/c_exception/vendor/unity/examples/test/TestProductionCode.c +62 -0
  58. data/vendor/c_exception/vendor/unity/examples/test/TestProductionCode2.c +31 -0
  59. data/vendor/c_exception/vendor/unity/examples/test/no_ruby/TestProductionCode2_Runner.c +46 -0
  60. data/vendor/c_exception/vendor/unity/examples/test/no_ruby/TestProductionCode_Runner.c +50 -0
  61. data/vendor/c_exception/vendor/unity/extras/fixture/build/MakefileWorker.mk +331 -0
  62. data/vendor/c_exception/vendor/unity/extras/fixture/build/filterGcov.sh +61 -0
  63. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +37 -0
  64. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +178 -0
  65. data/vendor/c_exception/vendor/unity/extras/fixture/readme.txt +9 -0
  66. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +381 -0
  67. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +81 -0
  68. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +44 -0
  69. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +16 -0
  70. data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +21 -0
  71. data/vendor/c_exception/vendor/unity/extras/fixture/test/testunity_fixture.c +39 -0
  72. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +321 -0
  73. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +40 -0
  74. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +56 -0
  75. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -0
  76. data/vendor/c_exception/vendor/unity/makefile +35 -0
  77. data/vendor/c_exception/vendor/unity/rakefile.rb +59 -0
  78. data/vendor/c_exception/vendor/unity/rakefile_helper.rb +240 -0
  79. data/vendor/c_exception/vendor/unity/release/build.info +2 -0
  80. data/vendor/c_exception/vendor/unity/release/version.info +2 -0
  81. data/vendor/c_exception/vendor/unity/src/unity.c +979 -0
  82. data/vendor/c_exception/vendor/unity/src/unity.h +232 -0
  83. data/vendor/c_exception/vendor/unity/src/unity_internals.h +424 -0
  84. data/vendor/c_exception/vendor/unity/targets/gcc.yml +43 -0
  85. data/vendor/c_exception/vendor/unity/targets/gcc_64.yml +44 -0
  86. data/vendor/c_exception/vendor/unity/targets/hitech_picc18.yml +101 -0
  87. data/vendor/c_exception/vendor/unity/targets/iar_arm_v4.yml +89 -0
  88. data/vendor/c_exception/vendor/unity/targets/iar_arm_v5.yml +79 -0
  89. data/vendor/c_exception/vendor/unity/targets/iar_arm_v5_3.yml +79 -0
  90. data/vendor/c_exception/vendor/unity/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -0
  91. data/vendor/c_exception/vendor/unity/targets/iar_cortexm3_v5.yml +83 -0
  92. data/vendor/c_exception/vendor/unity/targets/iar_msp430.yml +94 -0
  93. data/vendor/c_exception/vendor/unity/targets/iar_sh2a_v6.yml +85 -0
  94. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +54 -0
  95. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +50 -0
  96. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +76 -0
  97. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +72 -0
  98. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +85 -0
  99. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +85 -0
  100. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +73 -0
  101. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +85 -0
  102. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +85 -0
  103. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +86 -0
  104. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +60 -0
  105. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +63 -0
  106. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +51 -0
  107. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +60 -0
  108. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +63 -0
  109. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +64 -0
  110. data/vendor/c_exception/vendor/unity/test/test_generate_test_runner.rb +94 -0
  111. data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +51 -0
  112. data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +9 -0
  113. data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +51 -0
  114. data/vendor/c_exception/vendor/unity/test/testparameterized.c +101 -0
  115. data/vendor/c_exception/vendor/unity/test/testunity.c +2024 -0
  116. data/vendor/cmock/docs/CMock Summary.odt +0 -0
  117. data/vendor/cmock/docs/CMock Summary.pdf +0 -0
  118. data/vendor/cmock/docs/CMock_Summary.md +356 -0
  119. data/vendor/cmock/docs/license.txt +31 -0
  120. data/vendor/cmock/examples/gcc.yml +43 -0
  121. data/vendor/cmock/examples/iar_v4.yml +91 -0
  122. data/vendor/cmock/examples/iar_v5.yml +80 -0
  123. data/vendor/cmock/examples/rakefile.rb +32 -0
  124. data/vendor/cmock/examples/rakefile_helper.rb +270 -0
  125. data/vendor/cmock/examples/src/AT91SAM7X256.h +2556 -0
  126. data/vendor/cmock/examples/src/AdcConductor.c +42 -0
  127. data/vendor/cmock/examples/src/AdcConductor.h +11 -0
  128. data/vendor/cmock/examples/src/AdcHardware.c +27 -0
  129. data/vendor/cmock/examples/src/AdcHardware.h +9 -0
  130. data/vendor/cmock/examples/src/AdcHardwareConfigurator.c +18 -0
  131. data/vendor/cmock/examples/src/AdcHardwareConfigurator.h +10 -0
  132. data/vendor/cmock/examples/src/AdcModel.c +33 -0
  133. data/vendor/cmock/examples/src/AdcModel.h +13 -0
  134. data/vendor/cmock/examples/src/AdcTemperatureSensor.c +51 -0
  135. data/vendor/cmock/examples/src/AdcTemperatureSensor.h +10 -0
  136. data/vendor/cmock/examples/src/Executor.c +25 -0
  137. data/vendor/cmock/examples/src/Executor.h +9 -0
  138. data/vendor/cmock/examples/src/IntrinsicsWrapper.c +18 -0
  139. data/vendor/cmock/examples/src/IntrinsicsWrapper.h +7 -0
  140. data/vendor/cmock/examples/src/Main.c +46 -0
  141. data/vendor/cmock/examples/src/Main.h +7 -0
  142. data/vendor/cmock/examples/src/Model.c +10 -0
  143. data/vendor/cmock/examples/src/Model.h +8 -0
  144. data/vendor/cmock/examples/src/ModelConfig.h +7 -0
  145. data/vendor/cmock/examples/src/TaskScheduler.c +72 -0
  146. data/vendor/cmock/examples/src/TaskScheduler.h +11 -0
  147. data/vendor/cmock/examples/src/TemperatureCalculator.c +27 -0
  148. data/vendor/cmock/examples/src/TemperatureCalculator.h +6 -0
  149. data/vendor/cmock/examples/src/TemperatureFilter.c +39 -0
  150. data/vendor/cmock/examples/src/TemperatureFilter.h +10 -0
  151. data/vendor/cmock/examples/src/TimerConductor.c +15 -0
  152. data/vendor/cmock/examples/src/TimerConductor.h +9 -0
  153. data/vendor/cmock/examples/src/TimerConfigurator.c +51 -0
  154. data/vendor/cmock/examples/src/TimerConfigurator.h +15 -0
  155. data/vendor/cmock/examples/src/TimerHardware.c +15 -0
  156. data/vendor/cmock/examples/src/TimerHardware.h +8 -0
  157. data/vendor/cmock/examples/src/TimerInterruptConfigurator.c +55 -0
  158. data/vendor/cmock/examples/src/TimerInterruptConfigurator.h +13 -0
  159. data/vendor/cmock/examples/src/TimerInterruptHandler.c +25 -0
  160. data/vendor/cmock/examples/src/TimerInterruptHandler.h +10 -0
  161. data/vendor/cmock/examples/src/TimerModel.c +9 -0
  162. data/vendor/cmock/examples/src/TimerModel.h +8 -0
  163. data/vendor/cmock/examples/src/Types.h +103 -0
  164. data/vendor/cmock/examples/src/UsartBaudRateRegisterCalculator.c +18 -0
  165. data/vendor/cmock/examples/src/UsartBaudRateRegisterCalculator.h +6 -0
  166. data/vendor/cmock/examples/src/UsartConductor.c +21 -0
  167. data/vendor/cmock/examples/src/UsartConductor.h +7 -0
  168. data/vendor/cmock/examples/src/UsartConfigurator.c +39 -0
  169. data/vendor/cmock/examples/src/UsartConfigurator.h +13 -0
  170. data/vendor/cmock/examples/src/UsartHardware.c +22 -0
  171. data/vendor/cmock/examples/src/UsartHardware.h +9 -0
  172. data/vendor/cmock/examples/src/UsartModel.c +34 -0
  173. data/vendor/cmock/examples/src/UsartModel.h +10 -0
  174. data/vendor/cmock/examples/src/UsartPutChar.c +16 -0
  175. data/vendor/cmock/examples/src/UsartPutChar.h +8 -0
  176. data/vendor/cmock/examples/src/UsartTransmitBufferStatus.c +7 -0
  177. data/vendor/cmock/examples/src/UsartTransmitBufferStatus.h +8 -0
  178. data/vendor/cmock/examples/test/TestAdcConductor.c +121 -0
  179. data/vendor/cmock/examples/test/TestAdcHardware.c +44 -0
  180. data/vendor/cmock/examples/test/TestAdcHardwareConfigurator.c +43 -0
  181. data/vendor/cmock/examples/test/TestAdcModel.c +33 -0
  182. data/vendor/cmock/examples/test/TestAdcTemperatureSensor.c +47 -0
  183. data/vendor/cmock/examples/test/TestExecutor.c +36 -0
  184. data/vendor/cmock/examples/test/TestMain.c +24 -0
  185. data/vendor/cmock/examples/test/TestModel.c +20 -0
  186. data/vendor/cmock/examples/test/TestTaskScheduler.c +104 -0
  187. data/vendor/cmock/examples/test/TestTemperatureCalculator.c +33 -0
  188. data/vendor/cmock/examples/test/TestTemperatureFilter.c +69 -0
  189. data/vendor/cmock/examples/test/TestTimerConductor.c +32 -0
  190. data/vendor/cmock/examples/test/TestTimerConfigurator.c +112 -0
  191. data/vendor/cmock/examples/test/TestTimerHardware.c +26 -0
  192. data/vendor/cmock/examples/test/TestTimerInterruptConfigurator.c +78 -0
  193. data/vendor/cmock/examples/test/TestTimerInterruptHandler.c +66 -0
  194. data/vendor/cmock/examples/test/TestTimerModel.c +18 -0
  195. data/vendor/cmock/examples/test/TestUsartBaudRateRegisterCalculator.c +21 -0
  196. data/vendor/cmock/examples/test/TestUsartConductor.c +40 -0
  197. data/vendor/cmock/examples/test/TestUsartConfigurator.c +77 -0
  198. data/vendor/cmock/examples/test/TestUsartHardware.c +37 -0
  199. data/vendor/cmock/examples/test/TestUsartModel.c +40 -0
  200. data/vendor/cmock/examples/test/TestUsartPutChar.c +43 -0
  201. data/vendor/cmock/examples/test/TestUsartTransmitBufferStatus.c +22 -0
  202. data/vendor/cmock/iar/iar_v4/Resource/SAM7_FLASH.mac +71 -0
  203. data/vendor/cmock/iar/iar_v4/Resource/SAM7_RAM.mac +94 -0
  204. data/vendor/cmock/iar/iar_v4/Resource/SAM7_SIM.mac +67 -0
  205. data/vendor/cmock/iar/iar_v4/Resource/at91SAM7X256_FLASH.xcl +185 -0
  206. data/vendor/cmock/iar/iar_v4/Resource/at91SAM7X256_RAM.xcl +185 -0
  207. data/vendor/cmock/iar/iar_v4/Resource/ioat91sam7x256.ddf +2259 -0
  208. data/vendor/cmock/iar/iar_v4/cmock_demo.dep +3691 -0
  209. data/vendor/cmock/iar/iar_v4/cmock_demo.ewd +1696 -0
  210. data/vendor/cmock/iar/iar_v4/cmock_demo.ewp +2581 -0
  211. data/vendor/cmock/iar/iar_v4/cmock_demo.eww +10 -0
  212. data/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X-EK.h +61 -0
  213. data/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.inc +2314 -0
  214. data/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.rdf +4704 -0
  215. data/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.tcl +3407 -0
  216. data/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256_inc.h +2268 -0
  217. data/vendor/cmock/iar/iar_v4/incIAR/ioat91sam7x256.h +4380 -0
  218. data/vendor/cmock/iar/iar_v4/incIAR/lib_AT91SAM7X256.h +4211 -0
  219. data/vendor/cmock/iar/iar_v4/settings/cmock_demo.cspy.bat +32 -0
  220. data/vendor/cmock/iar/iar_v4/settings/cmock_demo.dbgdt +86 -0
  221. data/vendor/cmock/iar/iar_v4/settings/cmock_demo.dni +42 -0
  222. data/vendor/cmock/iar/iar_v4/settings/cmock_demo.wsdt +76 -0
  223. data/vendor/cmock/iar/iar_v4/srcIAR/Cstartup.s79 +266 -0
  224. data/vendor/cmock/iar/iar_v4/srcIAR/Cstartup_SAM7.c +98 -0
  225. data/vendor/cmock/iar/iar_v5/Resource/SAM7_FLASH.mac +71 -0
  226. data/vendor/cmock/iar/iar_v5/Resource/SAM7_RAM.mac +94 -0
  227. data/vendor/cmock/iar/iar_v5/Resource/SAM7_SIM.mac +67 -0
  228. data/vendor/cmock/iar/iar_v5/Resource/at91SAM7X256_FLASH.icf +43 -0
  229. data/vendor/cmock/iar/iar_v5/Resource/at91SAM7X256_RAM.icf +42 -0
  230. data/vendor/cmock/iar/iar_v5/cmock_demo.dep +4204 -0
  231. data/vendor/cmock/iar/iar_v5/cmock_demo.ewd +1906 -0
  232. data/vendor/cmock/iar/iar_v5/cmock_demo.ewp +2426 -0
  233. data/vendor/cmock/iar/iar_v5/cmock_demo.eww +26 -0
  234. data/vendor/cmock/iar/iar_v5/incIAR/AT91SAM7X-EK.h +61 -0
  235. data/vendor/cmock/iar/iar_v5/incIAR/AT91SAM7X256_inc.h +2268 -0
  236. data/vendor/cmock/iar/iar_v5/incIAR/lib_AT91SAM7X256.h +4211 -0
  237. data/vendor/cmock/iar/iar_v5/incIAR/project.h +30 -0
  238. data/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +33 -0
  239. data/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.dbgdt +5 -0
  240. data/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.dni +18 -0
  241. data/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.wsdt +74 -0
  242. data/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +12 -0
  243. data/vendor/cmock/iar/iar_v5/settings/cmock_demo.cspy.bat +33 -0
  244. data/vendor/cmock/iar/iar_v5/settings/cmock_demo.dbgdt +85 -0
  245. data/vendor/cmock/iar/iar_v5/settings/cmock_demo.dni +44 -0
  246. data/vendor/cmock/iar/iar_v5/settings/cmock_demo.wsdt +73 -0
  247. data/vendor/cmock/iar/iar_v5/settings/cmock_demo_Binary.jlink +12 -0
  248. data/vendor/cmock/iar/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +12 -0
  249. data/vendor/cmock/iar/iar_v5/settings/cmock_demo_RAM_Debug.jlink +12 -0
  250. data/vendor/cmock/iar/iar_v5/srcIAR/Cstartup.s +299 -0
  251. data/vendor/cmock/iar/iar_v5/srcIAR/Cstartup_SAM7.c +98 -0
  252. data/vendor/cmock/rakefile.rb +111 -0
  253. data/vendor/cmock/rakefile_helper.rb +381 -0
  254. data/vendor/cmock/targets/gcc.yml +53 -0
  255. data/vendor/cmock/targets/iar_arm_v4.yml +108 -0
  256. data/vendor/cmock/targets/iar_arm_v5.yml +93 -0
  257. data/vendor/cmock/test/c/TestCMockC.c +280 -0
  258. data/vendor/cmock/test/c/TestCMockC.yml +12 -0
  259. data/vendor/cmock/test/c/TestCMockCDynamic.c +186 -0
  260. data/vendor/cmock/test/c/TestCMockCDynamic.yml +12 -0
  261. data/vendor/cmock/test/c/TestCMockCDynamic_Runner.c +35 -0
  262. data/vendor/cmock/test/c/TestCMockC_Runner.c +37 -0
  263. data/vendor/cmock/test/spec/cmock_file_writer_spec.rb +25 -0
  264. data/vendor/cmock/test/spec/spec_helper.rb +12 -0
  265. data/vendor/cmock/test/system/systest_generator.rb +178 -0
  266. data/vendor/cmock/test/system/test_compilation/callingconv.h +11 -0
  267. data/vendor/cmock/test/system/test_compilation/config.yml +9 -0
  268. data/vendor/cmock/test/system/test_compilation/const.h +15 -0
  269. data/vendor/cmock/test/system/test_compilation/osek.h +275 -0
  270. data/vendor/cmock/test/system/test_compilation/parsing.h +47 -0
  271. data/vendor/cmock/test/system/test_interactions/all_plugins_but_other_limits.yml +341 -0
  272. data/vendor/cmock/test/system/test_interactions/all_plugins_coexist.yml +382 -0
  273. data/vendor/cmock/test/system/test_interactions/array_and_pointer_handling.yml +382 -0
  274. data/vendor/cmock/test/system/test_interactions/basic_expect_and_return.yml +123 -0
  275. data/vendor/cmock/test/system/test_interactions/const_primitives_handling.yml +87 -0
  276. data/vendor/cmock/test/system/test_interactions/enforce_strict_ordering.yml +247 -0
  277. data/vendor/cmock/test/system/test_interactions/expect_and_return_custom_types.yml +108 -0
  278. data/vendor/cmock/test/system/test_interactions/expect_and_return_treat_as.yml +173 -0
  279. data/vendor/cmock/test/system/test_interactions/expect_and_throw.yml +170 -0
  280. data/vendor/cmock/test/system/test_interactions/fancy_pointer_handling.yml +208 -0
  281. data/vendor/cmock/test/system/test_interactions/function_pointer_handling.yml +82 -0
  282. data/vendor/cmock/test/system/test_interactions/ignore_and_return.yml +153 -0
  283. data/vendor/cmock/test/system/test_interactions/newer_standards_stuff1.yml +52 -0
  284. data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_1.yml +91 -0
  285. data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml +59 -0
  286. data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +222 -0
  287. data/vendor/cmock/test/system/test_interactions/struct_union_enum_expect_and_return.yml +277 -0
  288. data/vendor/cmock/test/system/test_interactions/stubs_with_callbacks.yml +221 -0
  289. data/vendor/cmock/test/system/test_interactions/unity_64bit_support.yml +77 -0
  290. data/vendor/cmock/test/system/test_interactions/unity_ignores.yml +139 -0
  291. data/vendor/cmock/test/test_helper.rb +44 -0
  292. data/vendor/cmock/test/unit/cmock_config_test.rb +121 -0
  293. data/vendor/cmock/test/unit/cmock_config_test.yml +5 -0
  294. data/vendor/cmock/test/unit/cmock_file_writer_test.rb +30 -0
  295. data/vendor/cmock/test/unit/cmock_generator_main_test.rb +413 -0
  296. data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +114 -0
  297. data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +190 -0
  298. data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +94 -0
  299. data/vendor/cmock/test/unit/cmock_generator_plugin_expect_test.rb +206 -0
  300. data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +168 -0
  301. data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +291 -0
  302. data/vendor/cmock/test/unit/cmock_header_parser_test.rb +1247 -0
  303. data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +85 -0
  304. data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +223 -0
  305. data/vendor/cmock/vendor/behaviors/Manifest.txt +9 -0
  306. data/vendor/cmock/vendor/behaviors/Rakefile +19 -0
  307. data/vendor/cmock/vendor/behaviors/lib/behaviors.rb +76 -0
  308. data/vendor/cmock/vendor/behaviors/lib/behaviors/reporttask.rb +158 -0
  309. data/vendor/cmock/vendor/behaviors/test/behaviors_tasks_test.rb +73 -0
  310. data/vendor/cmock/vendor/behaviors/test/behaviors_test.rb +50 -0
  311. data/vendor/cmock/vendor/behaviors/test/tasks_test/Rakefile +19 -0
  312. data/vendor/cmock/vendor/behaviors/test/tasks_test/lib/user.rb +2 -0
  313. data/vendor/cmock/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -0
  314. data/vendor/cmock/vendor/hardmock/CHANGES +78 -0
  315. data/vendor/cmock/vendor/hardmock/LICENSE +7 -0
  316. data/vendor/cmock/vendor/hardmock/README +70 -0
  317. data/vendor/cmock/vendor/hardmock/Rakefile +8 -0
  318. data/vendor/cmock/vendor/hardmock/config/environment.rb +12 -0
  319. data/vendor/cmock/vendor/hardmock/lib/assert_error.rb +23 -0
  320. data/vendor/cmock/vendor/hardmock/lib/extend_test_unit.rb +14 -0
  321. data/vendor/cmock/vendor/hardmock/lib/hardmock.rb +86 -0
  322. data/vendor/cmock/vendor/hardmock/lib/hardmock/errors.rb +22 -0
  323. data/vendor/cmock/vendor/hardmock/lib/hardmock/expectation.rb +229 -0
  324. data/vendor/cmock/vendor/hardmock/lib/hardmock/expectation_builder.rb +9 -0
  325. data/vendor/cmock/vendor/hardmock/lib/hardmock/expector.rb +26 -0
  326. data/vendor/cmock/vendor/hardmock/lib/hardmock/method_cleanout.rb +33 -0
  327. data/vendor/cmock/vendor/hardmock/lib/hardmock/mock.rb +180 -0
  328. data/vendor/cmock/vendor/hardmock/lib/hardmock/mock_control.rb +53 -0
  329. data/vendor/cmock/vendor/hardmock/lib/hardmock/stubbing.rb +210 -0
  330. data/vendor/cmock/vendor/hardmock/lib/hardmock/trapper.rb +31 -0
  331. data/vendor/cmock/vendor/hardmock/lib/hardmock/utils.rb +9 -0
  332. data/vendor/cmock/vendor/hardmock/lib/test_unit_before_after.rb +169 -0
  333. data/vendor/cmock/vendor/hardmock/rake_tasks/rdoc.rake +19 -0
  334. data/vendor/cmock/vendor/hardmock/rake_tasks/rdoc_options.rb +4 -0
  335. data/vendor/cmock/vendor/hardmock/rake_tasks/test.rake +22 -0
  336. data/vendor/cmock/vendor/hardmock/test/functional/assert_error_test.rb +52 -0
  337. data/vendor/cmock/vendor/hardmock/test/functional/auto_verify_test.rb +178 -0
  338. data/vendor/cmock/vendor/hardmock/test/functional/direct_mock_usage_test.rb +396 -0
  339. data/vendor/cmock/vendor/hardmock/test/functional/hardmock_test.rb +434 -0
  340. data/vendor/cmock/vendor/hardmock/test/functional/stubbing_test.rb +479 -0
  341. data/vendor/cmock/vendor/hardmock/test/test_helper.rb +43 -0
  342. data/vendor/cmock/vendor/hardmock/test/unit/expectation_builder_test.rb +19 -0
  343. data/vendor/cmock/vendor/hardmock/test/unit/expectation_test.rb +372 -0
  344. data/vendor/cmock/vendor/hardmock/test/unit/expector_test.rb +57 -0
  345. data/vendor/cmock/vendor/hardmock/test/unit/method_cleanout_test.rb +36 -0
  346. data/vendor/cmock/vendor/hardmock/test/unit/mock_control_test.rb +175 -0
  347. data/vendor/cmock/vendor/hardmock/test/unit/mock_test.rb +279 -0
  348. data/vendor/cmock/vendor/hardmock/test/unit/test_unit_before_after_test.rb +452 -0
  349. data/vendor/cmock/vendor/hardmock/test/unit/trapper_test.rb +62 -0
  350. data/vendor/cmock/vendor/hardmock/test/unit/verify_error_test.rb +40 -0
  351. data/vendor/unity/auto/generate_config.yml +36 -0
  352. data/vendor/unity/auto/unity_test_summary.rb +2 -2
  353. data/vendor/unity/docs/Unity Summary.odt +0 -0
  354. data/vendor/unity/docs/Unity Summary.pdf +0 -0
  355. data/vendor/unity/docs/Unity Summary.txt +216 -0
  356. data/vendor/unity/docs/license.txt +31 -0
  357. data/vendor/unity/examples/helper/UnityHelper.c +10 -0
  358. data/vendor/unity/examples/helper/UnityHelper.h +12 -0
  359. data/vendor/unity/examples/makefile +40 -0
  360. data/vendor/unity/examples/rakefile.rb +32 -0
  361. data/vendor/unity/examples/rakefile_helper.rb +256 -0
  362. data/vendor/unity/examples/readme.txt +18 -0
  363. data/vendor/unity/examples/src/ProductionCode.c +24 -0
  364. data/vendor/unity/examples/src/ProductionCode.h +3 -0
  365. data/vendor/unity/examples/src/ProductionCode2.c +9 -0
  366. data/vendor/unity/examples/src/ProductionCode2.h +2 -0
  367. data/vendor/unity/examples/test/TestProductionCode.c +62 -0
  368. data/vendor/unity/examples/test/TestProductionCode2.c +31 -0
  369. data/vendor/unity/examples/test/no_ruby/TestProductionCode2_Runner.c +46 -0
  370. data/vendor/unity/examples/test/no_ruby/TestProductionCode_Runner.c +50 -0
  371. data/vendor/unity/extras/fixture/build/MakefileWorker.mk +331 -0
  372. data/vendor/unity/extras/fixture/build/filterGcov.sh +61 -0
  373. data/vendor/unity/extras/fixture/rakefile.rb +37 -0
  374. data/vendor/unity/extras/fixture/rakefile_helper.rb +178 -0
  375. data/vendor/unity/extras/fixture/readme.txt +9 -0
  376. data/vendor/unity/extras/fixture/src/unity_fixture.c +381 -0
  377. data/vendor/unity/extras/fixture/src/unity_fixture.h +81 -0
  378. data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +44 -0
  379. data/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +16 -0
  380. data/vendor/unity/extras/fixture/test/main/AllTests.c +21 -0
  381. data/vendor/unity/extras/fixture/test/testunity_fixture.c +39 -0
  382. data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +321 -0
  383. data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +40 -0
  384. data/vendor/unity/extras/fixture/test/unity_output_Spy.c +56 -0
  385. data/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -0
  386. data/vendor/unity/makefile +35 -0
  387. data/vendor/unity/rakefile.rb +59 -0
  388. data/vendor/unity/rakefile_helper.rb +240 -0
  389. data/vendor/unity/release/version.info +1 -1
  390. data/vendor/unity/src/unity.c +1 -1
  391. data/vendor/unity/src/unity_internals.h +5 -5
  392. data/vendor/unity/targets/gcc_32.yml +44 -0
  393. data/vendor/unity/targets/hitech_picc18.yml +101 -0
  394. data/vendor/unity/targets/iar_arm_v4.yml +89 -0
  395. data/vendor/unity/targets/iar_arm_v5.yml +79 -0
  396. data/vendor/unity/targets/iar_arm_v5_3.yml +79 -0
  397. data/vendor/unity/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -0
  398. data/vendor/unity/targets/iar_cortexm3_v5.yml +83 -0
  399. data/vendor/unity/targets/iar_msp430.yml +94 -0
  400. data/vendor/unity/targets/iar_sh2a_v6.yml +85 -0
  401. data/vendor/unity/test/expectdata/testsample_cmd.c +54 -0
  402. data/vendor/unity/test/expectdata/testsample_def.c +50 -0
  403. data/vendor/unity/test/expectdata/testsample_mock_cmd.c +76 -0
  404. data/vendor/unity/test/expectdata/testsample_mock_def.c +72 -0
  405. data/vendor/unity/test/expectdata/testsample_mock_new1.c +85 -0
  406. data/vendor/unity/test/expectdata/testsample_mock_new2.c +85 -0
  407. data/vendor/unity/test/expectdata/testsample_mock_param.c +73 -0
  408. data/vendor/unity/test/expectdata/testsample_mock_run1.c +85 -0
  409. data/vendor/unity/test/expectdata/testsample_mock_run2.c +85 -0
  410. data/vendor/unity/test/expectdata/testsample_mock_yaml.c +86 -0
  411. data/vendor/unity/test/expectdata/testsample_new1.c +60 -0
  412. data/vendor/unity/test/expectdata/testsample_new2.c +63 -0
  413. data/vendor/unity/test/expectdata/testsample_param.c +51 -0
  414. data/vendor/unity/test/expectdata/testsample_run1.c +60 -0
  415. data/vendor/unity/test/expectdata/testsample_run2.c +63 -0
  416. data/vendor/unity/test/expectdata/testsample_yaml.c +64 -0
  417. data/vendor/unity/test/test_generate_test_runner.rb +94 -0
  418. data/vendor/unity/test/testdata/mocksample.c +51 -0
  419. data/vendor/unity/test/testdata/sample.yml +9 -0
  420. data/vendor/unity/test/testdata/testsample.c +51 -0
  421. data/vendor/unity/test/testparameterized.c +101 -0
  422. data/vendor/unity/test/testunity.c +2559 -0
  423. metadata +464 -53
  424. data/.gitignore +0 -6
  425. data/.gitmodules +0 -9
  426. data/.rspec +0 -1
@@ -0,0 +1,232 @@
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
+ #ifndef UNITY_FRAMEWORK_H
8
+ #define UNITY_FRAMEWORK_H
9
+
10
+ #define UNITY
11
+
12
+ #include "unity_internals.h"
13
+
14
+ //-------------------------------------------------------
15
+ // Configuration Options
16
+ //-------------------------------------------------------
17
+
18
+ // Integers
19
+ // - Unity assumes 32 bit integers by default
20
+ // - If your compiler treats ints of a different size, define UNITY_INT_WIDTH
21
+
22
+ // Floats
23
+ // - define UNITY_EXCLUDE_FLOAT to disallow floating point comparisons
24
+ // - define UNITY_FLOAT_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_FLOAT
25
+ // - define UNITY_FLOAT_TYPE to specify doubles instead of single precision floats
26
+ // - define UNITY_FLOAT_VERBOSE to print floating point values in errors (uses sprintf)
27
+ // - define UNITY_INCLUDE_DOUBLE to allow double floating point comparisons
28
+ // - define UNITY_EXCLUDE_DOUBLE to disallow double floating point comparisons (default)
29
+ // - define UNITY_DOUBLE_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_DOUBLE
30
+ // - define UNITY_DOUBLE_TYPE to specify something other than double
31
+ // - define UNITY_DOUBLE_VERBOSE to print floating point values in errors (uses sprintf)
32
+
33
+ // Output
34
+ // - by default, Unity prints to standard out with putchar. define UNITY_OUTPUT_CHAR(a) with a different function if desired
35
+
36
+ // Optimization
37
+ // - by default, line numbers are stored in unsigned shorts. Define UNITY_LINE_TYPE with a different type if your files are huge
38
+ // - by default, test and failure counters are unsigned shorts. Define UNITY_COUNTER_TYPE with a different type if you want to save space or have more than 65535 Tests.
39
+
40
+ // Test Cases
41
+ // - define UNITY_SUPPORT_TEST_CASES to include the TEST_CASE macro, though really it's mostly about the runner generator script
42
+
43
+ // Parameterized Tests
44
+ // - you'll want to create a define of TEST_CASE(...) which basically evaluates to nothing
45
+
46
+ //-------------------------------------------------------
47
+ // Test Running Macros
48
+ //-------------------------------------------------------
49
+
50
+ #define TEST_PROTECT() (setjmp(Unity.AbortFrame) == 0)
51
+
52
+ #define TEST_ABORT() {longjmp(Unity.AbortFrame, 1);}
53
+
54
+ #ifndef RUN_TEST
55
+ #define RUN_TEST(func, line_num) UnityDefaultTestRun(func, #func, line_num)
56
+ #endif
57
+
58
+ #define TEST_LINE_NUM (Unity.CurrentTestLineNumber)
59
+ #define TEST_IS_IGNORED (Unity.CurrentTestIgnored)
60
+
61
+ //-------------------------------------------------------
62
+ // Basic Fail and Ignore
63
+ //-------------------------------------------------------
64
+
65
+ #define TEST_FAIL_MESSAGE(message) UNITY_TEST_FAIL(__LINE__, message)
66
+ #define TEST_FAIL() UNITY_TEST_FAIL(__LINE__, NULL)
67
+ #define TEST_IGNORE_MESSAGE(message) UNITY_TEST_IGNORE(__LINE__, message)
68
+ #define TEST_IGNORE() UNITY_TEST_IGNORE(__LINE__, NULL)
69
+ #define TEST_ONLY()
70
+
71
+ //-------------------------------------------------------
72
+ // Test Asserts (simple)
73
+ //-------------------------------------------------------
74
+
75
+ //Boolean
76
+ #define TEST_ASSERT(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expression Evaluated To FALSE")
77
+ #define TEST_ASSERT_TRUE(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expected TRUE Was FALSE")
78
+ #define TEST_ASSERT_UNLESS(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expression Evaluated To TRUE")
79
+ #define TEST_ASSERT_FALSE(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expected FALSE Was TRUE")
80
+ #define TEST_ASSERT_NULL(pointer) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, " Expected NULL")
81
+ #define TEST_ASSERT_NOT_NULL(pointer) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, " Expected Non-NULL")
82
+
83
+ //Integers (of all sizes)
84
+ #define TEST_ASSERT_EQUAL_INT(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
85
+ #define TEST_ASSERT_EQUAL_INT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, NULL)
86
+ #define TEST_ASSERT_EQUAL_INT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, NULL)
87
+ #define TEST_ASSERT_EQUAL_INT32(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, NULL)
88
+ #define TEST_ASSERT_EQUAL_INT64(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, NULL)
89
+ #define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
90
+ #define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, " Expected Not-Equal")
91
+ #define TEST_ASSERT_EQUAL_UINT(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, NULL)
92
+ #define TEST_ASSERT_EQUAL_UINT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT8( (expected), (actual), __LINE__, NULL)
93
+ #define TEST_ASSERT_EQUAL_UINT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT16( (expected), (actual), __LINE__, NULL)
94
+ #define TEST_ASSERT_EQUAL_UINT32(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT32( (expected), (actual), __LINE__, NULL)
95
+ #define TEST_ASSERT_EQUAL_UINT64(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT64( (expected), (actual), __LINE__, NULL)
96
+ #define TEST_ASSERT_EQUAL_HEX(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
97
+ #define TEST_ASSERT_EQUAL_HEX8(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX8( (expected), (actual), __LINE__, NULL)
98
+ #define TEST_ASSERT_EQUAL_HEX16(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, NULL)
99
+ #define TEST_ASSERT_EQUAL_HEX32(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
100
+ #define TEST_ASSERT_EQUAL_HEX64(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, NULL)
101
+ #define TEST_ASSERT_BITS(mask, expected, actual) UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, NULL)
102
+ #define TEST_ASSERT_BITS_HIGH(mask, actual) UNITY_TEST_ASSERT_BITS((mask), (_UU32)(-1), (actual), __LINE__, NULL)
103
+ #define TEST_ASSERT_BITS_LOW(mask, actual) UNITY_TEST_ASSERT_BITS((mask), (_UU32)(0), (actual), __LINE__, NULL)
104
+ #define TEST_ASSERT_BIT_HIGH(bit, actual) UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(-1), (actual), __LINE__, NULL)
105
+ #define TEST_ASSERT_BIT_LOW(bit, actual) UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(0), (actual), __LINE__, NULL)
106
+
107
+ //Integer Ranges (of all sizes)
108
+ #define TEST_ASSERT_INT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, __LINE__, NULL)
109
+ #define TEST_ASSERT_UINT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, __LINE__, NULL)
110
+ #define TEST_ASSERT_HEX_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, NULL)
111
+ #define TEST_ASSERT_HEX8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, __LINE__, NULL)
112
+ #define TEST_ASSERT_HEX16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, __LINE__, NULL)
113
+ #define TEST_ASSERT_HEX32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, NULL)
114
+ #define TEST_ASSERT_HEX64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, __LINE__, NULL)
115
+
116
+ //Structs and Strings
117
+ #define TEST_ASSERT_EQUAL_PTR(expected, actual) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, NULL)
118
+ #define TEST_ASSERT_EQUAL_STRING(expected, actual) UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, __LINE__, NULL)
119
+ #define TEST_ASSERT_EQUAL_MEMORY(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, __LINE__, NULL)
120
+
121
+ //Arrays
122
+ #define TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, __LINE__, NULL)
123
+ #define TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, __LINE__, NULL)
124
+ #define TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, __LINE__, NULL)
125
+ #define TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
126
+ #define TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, __LINE__, NULL)
127
+ #define TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, __LINE__, NULL)
128
+ #define TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, __LINE__, NULL)
129
+ #define TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, __LINE__, NULL)
130
+ #define TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
131
+ #define TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, __LINE__, NULL)
132
+ #define TEST_ASSERT_EQUAL_HEX_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
133
+ #define TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, __LINE__, NULL)
134
+ #define TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, __LINE__, NULL)
135
+ #define TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
136
+ #define TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, __LINE__, NULL)
137
+ #define TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, __LINE__, NULL)
138
+ #define TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, __LINE__, NULL)
139
+ #define TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, __LINE__, NULL)
140
+
141
+ //Floating Point (If Enabled)
142
+ #define TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, __LINE__, NULL)
143
+ #define TEST_ASSERT_EQUAL_FLOAT(expected, actual) UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, __LINE__, NULL)
144
+ #define TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, __LINE__, NULL)
145
+
146
+ //Double (If Enabled)
147
+ #define TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, __LINE__, NULL)
148
+ #define TEST_ASSERT_EQUAL_DOUBLE(expected, actual) UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, __LINE__, NULL)
149
+ #define TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, __LINE__, NULL)
150
+
151
+
152
+ //-------------------------------------------------------
153
+ // Test Asserts (with additional messages)
154
+ //-------------------------------------------------------
155
+
156
+ //Boolean
157
+ #define TEST_ASSERT_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, message)
158
+ #define TEST_ASSERT_TRUE_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, message)
159
+ #define TEST_ASSERT_UNLESS_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, message)
160
+ #define TEST_ASSERT_FALSE_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, message)
161
+ #define TEST_ASSERT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, message)
162
+ #define TEST_ASSERT_NOT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, message)
163
+
164
+ //Integers (of all sizes)
165
+ #define TEST_ASSERT_EQUAL_INT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, message)
166
+ #define TEST_ASSERT_EQUAL_INT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, message)
167
+ #define TEST_ASSERT_EQUAL_INT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, message)
168
+ #define TEST_ASSERT_EQUAL_INT32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, message)
169
+ #define TEST_ASSERT_EQUAL_INT64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, message)
170
+ #define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, message)
171
+ #define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, message)
172
+ #define TEST_ASSERT_EQUAL_UINT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, message)
173
+ #define TEST_ASSERT_EQUAL_UINT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT8( (expected), (actual), __LINE__, message)
174
+ #define TEST_ASSERT_EQUAL_UINT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT16( (expected), (actual), __LINE__, message)
175
+ #define TEST_ASSERT_EQUAL_UINT32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT32( (expected), (actual), __LINE__, message)
176
+ #define TEST_ASSERT_EQUAL_UINT64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT64( (expected), (actual), __LINE__, message)
177
+ #define TEST_ASSERT_EQUAL_HEX_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, message)
178
+ #define TEST_ASSERT_EQUAL_HEX8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX8( (expected), (actual), __LINE__, message)
179
+ #define TEST_ASSERT_EQUAL_HEX16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, message)
180
+ #define TEST_ASSERT_EQUAL_HEX32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, message)
181
+ #define TEST_ASSERT_EQUAL_HEX64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, message)
182
+ #define TEST_ASSERT_BITS_MESSAGE(mask, expected, actual, message) UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, message)
183
+ #define TEST_ASSERT_BITS_HIGH_MESSAGE(mask, actual, message) UNITY_TEST_ASSERT_BITS((mask), (_UU32)(-1), (actual), __LINE__, message)
184
+ #define TEST_ASSERT_BITS_LOW_MESSAGE(mask, actual, message) UNITY_TEST_ASSERT_BITS((mask), (_UU32)(0), (actual), __LINE__, message)
185
+ #define TEST_ASSERT_BIT_HIGH_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(-1), (actual), __LINE__, message)
186
+ #define TEST_ASSERT_BIT_LOW_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(0), (actual), __LINE__, message)
187
+
188
+ //Integer Ranges (of all sizes)
189
+ #define TEST_ASSERT_INT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, __LINE__, message)
190
+ #define TEST_ASSERT_UINT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, __LINE__, message)
191
+ #define TEST_ASSERT_HEX_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, message)
192
+ #define TEST_ASSERT_HEX8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, __LINE__, message)
193
+ #define TEST_ASSERT_HEX16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, __LINE__, message)
194
+ #define TEST_ASSERT_HEX32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, message)
195
+ #define TEST_ASSERT_HEX64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, __LINE__, message)
196
+
197
+ //Structs and Strings
198
+ #define TEST_ASSERT_EQUAL_PTR_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, __LINE__, message)
199
+ #define TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, __LINE__, message)
200
+ #define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, __LINE__, message)
201
+
202
+ //Arrays
203
+ #define TEST_ASSERT_EQUAL_INT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, __LINE__, message)
204
+ #define TEST_ASSERT_EQUAL_INT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, __LINE__, message)
205
+ #define TEST_ASSERT_EQUAL_INT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, __LINE__, message)
206
+ #define TEST_ASSERT_EQUAL_INT32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, __LINE__, message)
207
+ #define TEST_ASSERT_EQUAL_INT64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, __LINE__, message)
208
+ #define TEST_ASSERT_EQUAL_UINT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, __LINE__, message)
209
+ #define TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, __LINE__, message)
210
+ #define TEST_ASSERT_EQUAL_UINT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, __LINE__, message)
211
+ #define TEST_ASSERT_EQUAL_UINT32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, __LINE__, message)
212
+ #define TEST_ASSERT_EQUAL_UINT64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, __LINE__, message)
213
+ #define TEST_ASSERT_EQUAL_HEX_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, message)
214
+ #define TEST_ASSERT_EQUAL_HEX8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, __LINE__, message)
215
+ #define TEST_ASSERT_EQUAL_HEX16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, __LINE__, message)
216
+ #define TEST_ASSERT_EQUAL_HEX32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, message)
217
+ #define TEST_ASSERT_EQUAL_HEX64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, __LINE__, message)
218
+ #define TEST_ASSERT_EQUAL_PTR_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, __LINE__, message)
219
+ #define TEST_ASSERT_EQUAL_STRING_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, __LINE__, message)
220
+ #define TEST_ASSERT_EQUAL_MEMORY_ARRAY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, __LINE__, message)
221
+
222
+ //Floating Point (If Enabled)
223
+ #define TEST_ASSERT_FLOAT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, __LINE__, message)
224
+ #define TEST_ASSERT_EQUAL_FLOAT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, __LINE__, message)
225
+ #define TEST_ASSERT_EQUAL_FLOAT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, __LINE__, message)
226
+
227
+ //Double (If Enabled)
228
+ #define TEST_ASSERT_DOUBLE_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, __LINE__, message)
229
+ #define TEST_ASSERT_EQUAL_DOUBLE_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, __LINE__, message)
230
+ #define TEST_ASSERT_EQUAL_DOUBLE_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, __LINE__, message)
231
+
232
+ #endif
@@ -0,0 +1,424 @@
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
+ #ifndef UNITY_INTERNALS_H
8
+ #define UNITY_INTERNALS_H
9
+
10
+ #include <stdio.h>
11
+ #include <setjmp.h>
12
+
13
+ //-------------------------------------------------------
14
+ // Int Support
15
+ //-------------------------------------------------------
16
+
17
+ #ifndef UNITY_INT_WIDTH
18
+ #define UNITY_INT_WIDTH (32)
19
+ #endif
20
+
21
+ #ifndef UNITY_LONG_WIDTH
22
+ #define UNITY_LONG_WIDTH (32)
23
+ #endif
24
+
25
+ #if (UNITY_INT_WIDTH == 32)
26
+ typedef unsigned char _UU8;
27
+ typedef unsigned short _UU16;
28
+ typedef unsigned int _UU32;
29
+ typedef signed char _US8;
30
+ typedef signed short _US16;
31
+ typedef signed int _US32;
32
+ #elif (UNITY_INT_WIDTH == 16)
33
+ typedef unsigned char _UU8;
34
+ typedef unsigned int _UU16;
35
+ typedef unsigned long _UU32;
36
+ typedef signed char _US8;
37
+ typedef signed int _US16;
38
+ typedef signed long _US32;
39
+ #else
40
+ #error Invalid UNITY_INT_WIDTH specified! (16 or 32 are supported)
41
+ #endif
42
+
43
+ //-------------------------------------------------------
44
+ // 64-bit Support
45
+ //-------------------------------------------------------
46
+
47
+ #ifndef UNITY_SUPPORT_64
48
+
49
+ //No 64-bit Support
50
+ typedef _UU32 _U_UINT;
51
+ typedef _US32 _U_SINT;
52
+
53
+ #else
54
+
55
+ //64-bit Support
56
+ #if (UNITY_LONG_WIDTH == 32)
57
+ typedef unsigned long long _UU64;
58
+ typedef signed long long _US64;
59
+ #elif (UNITY_LONG_WIDTH == 64)
60
+ typedef unsigned long _UU64;
61
+ typedef signed long _US64;
62
+ #else
63
+ #error Invalid UNITY_LONG_WIDTH specified! (32 or 64 are supported)
64
+ #endif
65
+ typedef _UU64 _U_UINT;
66
+ typedef _US64 _U_SINT;
67
+
68
+ #endif
69
+
70
+ //-------------------------------------------------------
71
+ // Pointer Support
72
+ //-------------------------------------------------------
73
+
74
+ #ifndef UNITY_POINTER_WIDTH
75
+ #define UNITY_POINTER_WIDTH (32)
76
+ #endif
77
+
78
+ #if (UNITY_POINTER_WIDTH == 32)
79
+ typedef _UU32 _UP;
80
+ #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX32
81
+ #elif (UNITY_POINTER_WIDTH == 64)
82
+ #ifndef UNITY_SUPPORT_64
83
+ #error "You've Specified 64-bit pointers without enabling 64-bit Support. Define UNITY_SUPPORT_64"
84
+ #endif
85
+ typedef _UU64 _UP;
86
+ #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX64
87
+ #elif (UNITY_POINTER_WIDTH == 16)
88
+ typedef _UU16 _UP;
89
+ #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX16
90
+ #else
91
+ #error Invalid UNITY_POINTER_WIDTH specified! (16, 32 or 64 are supported)
92
+ #endif
93
+
94
+ //-------------------------------------------------------
95
+ // Float Support
96
+ //-------------------------------------------------------
97
+
98
+ #ifdef UNITY_EXCLUDE_FLOAT
99
+
100
+ //No Floating Point Support
101
+ #undef UNITY_FLOAT_PRECISION
102
+ #undef UNITY_FLOAT_TYPE
103
+ #undef UNITY_FLOAT_VERBOSE
104
+
105
+ #else
106
+
107
+ //Floating Point Support
108
+ #ifndef UNITY_FLOAT_PRECISION
109
+ #define UNITY_FLOAT_PRECISION (0.00001f)
110
+ #endif
111
+ #ifndef UNITY_FLOAT_TYPE
112
+ #define UNITY_FLOAT_TYPE float
113
+ #endif
114
+ typedef UNITY_FLOAT_TYPE _UF;
115
+
116
+ #endif
117
+
118
+ //-------------------------------------------------------
119
+ // Double Float Support
120
+ //-------------------------------------------------------
121
+
122
+ //unlike FLOAT, we DON'T include by default
123
+ #ifndef UNITY_EXCLUDE_DOUBLE
124
+ #ifndef UNITY_INCLUDE_DOUBLE
125
+ #define UNITY_EXCLUDE_DOUBLE
126
+ #endif
127
+ #endif
128
+
129
+ #ifdef UNITY_EXCLUDE_DOUBLE
130
+
131
+ //No Floating Point Support
132
+ #undef UNITY_DOUBLE_PRECISION
133
+ #undef UNITY_DOUBLE_TYPE
134
+ #undef UNITY_DOUBLE_VERBOSE
135
+
136
+ #else
137
+
138
+ //Floating Point Support
139
+ #ifndef UNITY_DOUBLE_PRECISION
140
+ #define UNITY_DOUBLE_PRECISION (1e-12f)
141
+ #endif
142
+ #ifndef UNITY_DOUBLE_TYPE
143
+ #define UNITY_DOUBLE_TYPE double
144
+ #endif
145
+ typedef UNITY_DOUBLE_TYPE _UD;
146
+
147
+ #endif
148
+
149
+ //-------------------------------------------------------
150
+ // Output Method
151
+ //-------------------------------------------------------
152
+
153
+ #ifndef UNITY_OUTPUT_CHAR
154
+ //Default to using putchar, which is defined in stdio.h above
155
+ #define UNITY_OUTPUT_CHAR(a) putchar(a)
156
+ #else
157
+ //If defined as something else, make sure we declare it here so it's ready for use
158
+ extern int UNITY_OUTPUT_CHAR(int);
159
+ #endif
160
+
161
+ //-------------------------------------------------------
162
+ // Footprint
163
+ //-------------------------------------------------------
164
+
165
+ #ifndef UNITY_LINE_TYPE
166
+ #define UNITY_LINE_TYPE _U_UINT
167
+ #endif
168
+
169
+ #ifndef UNITY_COUNTER_TYPE
170
+ #define UNITY_COUNTER_TYPE _U_UINT
171
+ #endif
172
+
173
+ //-------------------------------------------------------
174
+ // Internal Structs Needed
175
+ //-------------------------------------------------------
176
+
177
+ typedef void (*UnityTestFunction)(void);
178
+
179
+ #define UNITY_DISPLAY_RANGE_INT (0x10)
180
+ #define UNITY_DISPLAY_RANGE_UINT (0x20)
181
+ #define UNITY_DISPLAY_RANGE_HEX (0x40)
182
+ #define UNITY_DISPLAY_RANGE_AUTO (0x80)
183
+
184
+ typedef enum
185
+ {
186
+ #if (UNITY_INT_WIDTH == 16)
187
+ UNITY_DISPLAY_STYLE_INT = 2 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
188
+ #elif (UNITY_INT_WIDTH == 32)
189
+ UNITY_DISPLAY_STYLE_INT = 4 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
190
+ #endif
191
+ UNITY_DISPLAY_STYLE_INT8 = 1 + UNITY_DISPLAY_RANGE_INT,
192
+ UNITY_DISPLAY_STYLE_INT16 = 2 + UNITY_DISPLAY_RANGE_INT,
193
+ UNITY_DISPLAY_STYLE_INT32 = 4 + UNITY_DISPLAY_RANGE_INT,
194
+ #ifdef UNITY_SUPPORT_64
195
+ UNITY_DISPLAY_STYLE_INT64 = 8 + UNITY_DISPLAY_RANGE_INT,
196
+ #endif
197
+
198
+ #if (UNITY_INT_WIDTH == 16)
199
+ UNITY_DISPLAY_STYLE_UINT = 4 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
200
+ #elif (UNITY_INT_WIDTH == 32)
201
+ UNITY_DISPLAY_STYLE_UINT = 2 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
202
+ #endif
203
+ UNITY_DISPLAY_STYLE_UINT8 = 1 + UNITY_DISPLAY_RANGE_UINT,
204
+ UNITY_DISPLAY_STYLE_UINT16 = 2 + UNITY_DISPLAY_RANGE_UINT,
205
+ UNITY_DISPLAY_STYLE_UINT32 = 4 + UNITY_DISPLAY_RANGE_UINT,
206
+ #ifdef UNITY_SUPPORT_64
207
+ UNITY_DISPLAY_STYLE_UINT64 = 8 + UNITY_DISPLAY_RANGE_UINT,
208
+ #endif
209
+ UNITY_DISPLAY_STYLE_HEX8 = 1 + UNITY_DISPLAY_RANGE_HEX,
210
+ UNITY_DISPLAY_STYLE_HEX16 = 2 + UNITY_DISPLAY_RANGE_HEX,
211
+ UNITY_DISPLAY_STYLE_HEX32 = 4 + UNITY_DISPLAY_RANGE_HEX,
212
+ #ifdef UNITY_SUPPORT_64
213
+ UNITY_DISPLAY_STYLE_HEX64 = 8 + UNITY_DISPLAY_RANGE_HEX,
214
+ #endif
215
+ UNITY_DISPLAY_STYLE_UNKNOWN
216
+ } UNITY_DISPLAY_STYLE_T;
217
+
218
+ struct _Unity
219
+ {
220
+ const char* TestFile;
221
+ const char* CurrentTestName;
222
+ UNITY_LINE_TYPE CurrentTestLineNumber;
223
+ UNITY_COUNTER_TYPE NumberOfTests;
224
+ UNITY_COUNTER_TYPE TestFailures;
225
+ UNITY_COUNTER_TYPE TestIgnores;
226
+ UNITY_COUNTER_TYPE CurrentTestFailed;
227
+ UNITY_COUNTER_TYPE CurrentTestIgnored;
228
+ jmp_buf AbortFrame;
229
+ };
230
+
231
+ extern struct _Unity Unity;
232
+
233
+ //-------------------------------------------------------
234
+ // Test Suite Management
235
+ //-------------------------------------------------------
236
+
237
+ void UnityBegin(void);
238
+ int UnityEnd(void);
239
+ void UnityConcludeTest(void);
240
+ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum);
241
+
242
+ //-------------------------------------------------------
243
+ // Test Output
244
+ //-------------------------------------------------------
245
+
246
+ void UnityPrint(const char* string);
247
+ void UnityPrintMask(const _U_UINT mask, const _U_UINT number);
248
+ void UnityPrintNumberByStyle(const _U_SINT number, const UNITY_DISPLAY_STYLE_T style);
249
+ void UnityPrintNumber(const _U_SINT number);
250
+ void UnityPrintNumberUnsigned(const _U_UINT number);
251
+ void UnityPrintNumberHex(const _U_UINT number, const char nibbles);
252
+
253
+ #ifdef UNITY_FLOAT_VERBOSE
254
+ void UnityPrintFloat(const _UF number);
255
+ #endif
256
+
257
+ //-------------------------------------------------------
258
+ // Test Assertion Fuctions
259
+ //-------------------------------------------------------
260
+ // Use the macros below this section instead of calling
261
+ // these directly. The macros have a consistent naming
262
+ // convention and will pull in file and line information
263
+ // for you.
264
+
265
+ void UnityAssertEqualNumber(const _U_SINT expected,
266
+ const _U_SINT actual,
267
+ const char* msg,
268
+ const UNITY_LINE_TYPE lineNumber,
269
+ const UNITY_DISPLAY_STYLE_T style);
270
+
271
+ void UnityAssertEqualIntArray(const _U_SINT* expected,
272
+ const _U_SINT* actual,
273
+ const _UU32 num_elements,
274
+ const char* msg,
275
+ const UNITY_LINE_TYPE lineNumber,
276
+ const UNITY_DISPLAY_STYLE_T style);
277
+
278
+ void UnityAssertBits(const _U_SINT mask,
279
+ const _U_SINT expected,
280
+ const _U_SINT actual,
281
+ const char* msg,
282
+ const UNITY_LINE_TYPE lineNumber);
283
+
284
+ void UnityAssertEqualString(const char* expected,
285
+ const char* actual,
286
+ const char* msg,
287
+ const UNITY_LINE_TYPE lineNumber);
288
+
289
+ void UnityAssertEqualStringArray( const char** expected,
290
+ const char** actual,
291
+ const _UU32 num_elements,
292
+ const char* msg,
293
+ const UNITY_LINE_TYPE lineNumber);
294
+
295
+ void UnityAssertEqualMemory( const void* expected,
296
+ const void* actual,
297
+ const _UU32 length,
298
+ const _UU32 num_elements,
299
+ const char* msg,
300
+ const UNITY_LINE_TYPE lineNumber);
301
+
302
+ void UnityAssertNumbersWithin(const _U_SINT delta,
303
+ const _U_SINT expected,
304
+ const _U_SINT actual,
305
+ const char* msg,
306
+ const UNITY_LINE_TYPE lineNumber,
307
+ const UNITY_DISPLAY_STYLE_T style);
308
+
309
+ void UnityFail(const char* message, const UNITY_LINE_TYPE line);
310
+
311
+ void UnityIgnore(const char* message, const UNITY_LINE_TYPE line);
312
+
313
+ #ifndef UNITY_EXCLUDE_FLOAT
314
+ void UnityAssertFloatsWithin(const _UF delta,
315
+ const _UF expected,
316
+ const _UF actual,
317
+ const char* msg,
318
+ const UNITY_LINE_TYPE lineNumber);
319
+
320
+ void UnityAssertEqualFloatArray(const _UF* expected,
321
+ const _UF* actual,
322
+ const _UU32 num_elements,
323
+ const char* msg,
324
+ const UNITY_LINE_TYPE lineNumber);
325
+ #endif
326
+
327
+ #ifndef UNITY_EXCLUDE_DOUBLE
328
+ void UnityAssertDoublesWithin(const _UD delta,
329
+ const _UD expected,
330
+ const _UD actual,
331
+ const char* msg,
332
+ const UNITY_LINE_TYPE lineNumber);
333
+
334
+ void UnityAssertEqualDoubleArray(const _UD* expected,
335
+ const _UD* actual,
336
+ const _UU32 num_elements,
337
+ const char* msg,
338
+ const UNITY_LINE_TYPE lineNumber);
339
+ #endif
340
+
341
+ //-------------------------------------------------------
342
+ // Basic Fail and Ignore
343
+ //-------------------------------------------------------
344
+
345
+ #define UNITY_TEST_FAIL(line, message) UnityFail( (message), (UNITY_LINE_TYPE)line);
346
+ #define UNITY_TEST_IGNORE(line, message) UnityIgnore( (message), (UNITY_LINE_TYPE)line);
347
+
348
+ //-------------------------------------------------------
349
+ // Test Asserts
350
+ //-------------------------------------------------------
351
+
352
+ #define UNITY_TEST_ASSERT(condition, line, message) if (condition) {} else {UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, message);}
353
+ #define UNITY_TEST_ASSERT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) == NULL), (UNITY_LINE_TYPE)line, message)
354
+ #define UNITY_TEST_ASSERT_NOT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) != NULL), (UNITY_LINE_TYPE)line, message)
355
+
356
+ #define UNITY_TEST_ASSERT_EQUAL_INT(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
357
+ #define UNITY_TEST_ASSERT_EQUAL_INT8(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US8 )(expected), (_U_SINT)(_US8 )(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
358
+ #define UNITY_TEST_ASSERT_EQUAL_INT16(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US16)(expected), (_U_SINT)(_US16)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
359
+ #define UNITY_TEST_ASSERT_EQUAL_INT32(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US32)(expected), (_U_SINT)(_US32)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
360
+ #define UNITY_TEST_ASSERT_EQUAL_UINT(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
361
+ #define UNITY_TEST_ASSERT_EQUAL_UINT8(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US8 )(expected), (_U_SINT)(_US8 )(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
362
+ #define UNITY_TEST_ASSERT_EQUAL_UINT16(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US16)(expected), (_U_SINT)(_US16)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
363
+ #define UNITY_TEST_ASSERT_EQUAL_UINT32(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US32)(expected), (_U_SINT)(_US32)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
364
+ #define UNITY_TEST_ASSERT_EQUAL_HEX8(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US8 )(expected), (_U_SINT)(_US8 )(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX8)
365
+ #define UNITY_TEST_ASSERT_EQUAL_HEX16(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US16)(expected), (_U_SINT)(_US16)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX16)
366
+ #define UNITY_TEST_ASSERT_EQUAL_HEX32(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US32)(expected), (_U_SINT)(_US32)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX32)
367
+ #define UNITY_TEST_ASSERT_BITS(mask, expected, actual, line, message) UnityAssertBits((_U_SINT)(mask), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line)
368
+
369
+ #define UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(delta), (_U_SINT)(expected), (_U_SINT)(actual), NULL, (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
370
+ #define UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(delta), (_U_SINT)(expected), (_U_SINT)(actual), NULL, (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
371
+ #define UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(_U_UINT)(_UU8 )(delta), (_U_SINT)(_U_UINT)(_UU8 )(expected), (_U_SINT)(_U_UINT)(_UU8 )(actual), NULL, (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX8)
372
+ #define UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(_U_UINT)(_UU16)(delta), (_U_SINT)(_U_UINT)(_UU16)(expected), (_U_SINT)(_U_UINT)(_UU16)(actual), NULL, (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX16)
373
+ #define UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(_U_UINT)(_UU32)(delta), (_U_SINT)(_U_UINT)(_UU32)(expected), (_U_SINT)(_U_UINT)(_UU32)(actual), NULL, (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX32)
374
+
375
+ #define UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_UP)(expected), (_U_SINT)(_UP)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_POINTER)
376
+ #define UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, line, message) UnityAssertEqualString((const char*)(expected), (const char*)(actual), (message), (UNITY_LINE_TYPE)line)
377
+ #define UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, line, message) UnityAssertEqualMemory((void*)(expected), (void*)(actual), (_UU32)(len), 1, (message), (UNITY_LINE_TYPE)line)
378
+
379
+ #define UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
380
+ #define UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT8)
381
+ #define UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT16)
382
+ #define UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT32)
383
+ #define UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
384
+ #define UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT8)
385
+ #define UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT16)
386
+ #define UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT32)
387
+ #define UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX8)
388
+ #define UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX16)
389
+ #define UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX32)
390
+ #define UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(_UP*)(expected), (const _U_SINT*)(_UP*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_POINTER)
391
+ #define UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualStringArray((const char**)(expected), (const char**)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line)
392
+ #define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((void*)(expected), (void*)(actual), (_UU32)(len), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line)
393
+
394
+ #ifdef UNITY_SUPPORT_64
395
+ #define UNITY_TEST_ASSERT_EQUAL_INT64(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT64)
396
+ #define UNITY_TEST_ASSERT_EQUAL_UINT64(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT64)
397
+ #define UNITY_TEST_ASSERT_EQUAL_HEX64(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX64)
398
+ #define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT64)
399
+ #define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT64)
400
+ #define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX64)
401
+ #define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(delta), (_U_SINT)(expected), (_U_SINT)(actual), NULL, (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX64)
402
+ #endif
403
+
404
+ #ifdef UNITY_EXCLUDE_FLOAT
405
+ #define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Floating Point Disabled")
406
+ #define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Floating Point Disabled")
407
+ #define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Floating Point Disabled")
408
+ #else
409
+ #define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UnityAssertFloatsWithin((_UF)(delta), (_UF)(expected), (_UF)(actual), (message), (UNITY_LINE_TYPE)line)
410
+ #define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_ASSERT_FLOAT_WITHIN((_UF)(expected) * (_UF)UNITY_FLOAT_PRECISION, (_UF)expected, (_UF)actual, (UNITY_LINE_TYPE)line, message)
411
+ #define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualFloatArray((_UF*)(expected), (_UF*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line)
412
+ #endif
413
+
414
+ #ifdef UNITY_EXCLUDE_DOUBLE
415
+ #define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Double Precision Disabled")
416
+ #define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Double Precision Disabled")
417
+ #define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Double Precision Disabled")
418
+ #else
419
+ #define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UnityAssertDoublesWithin((_UD)(delta), (_UD)(expected), (_UD)(actual), (message), (UNITY_LINE_TYPE)line)
420
+ #define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((_UF)(expected) * (_UD)UNITY_DOUBLE_PRECISION, (_UD)expected, (_UD)actual, (UNITY_LINE_TYPE)line, message)
421
+ #define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualDoubleArray((_UD*)(expected), (_UD*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line)
422
+ #endif
423
+
424
+ #endif