ceedling 0.19.0 → 0.20.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (426) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +10 -10
  3. data/bin/ceedling +205 -92
  4. data/ceedling-0.19.0.gem +0 -0
  5. data/config/test_environment.rb +12 -12
  6. data/docs/CeedlingPacket.md +866 -853
  7. data/docs/CeedlingPacket.odt +0 -0
  8. data/docs/CeedlingPacket.pdf +0 -0
  9. data/examples/temp_sensor/rakefile.rb +4 -4
  10. data/examples/temp_sensor/src/AdcConductor.c +42 -42
  11. data/examples/temp_sensor/src/AdcConductor.h +13 -13
  12. data/examples/temp_sensor/src/AdcHardware.c +27 -27
  13. data/examples/temp_sensor/src/AdcHardware.h +11 -11
  14. data/examples/temp_sensor/src/AdcHardwareConfigurator.c +18 -18
  15. data/examples/temp_sensor/src/AdcHardwareConfigurator.h +10 -10
  16. data/examples/temp_sensor/src/AdcModel.c +33 -33
  17. data/examples/temp_sensor/src/AdcModel.h +13 -13
  18. data/examples/temp_sensor/src/AdcTemperatureSensor.c +51 -51
  19. data/examples/temp_sensor/src/AdcTemperatureSensor.h +10 -10
  20. data/examples/temp_sensor/src/Executor.c +25 -25
  21. data/examples/temp_sensor/src/Executor.h +9 -9
  22. data/examples/temp_sensor/src/IntrinsicsWrapper.c +18 -18
  23. data/examples/temp_sensor/src/IntrinsicsWrapper.h +7 -7
  24. data/examples/temp_sensor/src/Main.c +46 -46
  25. data/examples/temp_sensor/src/Main.h +7 -7
  26. data/examples/temp_sensor/src/Model.c +10 -10
  27. data/examples/temp_sensor/src/Model.h +8 -8
  28. data/examples/temp_sensor/src/ModelConfig.h +7 -7
  29. data/examples/temp_sensor/src/TaskScheduler.c +72 -72
  30. data/examples/temp_sensor/src/TaskScheduler.h +11 -11
  31. data/examples/temp_sensor/src/TemperatureCalculator.c +27 -27
  32. data/examples/temp_sensor/src/TemperatureCalculator.h +8 -8
  33. data/examples/temp_sensor/src/TemperatureFilter.c +38 -38
  34. data/examples/temp_sensor/src/TemperatureFilter.h +10 -10
  35. data/examples/temp_sensor/src/TimerConductor.c +15 -15
  36. data/examples/temp_sensor/src/TimerConductor.h +9 -9
  37. data/examples/temp_sensor/src/TimerConfigurator.c +51 -51
  38. data/examples/temp_sensor/src/TimerConfigurator.h +15 -15
  39. data/examples/temp_sensor/src/TimerHardware.c +15 -15
  40. data/examples/temp_sensor/src/TimerHardware.h +8 -8
  41. data/examples/temp_sensor/src/TimerInterruptConfigurator.c +55 -55
  42. data/examples/temp_sensor/src/TimerInterruptConfigurator.h +13 -13
  43. data/examples/temp_sensor/src/TimerInterruptHandler.c +25 -25
  44. data/examples/temp_sensor/src/TimerInterruptHandler.h +10 -10
  45. data/examples/temp_sensor/src/TimerModel.c +9 -9
  46. data/examples/temp_sensor/src/TimerModel.h +8 -8
  47. data/examples/temp_sensor/src/Types.h +90 -90
  48. data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +18 -18
  49. data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +8 -8
  50. data/examples/temp_sensor/src/UsartConductor.c +21 -21
  51. data/examples/temp_sensor/src/UsartConductor.h +7 -7
  52. data/examples/temp_sensor/src/UsartConfigurator.c +39 -39
  53. data/examples/temp_sensor/src/UsartConfigurator.h +13 -13
  54. data/examples/temp_sensor/src/UsartHardware.c +22 -22
  55. data/examples/temp_sensor/src/UsartHardware.h +9 -9
  56. data/examples/temp_sensor/src/UsartModel.c +34 -34
  57. data/examples/temp_sensor/src/UsartModel.h +10 -10
  58. data/examples/temp_sensor/src/UsartPutChar.c +16 -16
  59. data/examples/temp_sensor/src/UsartPutChar.h +8 -8
  60. data/examples/temp_sensor/src/UsartTransmitBufferStatus.c +7 -7
  61. data/examples/temp_sensor/src/UsartTransmitBufferStatus.h +8 -8
  62. data/examples/temp_sensor/test/TestAdcConductor.c +121 -121
  63. data/examples/temp_sensor/test/TestAdcHardware.c +44 -44
  64. data/examples/temp_sensor/test/TestAdcModel.c +33 -33
  65. data/examples/temp_sensor/test/TestExecutor.c +36 -36
  66. data/examples/temp_sensor/test/TestMain.c +24 -24
  67. data/examples/temp_sensor/test/TestModel.c +20 -20
  68. data/examples/temp_sensor/test/TestTaskScheduler.c +104 -104
  69. data/examples/temp_sensor/test/TestTemperatureCalculator.c +33 -33
  70. data/examples/temp_sensor/test/TestTemperatureFilter.c +79 -79
  71. data/examples/temp_sensor/test/TestTimerConductor.c +32 -32
  72. data/examples/temp_sensor/test/TestTimerHardware.c +26 -26
  73. data/examples/temp_sensor/test/TestTimerModel.c +18 -18
  74. data/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +21 -21
  75. data/examples/temp_sensor/test/TestUsartConductor.c +40 -40
  76. data/examples/temp_sensor/test/TestUsartHardware.c +36 -36
  77. data/examples/temp_sensor/test/TestUsartModel.c +36 -36
  78. data/examples/temp_sensor/test/support/UnityHelper.c +12 -12
  79. data/examples/temp_sensor/test/support/UnityHelper.h +12 -12
  80. data/lib/ceedling/configurator_builder.rb +1 -1
  81. data/lib/ceedling/tasks_base.rake +10 -2
  82. data/lib/ceedling/tool_executor.rb +3 -0
  83. data/lib/ceedling/version.rb +3 -3
  84. data/license.txt +1 -1
  85. data/plugins/bullseye/bullseye.rake +162 -162
  86. data/plugins/gcov/gcov.rake +152 -152
  87. data/plugins/module_generator/lib/module_generator.rb +145 -145
  88. data/plugins/module_generator/module_generator.rake +14 -14
  89. data/plugins/stdout_gtestlike_tests_report/assets/template.erb +84 -0
  90. data/plugins/stdout_gtestlike_tests_report/assets/template.erb copy +59 -0
  91. data/plugins/stdout_gtestlike_tests_report/config/stdout_gtestlike_tests_report.yml +4 -0
  92. data/plugins/stdout_gtestlike_tests_report/lib/stdout_gtestlike_tests_report.rb +43 -0
  93. data/spec/system/deployment_spec.rb +0 -1
  94. data/test_graveyard/integration/paths_test.rb +80 -80
  95. data/test_graveyard/integration/rake_rules_aux_dependencies_test.rb +75 -75
  96. data/test_graveyard/integration/rake_rules_cmock_test.rb +74 -74
  97. data/test_graveyard/integration/rake_rules_preprocess_test.rb +178 -178
  98. data/test_graveyard/integration/rake_rules_test.rb +268 -268
  99. data/test_graveyard/integration/rake_tasks_test.rb +103 -103
  100. data/test_graveyard/integration_test_helper.rb +34 -34
  101. data/test_graveyard/rakefile_rules.rb +10 -10
  102. data/test_graveyard/rakefile_rules_aux_dependencies.rb +10 -10
  103. data/test_graveyard/rakefile_rules_cmock.rb +10 -10
  104. data/test_graveyard/rakefile_rules_preprocess.rb +10 -10
  105. data/test_graveyard/rakefile_tasks.rb +10 -10
  106. data/test_graveyard/system/file_system_test.rb +78 -78
  107. data/test_graveyard/system/project_mocks_test.rb +38 -38
  108. data/test_graveyard/system/project_simple_test.rb +39 -39
  109. data/test_graveyard/system/rule_mocks_test.rb +44 -44
  110. data/test_graveyard/system/rule_runners_test.rb +44 -44
  111. data/test_graveyard/system_test_helper.rb +73 -73
  112. data/test_graveyard/test_helper.rb +93 -93
  113. data/test_graveyard/unit/busted/configurator_builder_test.rb +569 -569
  114. data/test_graveyard/unit/busted/configurator_helper_test.rb +234 -234
  115. data/test_graveyard/unit/busted/configurator_test.rb +232 -232
  116. data/test_graveyard/unit/busted/configurator_validator_test.rb +169 -169
  117. data/test_graveyard/unit/busted/deep_merge_fix_test.rb +55 -55
  118. data/test_graveyard/unit/busted/dependinator_test.rb +129 -129
  119. data/test_graveyard/unit/busted/file_finder_helper_test.rb +45 -45
  120. data/test_graveyard/unit/busted/file_finder_test.rb +114 -114
  121. data/test_graveyard/unit/busted/file_path_utils_test.rb +97 -97
  122. data/test_graveyard/unit/busted/file_system_utils_test.rb +21 -21
  123. data/test_graveyard/unit/busted/generator_test.rb +187 -187
  124. data/test_graveyard/unit/busted/generator_test_results_test.rb +129 -129
  125. data/test_graveyard/unit/busted/generator_test_runner_test.rb +475 -475
  126. data/test_graveyard/unit/busted/preprocessinator_file_handler_test.rb +39 -39
  127. data/test_graveyard/unit/busted/preprocessinator_helper_test.rb +156 -156
  128. data/test_graveyard/unit/busted/preprocessinator_includes_handler_test.rb +93 -93
  129. data/test_graveyard/unit/busted/preprocessinator_test.rb +57 -57
  130. data/test_graveyard/unit/busted/project_file_loader_test.rb +142 -142
  131. data/test_graveyard/unit/busted/setupinator_test.rb +45 -45
  132. data/test_graveyard/unit/busted/streaminator_test.rb +49 -49
  133. data/test_graveyard/unit/busted/task_invoker_test.rb +69 -69
  134. data/test_graveyard/unit/busted/test_includes_extractor_test.rb +111 -111
  135. data/test_graveyard/unit/busted/test_invoker_helper_test.rb +62 -62
  136. data/test_graveyard/unit/busted/test_invoker_test.rb +47 -47
  137. data/test_graveyard/unit/busted/tool_executor_helper_test.rb +100 -100
  138. data/test_graveyard/unit/busted/tool_executor_test.rb +351 -351
  139. data/test_graveyard/unit/busted/verbosinator_test.rb +65 -65
  140. data/test_graveyard/unit/preprocessinator_extractor_test.rb +731 -731
  141. data/test_graveyard/unit_test_helper.rb +16 -16
  142. data/vendor/c_exception/LICENSE.txt +30 -30
  143. data/vendor/c_exception/README.md +11 -1
  144. data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  145. data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
  146. data/vendor/c_exception/docs/readme.txt +261 -242
  147. data/vendor/c_exception/lib/CException.c +46 -46
  148. data/vendor/c_exception/lib/CException.h +110 -86
  149. data/vendor/c_exception/makefile +23 -23
  150. data/vendor/c_exception/test/CExceptionConfig.h +46 -46
  151. data/vendor/c_exception/test/TestException.c +391 -342
  152. data/vendor/c_exception/test/TestException_Runner.c +5 -12
  153. data/vendor/c_exception/vendor/unity/README.md +211 -0
  154. data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +1 -1
  155. data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +38 -38
  156. data/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -36
  157. data/vendor/c_exception/vendor/unity/auto/generate_module.rb +202 -202
  158. data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +391 -320
  159. data/vendor/c_exception/vendor/unity/auto/parseOutput.rb +2 -0
  160. data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +260 -0
  161. data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +8 -0
  162. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +135 -0
  163. data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +148 -139
  164. data/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
  165. data/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
  166. data/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +224 -216
  167. data/vendor/c_exception/vendor/unity/docs/license.txt +21 -31
  168. data/vendor/c_exception/vendor/unity/examples/example_1/makefile +40 -15
  169. data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -0
  170. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +32 -25
  171. data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +29 -22
  172. data/vendor/c_exception/vendor/unity/examples/example_2/makefile +40 -14
  173. data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +2 -0
  174. data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +2 -2
  175. data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +0 -1
  176. data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +2 -0
  177. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -37
  178. data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +179 -179
  179. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +135 -94
  180. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +13 -17
  181. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -18
  182. data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +30 -0
  183. data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +60 -0
  184. data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +4 -3
  185. data/vendor/c_exception/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
  186. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +182 -27
  187. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +13 -0
  188. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +8 -6
  189. data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +2 -2
  190. data/vendor/c_exception/vendor/unity/release/build.info +1 -1
  191. data/vendor/c_exception/vendor/unity/release/version.info +1 -1
  192. data/vendor/c_exception/vendor/unity/src/unity.c +1333 -1145
  193. data/vendor/c_exception/vendor/unity/src/unity.h +290 -307
  194. data/vendor/c_exception/vendor/unity/src/unity_internals.h +758 -620
  195. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +7 -3
  196. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +7 -3
  197. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -0
  198. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -0
  199. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +4 -3
  200. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +4 -3
  201. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
  202. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
  203. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -5
  204. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +4 -3
  205. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +4 -3
  206. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -5
  207. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +4 -3
  208. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -6
  209. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +9 -5
  210. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -3
  211. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +7 -3
  212. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +9 -5
  213. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -3
  214. data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +10 -6
  215. data/vendor/c_exception/vendor/unity/{rakefile.rb → test/rakefile} +60 -61
  216. data/vendor/c_exception/vendor/unity/{rakefile_helper.rb → test/rakefile_helper.rb} +255 -249
  217. data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +83 -0
  218. data/vendor/c_exception/vendor/unity/{targets → test/targets}/clang_strict.yml +83 -83
  219. data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -0
  220. data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -0
  221. data/vendor/c_exception/vendor/unity/{targets/gcc_64.yml → test/targets/gcc_auto_limits.yml} +46 -45
  222. data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +47 -0
  223. data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +58 -0
  224. data/vendor/{cmock/vendor/c_exception/vendor/unity/targets/gcc_64.yml → c_exception/vendor/unity/test/targets/gcc_manual_math.yml} +46 -45
  225. data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/hitech_picc18.yml +101 -101
  226. data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_arm_v4.yml +89 -89
  227. data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_arm_v5.yml +79 -79
  228. data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_arm_v5_3.yml +79 -79
  229. data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -93
  230. data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_cortexm3_v5.yml +83 -83
  231. data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_msp430.yml +94 -94
  232. data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_sh2a_v6.yml +85 -85
  233. data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +51 -51
  234. data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +8 -8
  235. data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +68 -51
  236. data/vendor/{cmock/vendor/c_exception/vendor/unity/test → c_exception/vendor/unity/test/tests}/test_generate_test_runner.rb +102 -88
  237. data/vendor/{cmock/vendor/c_exception/vendor/unity/test → c_exception/vendor/unity/test/tests}/testparameterized.c +104 -101
  238. data/vendor/c_exception/vendor/unity/test/{testunity.c → tests/testunity.c} +3682 -3447
  239. data/vendor/cmock/docs/CMock_Summary.md +3 -0
  240. data/vendor/cmock/lib/cmock_config.rb +1 -0
  241. data/vendor/cmock/lib/cmock_file_writer.rb +7 -3
  242. data/vendor/cmock/lib/cmock_generator.rb +3 -2
  243. data/vendor/cmock/lib/cmock_header_parser.rb +12 -5
  244. data/vendor/cmock/release/version.info +1 -1
  245. data/vendor/cmock/test/system/test_compilation/parsing.h +3 -0
  246. data/vendor/cmock/test/unit/cmock_generator_main_test.rb +7 -0
  247. data/vendor/cmock/test/unit/cmock_header_parser_test.rb +57 -1
  248. data/vendor/cmock/vendor/c_exception/LICENSE.txt +30 -30
  249. data/vendor/cmock/vendor/c_exception/README.md +11 -1
  250. data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  251. data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
  252. data/vendor/cmock/vendor/c_exception/docs/readme.txt +261 -242
  253. data/vendor/cmock/vendor/c_exception/lib/CException.c +46 -46
  254. data/vendor/cmock/vendor/c_exception/lib/CException.h +110 -86
  255. data/vendor/cmock/vendor/c_exception/makefile +23 -23
  256. data/vendor/cmock/vendor/c_exception/test/CExceptionConfig.h +46 -46
  257. data/vendor/cmock/vendor/c_exception/test/TestException.c +391 -342
  258. data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +5 -12
  259. data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +211 -0
  260. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +1 -1
  261. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +38 -38
  262. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -36
  263. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +202 -202
  264. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +391 -320
  265. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parseOutput.rb +2 -0
  266. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +260 -0
  267. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +8 -0
  268. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +135 -0
  269. data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +148 -139
  270. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
  271. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
  272. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +224 -216
  273. data/vendor/cmock/vendor/c_exception/vendor/unity/docs/license.txt +21 -31
  274. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +40 -15
  275. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -0
  276. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +32 -25
  277. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +29 -22
  278. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +40 -14
  279. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +2 -0
  280. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +2 -2
  281. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +0 -1
  282. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +2 -0
  283. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -37
  284. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +179 -179
  285. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +135 -94
  286. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +13 -17
  287. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -18
  288. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +30 -0
  289. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +60 -0
  290. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +4 -3
  291. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
  292. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +182 -27
  293. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +13 -0
  294. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +8 -6
  295. data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +2 -2
  296. data/vendor/cmock/vendor/c_exception/vendor/unity/release/build.info +1 -1
  297. data/vendor/cmock/vendor/c_exception/vendor/unity/release/version.info +1 -1
  298. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +1333 -1145
  299. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +290 -307
  300. data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +758 -620
  301. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +7 -3
  302. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +7 -3
  303. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -0
  304. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -0
  305. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +4 -3
  306. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +4 -3
  307. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
  308. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
  309. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -5
  310. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +4 -3
  311. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +4 -3
  312. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -5
  313. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +4 -3
  314. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -6
  315. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +9 -5
  316. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -3
  317. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +7 -3
  318. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +9 -5
  319. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -3
  320. data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +10 -6
  321. data/vendor/cmock/vendor/c_exception/vendor/unity/{rakefile.rb → test/rakefile} +60 -61
  322. data/vendor/cmock/vendor/c_exception/vendor/unity/{rakefile_helper.rb → test/rakefile_helper.rb} +255 -249
  323. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +83 -0
  324. data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/clang_strict.yml +83 -83
  325. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -0
  326. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -0
  327. data/vendor/cmock/vendor/c_exception/vendor/unity/{targets/gcc_32.yml → test/targets/gcc_auto_limits.yml} +46 -44
  328. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +47 -0
  329. data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +58 -0
  330. data/vendor/{c_exception/vendor/unity/targets/gcc_32.yml → cmock/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml} +46 -44
  331. data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/hitech_picc18.yml +101 -101
  332. data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_arm_v4.yml +89 -89
  333. data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_arm_v5.yml +79 -79
  334. data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_arm_v5_3.yml +79 -79
  335. data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -93
  336. data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_cortexm3_v5.yml +83 -83
  337. data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_msp430.yml +94 -94
  338. data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_sh2a_v6.yml +85 -85
  339. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +51 -51
  340. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/sample.yml +8 -8
  341. data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testsample.c +68 -51
  342. data/vendor/{c_exception/vendor/unity/test → cmock/vendor/c_exception/vendor/unity/test/tests}/test_generate_test_runner.rb +102 -88
  343. data/vendor/{c_exception/vendor/unity/test → cmock/vendor/c_exception/vendor/unity/test/tests}/testparameterized.c +104 -101
  344. data/vendor/cmock/vendor/c_exception/vendor/unity/test/{testunity.c → tests/testunity.c} +3682 -3447
  345. data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +30 -13
  346. data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +260 -0
  347. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +96 -93
  348. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +1 -1
  349. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -19
  350. data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +18 -17
  351. data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +66 -5
  352. data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +2 -1
  353. data/vendor/cmock/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
  354. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +187 -27
  355. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +14 -0
  356. data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +6 -5
  357. data/vendor/cmock/vendor/unity/release/version.info +1 -1
  358. data/vendor/cmock/vendor/unity/src/unity.c +38 -27
  359. data/vendor/cmock/vendor/unity/src/unity.h +5 -0
  360. data/vendor/cmock/vendor/unity/src/unity_internals.h +22 -18
  361. data/vendor/cmock/vendor/unity/test/Makefile +52 -0
  362. data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +4 -0
  363. data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +4 -0
  364. data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +4 -0
  365. data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +7 -4
  366. data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +6 -4
  367. data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +4 -0
  368. data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +4 -0
  369. data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +4 -0
  370. data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +4 -0
  371. data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +4 -0
  372. data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +4 -0
  373. data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +1 -1
  374. data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +0 -1
  375. data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +0 -1
  376. data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +0 -1
  377. data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +0 -1
  378. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +0 -1
  379. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_sizeof.yml +0 -1
  380. data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +0 -1
  381. data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +0 -1
  382. data/vendor/cmock/vendor/unity/test/testdata/testsample.c +19 -2
  383. data/vendor/cmock/vendor/unity/test/tests/testunity.c +55 -4
  384. data/vendor/unity/auto/generate_test_runner.rb +4 -2
  385. data/vendor/unity/auto/stylize_as_junit.rb +260 -0
  386. data/vendor/unity/extras/fixture/src/unity_fixture.c +24 -41
  387. data/vendor/unity/extras/fixture/src/unity_fixture.h +1 -1
  388. data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +5 -7
  389. data/vendor/unity/extras/fixture/test/Makefile +53 -8
  390. data/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
  391. data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +129 -32
  392. data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +6 -0
  393. data/vendor/unity/extras/fixture/test/unity_output_Spy.c +4 -4
  394. data/vendor/unity/release/version.info +1 -1
  395. data/vendor/unity/src/unity.c +32 -21
  396. data/vendor/unity/src/unity.h +5 -0
  397. data/vendor/unity/src/unity_internals.h +7 -3
  398. data/vendor/unity/test/Makefile +52 -0
  399. data/vendor/unity/test/expectdata/testsample_cmd.c +4 -0
  400. data/vendor/unity/test/expectdata/testsample_def.c +4 -0
  401. data/vendor/unity/test/expectdata/testsample_head1.c +4 -0
  402. data/vendor/unity/test/expectdata/testsample_head1.h +7 -4
  403. data/vendor/unity/test/expectdata/testsample_mock_head1.h +6 -4
  404. data/vendor/unity/test/expectdata/testsample_new1.c +4 -0
  405. data/vendor/unity/test/expectdata/testsample_new2.c +4 -0
  406. data/vendor/unity/test/expectdata/testsample_param.c +4 -0
  407. data/vendor/unity/test/expectdata/testsample_run1.c +4 -0
  408. data/vendor/unity/test/expectdata/testsample_run2.c +4 -0
  409. data/vendor/unity/test/expectdata/testsample_yaml.c +4 -0
  410. data/vendor/unity/test/testdata/testsample.c +19 -2
  411. data/vendor/unity/test/tests/testunity.c +35 -4
  412. metadata +75 -52
  413. data/ceedling-0.18.0.gem +0 -0
  414. data/docs/CeedlingLogo.png +0 -0
  415. data/vendor/c_exception/vendor/unity/Gemfile +0 -4
  416. data/vendor/c_exception/vendor/unity/Gemfile.lock +0 -12
  417. data/vendor/c_exception/vendor/unity/examples/example_3/makefile +0 -41
  418. data/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c +0 -46
  419. data/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c +0 -50
  420. data/vendor/c_exception/vendor/unity/makefile +0 -37
  421. data/vendor/cmock/vendor/c_exception/vendor/unity/Gemfile +0 -4
  422. data/vendor/cmock/vendor/c_exception/vendor/unity/Gemfile.lock +0 -12
  423. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/makefile +0 -41
  424. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c +0 -46
  425. data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c +0 -50
  426. data/vendor/cmock/vendor/c_exception/vendor/unity/makefile +0 -37
@@ -1,620 +1,758 @@
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
- // Unity attempts to determine sizeof(various types)
14
- // based on UINT_MAX, ULONG_MAX, etc. These are typically
15
- // defined in limits.h.
16
- #ifdef UNITY_USE_LIMITS_H
17
- #include <limits.h>
18
- #endif
19
- // As a fallback, hope that including stdint.h will
20
- // provide this information.
21
- #ifndef UNITY_EXCLUDE_STDINT_H
22
- #include <stdint.h>
23
- #endif
24
-
25
- //-------------------------------------------------------
26
- // Guess Widths If Not Specified
27
- //-------------------------------------------------------
28
-
29
- // Determine the size of an int, if not already specificied.
30
- // We cannot use sizeof(int), because it is not yet defined
31
- // at this stage in the trnslation of the C program.
32
- // Therefore, infer it from UINT_MAX if possible.
33
- #ifndef UNITY_INT_WIDTH
34
- #ifdef UINT_MAX
35
- #if (UINT_MAX == 0xFFFF)
36
- #define UNITY_INT_WIDTH (16)
37
- #elif (UINT_MAX == 0xFFFFFFFF)
38
- #define UNITY_INT_WIDTH (32)
39
- #elif (UINT_MAX == 0xFFFFFFFFFFFFFFFF)
40
- #define UNITY_INT_WIDTH (64)
41
- #ifndef UNITY_SUPPORT_64
42
- #define UNITY_SUPPORT_64
43
- #endif
44
- #endif
45
- #endif
46
- #endif
47
- #ifndef UNITY_INT_WIDTH
48
- #define UNITY_INT_WIDTH (32)
49
- #endif
50
-
51
- // Determine the size of a long, if not already specified,
52
- // by following the process used above to define
53
- // UNITY_INT_WIDTH.
54
- #ifndef UNITY_LONG_WIDTH
55
- #ifdef ULONG_MAX
56
- #if (ULONG_MAX == 0xFFFF)
57
- #define UNITY_LONG_WIDTH (16)
58
- #elif (ULONG_MAX == 0xFFFFFFFF)
59
- #define UNITY_LONG_WIDTH (32)
60
- #elif (ULONG_MAX == 0xFFFFFFFFFFFFFFFF)
61
- #define UNITY_LONG_WIDTH (64)
62
- #ifndef UNITY_SUPPORT_64
63
- #define UNITY_SUPPORT_64
64
- #endif
65
- #endif
66
- #endif
67
- #endif
68
- #ifndef UNITY_LONG_WIDTH
69
- #define UNITY_LONG_WIDTH (32)
70
- #endif
71
-
72
- // Determine the size of a pointer, if not already specified,
73
- // by following the process used above to define
74
- // UNITY_INT_WIDTH.
75
- #ifndef UNITY_POINTER_WIDTH
76
- #ifdef UINTPTR_MAX
77
- #if (UINTPTR_MAX <= 0xFFFF)
78
- #define UNITY_POINTER_WIDTH (16)
79
- #elif (UINTPTR_MAX <= 0xFFFFFFFF)
80
- #define UNITY_POINTER_WIDTH (32)
81
- #elif (UINTPTR_MAX <= 0xFFFFFFFFFFFFFFFF)
82
- #define UNITY_POINTER_WIDTH (64)
83
- #ifndef UNITY_SUPPORT_64
84
- #define UNITY_SUPPORT_64
85
- #endif
86
- #endif
87
- #endif
88
- #endif
89
- #ifndef UNITY_POINTER_WIDTH
90
- #ifdef INTPTR_MAX
91
- #if (INTPTR_MAX <= 0x7FFF)
92
- #define UNITY_POINTER_WIDTH (16)
93
- #elif (INTPTR_MAX <= 0x7FFFFFFF)
94
- #define UNITY_POINTER_WIDTH (32)
95
- #elif (INTPTR_MAX <= 0x7FFFFFFFFFFFFFFF)
96
- #define UNITY_POINTER_WIDTH (64)
97
- #ifndef UNITY_SUPPORT_64
98
- #define UNITY_SUPPORT_64
99
- #endif
100
- #endif
101
- #endif
102
- #endif
103
- #ifndef UNITY_POINTER_WIDTH
104
- #define UNITY_POINTER_WIDTH (32)
105
- #endif
106
-
107
- //-------------------------------------------------------
108
- // Int Support
109
- //-------------------------------------------------------
110
-
111
- #if (UNITY_INT_WIDTH == 32)
112
- typedef unsigned char _UU8;
113
- typedef unsigned short _UU16;
114
- typedef unsigned int _UU32;
115
- typedef signed char _US8;
116
- typedef signed short _US16;
117
- typedef signed int _US32;
118
- #elif (UNITY_INT_WIDTH == 16)
119
- typedef unsigned char _UU8;
120
- typedef unsigned int _UU16;
121
- typedef unsigned long _UU32;
122
- typedef signed char _US8;
123
- typedef signed int _US16;
124
- typedef signed long _US32;
125
- #else
126
- #error Invalid UNITY_INT_WIDTH specified! (16 or 32 are supported)
127
- #endif
128
-
129
- //-------------------------------------------------------
130
- // 64-bit Support
131
- //-------------------------------------------------------
132
-
133
- #ifndef UNITY_SUPPORT_64
134
-
135
- //No 64-bit Support
136
- typedef _UU32 _U_UINT;
137
- typedef _US32 _U_SINT;
138
-
139
- #else
140
-
141
- //64-bit Support
142
- #if (UNITY_LONG_WIDTH == 32)
143
- typedef unsigned long long _UU64;
144
- typedef signed long long _US64;
145
- #elif (UNITY_LONG_WIDTH == 64)
146
- typedef unsigned long _UU64;
147
- typedef signed long _US64;
148
- #else
149
- #error Invalid UNITY_LONG_WIDTH specified! (32 or 64 are supported)
150
- #endif
151
- typedef _UU64 _U_UINT;
152
- typedef _US64 _U_SINT;
153
-
154
- #endif
155
-
156
- //-------------------------------------------------------
157
- // Pointer Support
158
- //-------------------------------------------------------
159
-
160
- #if (UNITY_POINTER_WIDTH == 32)
161
- typedef _UU32 _UP;
162
- #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX32
163
- #elif (UNITY_POINTER_WIDTH == 64)
164
- #ifndef UNITY_SUPPORT_64
165
- #error "You've Specified 64-bit pointers without enabling 64-bit Support. Define UNITY_SUPPORT_64"
166
- #endif
167
- typedef _UU64 _UP;
168
- #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX64
169
- #elif (UNITY_POINTER_WIDTH == 16)
170
- typedef _UU16 _UP;
171
- #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX16
172
- #else
173
- #error Invalid UNITY_POINTER_WIDTH specified! (16, 32 or 64 are supported)
174
- #endif
175
-
176
- #ifndef UNITY_PTR_ATTRIBUTE
177
- #define UNITY_PTR_ATTRIBUTE
178
- #endif
179
-
180
- //-------------------------------------------------------
181
- // Float Support
182
- //-------------------------------------------------------
183
-
184
- #ifdef UNITY_EXCLUDE_FLOAT
185
-
186
- //No Floating Point Support
187
- #undef UNITY_FLOAT_PRECISION
188
- #undef UNITY_FLOAT_TYPE
189
- #undef UNITY_FLOAT_VERBOSE
190
-
191
- #else
192
-
193
- //Floating Point Support
194
- #ifndef UNITY_FLOAT_PRECISION
195
- #define UNITY_FLOAT_PRECISION (0.00001f)
196
- #endif
197
- #ifndef UNITY_FLOAT_TYPE
198
- #define UNITY_FLOAT_TYPE float
199
- #endif
200
- typedef UNITY_FLOAT_TYPE _UF;
201
-
202
- #endif
203
-
204
- //-------------------------------------------------------
205
- // Double Float Support
206
- //-------------------------------------------------------
207
-
208
- //unlike FLOAT, we DON'T include by default
209
- #ifndef UNITY_EXCLUDE_DOUBLE
210
- #ifndef UNITY_INCLUDE_DOUBLE
211
- #define UNITY_EXCLUDE_DOUBLE
212
- #endif
213
- #endif
214
-
215
- #ifdef UNITY_EXCLUDE_DOUBLE
216
-
217
- //No Floating Point Support
218
- #undef UNITY_DOUBLE_PRECISION
219
- #undef UNITY_DOUBLE_TYPE
220
- #undef UNITY_DOUBLE_VERBOSE
221
-
222
- #ifdef UNITY_INCLUDE_DOUBLE
223
- #undef UNITY_INCLUDE_DOUBLE
224
- #endif
225
-
226
- #else
227
-
228
- //Floating Point Support
229
- #ifndef UNITY_DOUBLE_PRECISION
230
- #define UNITY_DOUBLE_PRECISION (1e-12f)
231
- #endif
232
- #ifndef UNITY_DOUBLE_TYPE
233
- #define UNITY_DOUBLE_TYPE double
234
- #endif
235
- typedef UNITY_DOUBLE_TYPE _UD;
236
-
237
- #endif
238
-
239
- //-------------------------------------------------------
240
- // Output Method
241
- //-------------------------------------------------------
242
-
243
- #ifndef UNITY_OUTPUT_CHAR
244
- //Default to using putchar, which is defined in stdio.h above
245
- #define UNITY_OUTPUT_CHAR(a) putchar(a)
246
- #else
247
- //If defined as something else, make sure we declare it here so it's ready for use
248
- extern int UNITY_OUTPUT_CHAR(int);
249
- #endif
250
-
251
- //-------------------------------------------------------
252
- // Footprint
253
- //-------------------------------------------------------
254
-
255
- #ifndef UNITY_LINE_TYPE
256
- #define UNITY_LINE_TYPE _U_UINT
257
- #endif
258
-
259
- #ifndef UNITY_COUNTER_TYPE
260
- #define UNITY_COUNTER_TYPE _U_UINT
261
- #endif
262
-
263
- //-------------------------------------------------------
264
- // Language Features Available
265
- //-------------------------------------------------------
266
-
267
- #ifdef __GNUC__
268
- #define UNITY_SUPPORT_WEAK __attribute__((weak))
269
- #endif
270
-
271
- #ifdef __clang__
272
- #define UNITY_SUPPORT_WEAK __attribute__((weak))
273
- #endif
274
-
275
- #ifndef UNITY_WEAK
276
- #ifdef UNITY_SUPPORT_WEAK
277
- #define UNITY_WEAK UNITY_SUPPORT_WEAK
278
- #else
279
- #define UNITY_WEAK
280
- #endif
281
- #endif
282
-
283
- //-------------------------------------------------------
284
- // Internal Structs Needed
285
- //-------------------------------------------------------
286
-
287
- typedef void (*UnityTestFunction)(void);
288
-
289
- #define UNITY_DISPLAY_RANGE_INT (0x10)
290
- #define UNITY_DISPLAY_RANGE_UINT (0x20)
291
- #define UNITY_DISPLAY_RANGE_HEX (0x40)
292
- #define UNITY_DISPLAY_RANGE_AUTO (0x80)
293
-
294
- typedef enum
295
- {
296
- #if (UNITY_INT_WIDTH == 16)
297
- UNITY_DISPLAY_STYLE_INT = 2 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
298
- #elif (UNITY_INT_WIDTH == 32)
299
- UNITY_DISPLAY_STYLE_INT = 4 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
300
- #elif (UNITY_INT_WIDTH == 64)
301
- UNITY_DISPLAY_STYLE_INT = 8 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
302
- #endif
303
- UNITY_DISPLAY_STYLE_INT8 = 1 + UNITY_DISPLAY_RANGE_INT,
304
- UNITY_DISPLAY_STYLE_INT16 = 2 + UNITY_DISPLAY_RANGE_INT,
305
- UNITY_DISPLAY_STYLE_INT32 = 4 + UNITY_DISPLAY_RANGE_INT,
306
- #ifdef UNITY_SUPPORT_64
307
- UNITY_DISPLAY_STYLE_INT64 = 8 + UNITY_DISPLAY_RANGE_INT,
308
- #endif
309
-
310
- #if (UNITY_INT_WIDTH == 16)
311
- UNITY_DISPLAY_STYLE_UINT = 2 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
312
- #elif (UNITY_INT_WIDTH == 32)
313
- UNITY_DISPLAY_STYLE_UINT = 4 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
314
- #elif (UNITY_INT_WIDTH == 64)
315
- UNITY_DISPLAY_STYLE_UINT = 8 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
316
- #endif
317
- UNITY_DISPLAY_STYLE_UINT8 = 1 + UNITY_DISPLAY_RANGE_UINT,
318
- UNITY_DISPLAY_STYLE_UINT16 = 2 + UNITY_DISPLAY_RANGE_UINT,
319
- UNITY_DISPLAY_STYLE_UINT32 = 4 + UNITY_DISPLAY_RANGE_UINT,
320
- #ifdef UNITY_SUPPORT_64
321
- UNITY_DISPLAY_STYLE_UINT64 = 8 + UNITY_DISPLAY_RANGE_UINT,
322
- #endif
323
- UNITY_DISPLAY_STYLE_HEX8 = 1 + UNITY_DISPLAY_RANGE_HEX,
324
- UNITY_DISPLAY_STYLE_HEX16 = 2 + UNITY_DISPLAY_RANGE_HEX,
325
- UNITY_DISPLAY_STYLE_HEX32 = 4 + UNITY_DISPLAY_RANGE_HEX,
326
- #ifdef UNITY_SUPPORT_64
327
- UNITY_DISPLAY_STYLE_HEX64 = 8 + UNITY_DISPLAY_RANGE_HEX,
328
- #endif
329
- UNITY_DISPLAY_STYLE_UNKNOWN
330
- } UNITY_DISPLAY_STYLE_T;
331
-
332
- #ifndef UNITY_EXCLUDE_FLOAT
333
- typedef enum _UNITY_FLOAT_TRAIT_T
334
- {
335
- UNITY_FLOAT_IS_NOT_INF = 0,
336
- UNITY_FLOAT_IS_INF,
337
- UNITY_FLOAT_IS_NOT_NEG_INF,
338
- UNITY_FLOAT_IS_NEG_INF,
339
- UNITY_FLOAT_IS_NOT_NAN,
340
- UNITY_FLOAT_IS_NAN,
341
- UNITY_FLOAT_IS_NOT_DET,
342
- UNITY_FLOAT_IS_DET,
343
- } UNITY_FLOAT_TRAIT_T;
344
- #endif
345
-
346
- struct _Unity
347
- {
348
- const char* TestFile;
349
- const char* CurrentTestName;
350
- UNITY_LINE_TYPE CurrentTestLineNumber;
351
- UNITY_COUNTER_TYPE NumberOfTests;
352
- UNITY_COUNTER_TYPE TestFailures;
353
- UNITY_COUNTER_TYPE TestIgnores;
354
- UNITY_COUNTER_TYPE CurrentTestFailed;
355
- UNITY_COUNTER_TYPE CurrentTestIgnored;
356
- jmp_buf AbortFrame;
357
- };
358
-
359
- extern struct _Unity Unity;
360
-
361
- //-------------------------------------------------------
362
- // Test Suite Management
363
- //-------------------------------------------------------
364
-
365
- void UnityBegin(void);
366
- int UnityEnd(void);
367
- void UnityConcludeTest(void);
368
- void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum);
369
-
370
- //-------------------------------------------------------
371
- // Test Output
372
- //-------------------------------------------------------
373
-
374
- void UnityPrint(const char* string);
375
- void UnityPrintMask(const _U_UINT mask, const _U_UINT number);
376
- void UnityPrintNumberByStyle(const _U_SINT number, const UNITY_DISPLAY_STYLE_T style);
377
- void UnityPrintNumber(const _U_SINT number);
378
- void UnityPrintNumberUnsigned(const _U_UINT number);
379
- void UnityPrintNumberHex(const _U_UINT number, const char nibbles);
380
-
381
- #ifdef UNITY_FLOAT_VERBOSE
382
- void UnityPrintFloat(const _UF number);
383
- #endif
384
-
385
- //-------------------------------------------------------
386
- // Test Assertion Fuctions
387
- //-------------------------------------------------------
388
- // Use the macros below this section instead of calling
389
- // these directly. The macros have a consistent naming
390
- // convention and will pull in file and line information
391
- // for you.
392
-
393
- void UnityAssertEqualNumber(const _U_SINT expected,
394
- const _U_SINT actual,
395
- const char* msg,
396
- const UNITY_LINE_TYPE lineNumber,
397
- const UNITY_DISPLAY_STYLE_T style);
398
-
399
- void UnityAssertEqualIntArray(UNITY_PTR_ATTRIBUTE const void* expected,
400
- UNITY_PTR_ATTRIBUTE const void* actual,
401
- const _UU32 num_elements,
402
- const char* msg,
403
- const UNITY_LINE_TYPE lineNumber,
404
- const UNITY_DISPLAY_STYLE_T style);
405
-
406
- void UnityAssertBits(const _U_SINT mask,
407
- const _U_SINT expected,
408
- const _U_SINT actual,
409
- const char* msg,
410
- const UNITY_LINE_TYPE lineNumber);
411
-
412
- void UnityAssertEqualString(const char* expected,
413
- const char* actual,
414
- const char* msg,
415
- const UNITY_LINE_TYPE lineNumber);
416
-
417
- void UnityAssertEqualStringArray( const char** expected,
418
- const char** actual,
419
- const _UU32 num_elements,
420
- const char* msg,
421
- const UNITY_LINE_TYPE lineNumber);
422
-
423
- void UnityAssertEqualMemory( UNITY_PTR_ATTRIBUTE const void* expected,
424
- UNITY_PTR_ATTRIBUTE const void* actual,
425
- const _UU32 length,
426
- const _UU32 num_elements,
427
- const char* msg,
428
- const UNITY_LINE_TYPE lineNumber);
429
-
430
- void UnityAssertNumbersWithin(const _U_SINT delta,
431
- const _U_SINT expected,
432
- const _U_SINT actual,
433
- const char* msg,
434
- const UNITY_LINE_TYPE lineNumber,
435
- const UNITY_DISPLAY_STYLE_T style);
436
-
437
- void UnityFail(const char* message, const UNITY_LINE_TYPE line);
438
-
439
- void UnityIgnore(const char* message, const UNITY_LINE_TYPE line);
440
-
441
- #ifndef UNITY_EXCLUDE_FLOAT
442
- void UnityAssertFloatsWithin(const _UF delta,
443
- const _UF expected,
444
- const _UF actual,
445
- const char* msg,
446
- const UNITY_LINE_TYPE lineNumber);
447
-
448
- void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const _UF* expected,
449
- UNITY_PTR_ATTRIBUTE const _UF* actual,
450
- const _UU32 num_elements,
451
- const char* msg,
452
- const UNITY_LINE_TYPE lineNumber);
453
-
454
- void UnityAssertFloatSpecial(const _UF actual,
455
- const char* msg,
456
- const UNITY_LINE_TYPE lineNumber,
457
- const UNITY_FLOAT_TRAIT_T style);
458
- #endif
459
-
460
- #ifndef UNITY_EXCLUDE_DOUBLE
461
- void UnityAssertDoublesWithin(const _UD delta,
462
- const _UD expected,
463
- const _UD actual,
464
- const char* msg,
465
- const UNITY_LINE_TYPE lineNumber);
466
-
467
- void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const _UD* expected,
468
- UNITY_PTR_ATTRIBUTE const _UD* actual,
469
- const _UU32 num_elements,
470
- const char* msg,
471
- const UNITY_LINE_TYPE lineNumber);
472
-
473
- void UnityAssertDoubleSpecial(const _UD actual,
474
- const char* msg,
475
- const UNITY_LINE_TYPE lineNumber,
476
- const UNITY_FLOAT_TRAIT_T style);
477
- #endif
478
-
479
- //-------------------------------------------------------
480
- // Error Strings We Might Need
481
- //-------------------------------------------------------
482
-
483
- extern const char* UnityStrErrFloat;
484
- extern const char* UnityStrErrDouble;
485
- extern const char* UnityStrErr64;
486
-
487
- //-------------------------------------------------------
488
- // Basic Fail and Ignore
489
- //-------------------------------------------------------
490
-
491
- #define UNITY_TEST_FAIL(line, message) UnityFail( (message), (UNITY_LINE_TYPE)line);
492
- #define UNITY_TEST_IGNORE(line, message) UnityIgnore( (message), (UNITY_LINE_TYPE)line);
493
-
494
- //-------------------------------------------------------
495
- // Test Asserts
496
- //-------------------------------------------------------
497
-
498
- #define UNITY_TEST_ASSERT(condition, line, message) if (condition) {} else {UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, message);}
499
- #define UNITY_TEST_ASSERT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) == NULL), (UNITY_LINE_TYPE)line, message)
500
- #define UNITY_TEST_ASSERT_NOT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) != NULL), (UNITY_LINE_TYPE)line, message)
501
-
502
- #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)
503
- #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_INT8)
504
- #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_INT16)
505
- #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_INT32)
506
- #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)
507
- #define UNITY_TEST_ASSERT_EQUAL_UINT8(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_UU8 )(expected), (_U_SINT)(_UU8 )(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT8)
508
- #define UNITY_TEST_ASSERT_EQUAL_UINT16(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_UU16)(expected), (_U_SINT)(_UU16)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT16)
509
- #define UNITY_TEST_ASSERT_EQUAL_UINT32(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_UU32)(expected), (_U_SINT)(_UU32)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT32)
510
- #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)
511
- #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)
512
- #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)
513
- #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)
514
-
515
- #define UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(delta), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
516
- #define UNITY_TEST_ASSERT_INT8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(_US8 )(delta), (_U_SINT)(_US8 )(expected), (_U_SINT)(_US8 )(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT8)
517
- #define UNITY_TEST_ASSERT_INT16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(_US16)(delta), (_U_SINT)(_US16)(expected), (_U_SINT)(_US16)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT16)
518
- #define UNITY_TEST_ASSERT_INT32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(_US32)(delta), (_U_SINT)(_US32)(expected), (_U_SINT)(_US32)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT32)
519
- #define UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(delta), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
520
- #define UNITY_TEST_ASSERT_UINT8_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), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT8)
521
- #define UNITY_TEST_ASSERT_UINT16_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), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT16)
522
- #define UNITY_TEST_ASSERT_UINT32_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), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT32)
523
- #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), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX8)
524
- #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), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX16)
525
- #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), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX32)
526
-
527
- #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)
528
- #define UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, line, message) UnityAssertEqualString((const char*)(expected), (const char*)(actual), (message), (UNITY_LINE_TYPE)line)
529
- #define UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, line, message) UnityAssertEqualMemory((UNITY_PTR_ATTRIBUTE void*)(expected), (UNITY_PTR_ATTRIBUTE void*)(actual), (_UU32)(len), 1, (message), (UNITY_LINE_TYPE)line)
530
-
531
- #define UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
532
- #define UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT8)
533
- #define UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT16)
534
- #define UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT32)
535
- #define UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
536
- #define UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT8)
537
- #define UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT16)
538
- #define UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT32)
539
- #define UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX8)
540
- #define UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX16)
541
- #define UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(expected), (UNITY_PTR_ATTRIBUTE const void*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX32)
542
- #define UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const void*)(_UP*)(expected), (const void*)(_UP*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_POINTER)
543
- #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)
544
- #define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_PTR_ATTRIBUTE void*)(expected), (UNITY_PTR_ATTRIBUTE void*)(actual), (_UU32)(len), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line)
545
-
546
- #ifdef UNITY_SUPPORT_64
547
- #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)
548
- #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)
549
- #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)
550
- #define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const _U_SINT*)(expected), (UNITY_PTR_ATTRIBUTE const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT64)
551
- #define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const _U_SINT*)(expected), (UNITY_PTR_ATTRIBUTE const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT64)
552
- #define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_PTR_ATTRIBUTE const _U_SINT*)(expected), (UNITY_PTR_ATTRIBUTE const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX64)
553
- #define UNITY_TEST_ASSERT_INT64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(delta), (_U_SINT)(expected), (_U_SINT)(actual), NULL, (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT64)
554
- #define UNITY_TEST_ASSERT_UINT64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(delta), (_U_SINT)(expected), (_U_SINT)(actual), NULL, (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT64)
555
- #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)
556
- #else
557
- #define UNITY_TEST_ASSERT_EQUAL_INT64(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErr64)
558
- #define UNITY_TEST_ASSERT_EQUAL_UINT64(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErr64)
559
- #define UNITY_TEST_ASSERT_EQUAL_HEX64(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErr64)
560
- #define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErr64)
561
- #define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErr64)
562
- #define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErr64)
563
- #define UNITY_TEST_ASSERT_INT64_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErr64)
564
- #define UNITY_TEST_ASSERT_UINT64_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErr64)
565
- #define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErr64)
566
- #endif
567
-
568
- #ifdef UNITY_EXCLUDE_FLOAT
569
- #define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
570
- #define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
571
- #define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
572
- #define UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
573
- #define UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
574
- #define UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
575
- #define UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
576
- #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
577
- #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
578
- #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
579
- #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrFloat)
580
- #else
581
- #define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UnityAssertFloatsWithin((_UF)(delta), (_UF)(expected), (_UF)(actual), (message), (UNITY_LINE_TYPE)line)
582
- #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)
583
- #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)
584
- #define UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_INF)
585
- #define UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NEG_INF)
586
- #define UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NAN)
587
- #define UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_DET)
588
- #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NOT_INF)
589
- #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NOT_NEG_INF)
590
- #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NOT_NAN)
591
- #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NOT_DET)
592
- #endif
593
-
594
- #ifdef UNITY_EXCLUDE_DOUBLE
595
- #define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
596
- #define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
597
- #define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
598
- #define UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
599
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
600
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
601
- #define UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
602
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
603
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
604
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
605
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, UnityStrErrDouble)
606
- #else
607
- #define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UnityAssertDoublesWithin((_UD)(delta), (_UD)(expected), (_UD)(actual), (message), (UNITY_LINE_TYPE)line)
608
- #define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((_UD)(expected) * (_UD)UNITY_DOUBLE_PRECISION, (_UD)expected, (_UD)actual, (UNITY_LINE_TYPE)line, message)
609
- #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)
610
- #define UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_INF)
611
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NEG_INF)
612
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NAN)
613
- #define UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_DET)
614
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NOT_INF)
615
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NOT_NEG_INF)
616
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NOT_NAN)
617
- #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NOT_DET)
618
- #endif
619
-
620
- #endif
1
+ /* ==========================================
2
+ Unity Project - A Test Framework for C
3
+ Copyright (c) 2007-14 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
+ #ifdef UNITY_INCLUDE_CONFIG_H
11
+ #include "unity_config.h"
12
+ #endif
13
+
14
+ #include <setjmp.h>
15
+
16
+ // Unity Attempts to Auto-Detect Integer Types
17
+ // Attempt 1: UINT_MAX, ULONG_MAX, etc in <stdint.h>
18
+ // Attempt 2: UINT_MAX, ULONG_MAX, etc in <limits.h>
19
+ // Attempt 3: Deduced from sizeof() macros
20
+ #ifndef UNITY_EXCLUDE_STDINT_H
21
+ #include <stdint.h>
22
+ #endif
23
+
24
+ #ifndef UNITY_EXCLUDE_LIMITS_H
25
+ #include <limits.h>
26
+ #endif
27
+
28
+ #ifndef UNITY_EXCLUDE_SIZEOF
29
+ #ifndef UINT_MAX
30
+ #define UINT_MAX (sizeof(unsigned int) * 256 - 1)
31
+ #endif
32
+ #ifndef ULONG_MAX
33
+ #define ULONG_MAX (sizeof(unsigned long) * 256 - 1)
34
+ #endif
35
+ #ifndef UINTPTR_MAX
36
+ //apparently this is not a constant expression: (sizeof(unsigned int *) * 256 - 1) so we have to just let this fall through
37
+ #endif
38
+ #endif
39
+
40
+ #ifndef UNITY_EXCLUDE_MATH_H
41
+ #include <math.h>
42
+ #endif
43
+
44
+ //-------------------------------------------------------
45
+ // Guess Widths If Not Specified
46
+ //-------------------------------------------------------
47
+
48
+ // Determine the size of an int, if not already specificied.
49
+ // We cannot use sizeof(int), because it is not yet defined
50
+ // at this stage in the trnslation of the C program.
51
+ // Therefore, infer it from UINT_MAX if possible.
52
+ #ifndef UNITY_INT_WIDTH
53
+ #ifdef UINT_MAX
54
+ #if (UINT_MAX == 0xFFFF)
55
+ #define UNITY_INT_WIDTH (16)
56
+ #elif (UINT_MAX == 0xFFFFFFFF)
57
+ #define UNITY_INT_WIDTH (32)
58
+ #elif (UINT_MAX == 0xFFFFFFFFFFFFFFFF)
59
+ #define UNITY_INT_WIDTH (64)
60
+ #endif
61
+ #endif
62
+ #endif
63
+ #ifndef UNITY_INT_WIDTH
64
+ #define UNITY_INT_WIDTH (32)
65
+ #endif
66
+
67
+ // Determine the size of a long, if not already specified,
68
+ // by following the process used above to define
69
+ // UNITY_INT_WIDTH.
70
+ #ifndef UNITY_LONG_WIDTH
71
+ #ifdef ULONG_MAX
72
+ #if (ULONG_MAX == 0xFFFF)
73
+ #define UNITY_LONG_WIDTH (16)
74
+ #elif (ULONG_MAX == 0xFFFFFFFF)
75
+ #define UNITY_LONG_WIDTH (32)
76
+ #elif (ULONG_MAX == 0xFFFFFFFFFFFFFFFF)
77
+ #define UNITY_LONG_WIDTH (64)
78
+ #endif
79
+ #endif
80
+ #endif
81
+ #ifndef UNITY_LONG_WIDTH
82
+ #define UNITY_LONG_WIDTH (32)
83
+ #endif
84
+
85
+ // Determine the size of a pointer, if not already specified,
86
+ // by following the process used above to define
87
+ // UNITY_INT_WIDTH.
88
+ #ifndef UNITY_POINTER_WIDTH
89
+ #ifdef UINTPTR_MAX
90
+ #if (UINTPTR_MAX+0 <= 0xFFFF)
91
+ #define UNITY_POINTER_WIDTH (16)
92
+ #elif (UINTPTR_MAX+0 <= 0xFFFFFFFF)
93
+ #define UNITY_POINTER_WIDTH (32)
94
+ #elif (UINTPTR_MAX+0 <= 0xFFFFFFFFFFFFFFFF)
95
+ #define UNITY_POINTER_WIDTH (64)
96
+ #endif
97
+ #endif
98
+ #endif
99
+ #ifndef UNITY_POINTER_WIDTH
100
+ #ifdef INTPTR_MAX
101
+ #if (INTPTR_MAX+0 <= 0x7FFF)
102
+ #define UNITY_POINTER_WIDTH (16)
103
+ #elif (INTPTR_MAX+0 <= 0x7FFFFFFF)
104
+ #define UNITY_POINTER_WIDTH (32)
105
+ #elif (INTPTR_MAX+0 <= 0x7FFFFFFFFFFFFFFF)
106
+ #define UNITY_POINTER_WIDTH (64)
107
+ #endif
108
+ #endif
109
+ #endif
110
+ #ifndef UNITY_POINTER_WIDTH
111
+ #define UNITY_POINTER_WIDTH UNITY_LONG_WIDTH
112
+ #endif
113
+
114
+ //-------------------------------------------------------
115
+ // Int Support (Define types based on detected sizes)
116
+ //-------------------------------------------------------
117
+
118
+ #if (UNITY_INT_WIDTH == 32)
119
+ typedef unsigned char _UU8;
120
+ typedef unsigned short _UU16;
121
+ typedef unsigned int _UU32;
122
+ typedef signed char _US8;
123
+ typedef signed short _US16;
124
+ typedef signed int _US32;
125
+ #elif (UNITY_INT_WIDTH == 16)
126
+ typedef unsigned char _UU8;
127
+ typedef unsigned int _UU16;
128
+ typedef unsigned long _UU32;
129
+ typedef signed char _US8;
130
+ typedef signed int _US16;
131
+ typedef signed long _US32;
132
+ #else
133
+ #error Invalid UNITY_INT_WIDTH specified! (16 or 32 are supported)
134
+ #endif
135
+
136
+ //-------------------------------------------------------
137
+ // 64-bit Support
138
+ //-------------------------------------------------------
139
+
140
+ #ifndef UNITY_SUPPORT_64
141
+ #if UNITY_LONG_WIDTH > 32
142
+ #define UNITY_SUPPORT_64
143
+ #endif
144
+ #endif
145
+ #ifndef UNITY_SUPPORT_64
146
+ #if UNITY_POINTER_WIDTH > 32
147
+ #define UNITY_SUPPORT_64
148
+ #endif
149
+ #endif
150
+
151
+ #ifndef UNITY_SUPPORT_64
152
+
153
+ //No 64-bit Support
154
+ typedef _UU32 _U_UINT;
155
+ typedef _US32 _U_SINT;
156
+
157
+ #else
158
+
159
+ //64-bit Support
160
+ #if (UNITY_LONG_WIDTH == 32)
161
+ typedef unsigned long long _UU64;
162
+ typedef signed long long _US64;
163
+ #elif (UNITY_LONG_WIDTH == 64)
164
+ typedef unsigned long _UU64;
165
+ typedef signed long _US64;
166
+ #else
167
+ #error Invalid UNITY_LONG_WIDTH specified! (32 or 64 are supported)
168
+ #endif
169
+ typedef _UU64 _U_UINT;
170
+ typedef _US64 _U_SINT;
171
+
172
+ #endif
173
+
174
+ //-------------------------------------------------------
175
+ // Pointer Support
176
+ //-------------------------------------------------------
177
+
178
+ #if (UNITY_POINTER_WIDTH == 32)
179
+ typedef _UU32 _UP;
180
+ #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX32
181
+ #elif (UNITY_POINTER_WIDTH == 64)
182
+ typedef _UU64 _UP;
183
+ #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX64
184
+ #elif (UNITY_POINTER_WIDTH == 16)
185
+ typedef _UU16 _UP;
186
+ #define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX16
187
+ #else
188
+ #error Invalid UNITY_POINTER_WIDTH specified! (16, 32 or 64 are supported)
189
+ #endif
190
+
191
+ #ifndef UNITY_PTR_ATTRIBUTE
192
+ #define UNITY_PTR_ATTRIBUTE
193
+ #endif
194
+
195
+ #ifndef UNITY_INTERNAL_PTR
196
+ #define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const void*
197
+ //#define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const _UU8*
198
+ #endif
199
+
200
+ //-------------------------------------------------------
201
+ // Float Support
202
+ //-------------------------------------------------------
203
+
204
+ #ifdef UNITY_EXCLUDE_FLOAT
205
+
206
+ //No Floating Point Support
207
+ #undef UNITY_INCLUDE_FLOAT
208
+ #undef UNITY_FLOAT_PRECISION
209
+ #undef UNITY_FLOAT_TYPE
210
+ #undef UNITY_FLOAT_VERBOSE
211
+
212
+ #else
213
+
214
+ #ifndef UNITY_INCLUDE_FLOAT
215
+ #define UNITY_INCLUDE_FLOAT
216
+ #endif
217
+
218
+ //Floating Point Support
219
+ #ifndef UNITY_FLOAT_PRECISION
220
+ #define UNITY_FLOAT_PRECISION (0.00001f)
221
+ #endif
222
+ #ifndef UNITY_FLOAT_TYPE
223
+ #define UNITY_FLOAT_TYPE float
224
+ #endif
225
+ typedef UNITY_FLOAT_TYPE _UF;
226
+
227
+ #ifndef isinf
228
+ #define isinf(n) (((1.0f / f_zero) == n) ? 1 : 0) || (((-1.0f / f_zero) == n) ? 1 : 0)
229
+ #define UNITY_FLOAT_NEEDS_ZERO
230
+ #endif
231
+
232
+ #ifndef isnan
233
+ #define isnan(n) ((n != n) ? 1 : 0)
234
+ #endif
235
+
236
+ #ifndef isneg
237
+ #define isneg(n) ((n < 0.0f) ? 1 : 0)
238
+ #endif
239
+
240
+ #ifndef ispos
241
+ #define ispos(n) ((n > 0.0f) ? 1 : 0)
242
+ #endif
243
+
244
+ #endif
245
+
246
+ //-------------------------------------------------------
247
+ // Double Float Support
248
+ //-------------------------------------------------------
249
+
250
+ //unlike FLOAT, we DON'T include by default
251
+ #ifndef UNITY_EXCLUDE_DOUBLE
252
+ #ifndef UNITY_INCLUDE_DOUBLE
253
+ #define UNITY_EXCLUDE_DOUBLE
254
+ #endif
255
+ #endif
256
+
257
+ #ifdef UNITY_EXCLUDE_DOUBLE
258
+
259
+ //No Floating Point Support
260
+ #undef UNITY_DOUBLE_PRECISION
261
+ #undef UNITY_DOUBLE_TYPE
262
+ #undef UNITY_DOUBLE_VERBOSE
263
+
264
+ #ifdef UNITY_INCLUDE_DOUBLE
265
+ #undef UNITY_INCLUDE_DOUBLE
266
+ #endif
267
+
268
+ #else
269
+
270
+ //Double Floating Point Support
271
+ #ifndef UNITY_DOUBLE_PRECISION
272
+ #define UNITY_DOUBLE_PRECISION (1e-12f)
273
+ #endif
274
+ #ifndef UNITY_DOUBLE_TYPE
275
+ #define UNITY_DOUBLE_TYPE double
276
+ #endif
277
+ typedef UNITY_DOUBLE_TYPE _UD;
278
+
279
+ #endif
280
+
281
+ #ifdef UNITY_DOUBLE_VERBOSE
282
+ #ifndef UNITY_FLOAT_VERBOSE
283
+ #define UNITY_FLOAT_VERBOSE
284
+ #endif
285
+ #endif
286
+
287
+ //-------------------------------------------------------
288
+ // Output Method: stdout (DEFAULT)
289
+ //-------------------------------------------------------
290
+ #ifndef UNITY_OUTPUT_CHAR
291
+ //Default to using putchar, which is defined in stdio.h
292
+ #include <stdio.h>
293
+ #define UNITY_OUTPUT_CHAR(a) putchar(a)
294
+ #else
295
+ //If defined as something else, make sure we declare it here so it's ready for use
296
+ extern int UNITY_OUTPUT_CHAR(int);
297
+ #endif
298
+
299
+ #ifndef UNITY_PRINT_EOL
300
+ #define UNITY_PRINT_EOL() UNITY_OUTPUT_CHAR('\n')
301
+ #endif
302
+
303
+ #ifndef UNITY_OUTPUT_START
304
+ #define UNITY_OUTPUT_START()
305
+ #endif
306
+
307
+ #ifndef UNITY_OUTPUT_COMPLETE
308
+ #define UNITY_OUTPUT_COMPLETE()
309
+ #endif
310
+
311
+ //-------------------------------------------------------
312
+ // Footprint
313
+ //-------------------------------------------------------
314
+
315
+ #ifndef UNITY_LINE_TYPE
316
+ #define UNITY_LINE_TYPE _U_UINT
317
+ #endif
318
+
319
+ #ifndef UNITY_COUNTER_TYPE
320
+ #define UNITY_COUNTER_TYPE _U_UINT
321
+ #endif
322
+
323
+ //-------------------------------------------------------
324
+ // Language Features Available
325
+ //-------------------------------------------------------
326
+ #if !defined(UNITY_WEAK_ATTRIBUTE) && !defined(UNITY_WEAK_PRAGMA)
327
+ # ifdef __GNUC__ // includes clang
328
+ # if !(defined(__WIN32__) && defined(__clang__))
329
+ # define UNITY_WEAK_ATTRIBUTE __attribute__((weak))
330
+ # endif
331
+ # endif
332
+ #endif
333
+
334
+ #ifdef UNITY_NO_WEAK
335
+ # undef UNITY_WEAK_ATTRIBUTE
336
+ # undef UNITY_WEAK_PRAGMA
337
+ #endif
338
+
339
+
340
+ //-------------------------------------------------------
341
+ // Internal Structs Needed
342
+ //-------------------------------------------------------
343
+
344
+ typedef void (*UnityTestFunction)(void);
345
+
346
+ #define UNITY_DISPLAY_RANGE_INT (0x10)
347
+ #define UNITY_DISPLAY_RANGE_UINT (0x20)
348
+ #define UNITY_DISPLAY_RANGE_HEX (0x40)
349
+ #define UNITY_DISPLAY_RANGE_AUTO (0x80)
350
+
351
+ typedef enum
352
+ {
353
+ #if (UNITY_INT_WIDTH == 16)
354
+ UNITY_DISPLAY_STYLE_INT = 2 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
355
+ #elif (UNITY_INT_WIDTH == 32)
356
+ UNITY_DISPLAY_STYLE_INT = 4 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
357
+ #elif (UNITY_INT_WIDTH == 64)
358
+ UNITY_DISPLAY_STYLE_INT = 8 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
359
+ #endif
360
+ UNITY_DISPLAY_STYLE_INT8 = 1 + UNITY_DISPLAY_RANGE_INT,
361
+ UNITY_DISPLAY_STYLE_INT16 = 2 + UNITY_DISPLAY_RANGE_INT,
362
+ UNITY_DISPLAY_STYLE_INT32 = 4 + UNITY_DISPLAY_RANGE_INT,
363
+ #ifdef UNITY_SUPPORT_64
364
+ UNITY_DISPLAY_STYLE_INT64 = 8 + UNITY_DISPLAY_RANGE_INT,
365
+ #endif
366
+
367
+ #if (UNITY_INT_WIDTH == 16)
368
+ UNITY_DISPLAY_STYLE_UINT = 2 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
369
+ #elif (UNITY_INT_WIDTH == 32)
370
+ UNITY_DISPLAY_STYLE_UINT = 4 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
371
+ #elif (UNITY_INT_WIDTH == 64)
372
+ UNITY_DISPLAY_STYLE_UINT = 8 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
373
+ #endif
374
+ UNITY_DISPLAY_STYLE_UINT8 = 1 + UNITY_DISPLAY_RANGE_UINT,
375
+ UNITY_DISPLAY_STYLE_UINT16 = 2 + UNITY_DISPLAY_RANGE_UINT,
376
+ UNITY_DISPLAY_STYLE_UINT32 = 4 + UNITY_DISPLAY_RANGE_UINT,
377
+ #ifdef UNITY_SUPPORT_64
378
+ UNITY_DISPLAY_STYLE_UINT64 = 8 + UNITY_DISPLAY_RANGE_UINT,
379
+ #endif
380
+ UNITY_DISPLAY_STYLE_HEX8 = 1 + UNITY_DISPLAY_RANGE_HEX,
381
+ UNITY_DISPLAY_STYLE_HEX16 = 2 + UNITY_DISPLAY_RANGE_HEX,
382
+ UNITY_DISPLAY_STYLE_HEX32 = 4 + UNITY_DISPLAY_RANGE_HEX,
383
+ #ifdef UNITY_SUPPORT_64
384
+ UNITY_DISPLAY_STYLE_HEX64 = 8 + UNITY_DISPLAY_RANGE_HEX,
385
+ #endif
386
+ UNITY_DISPLAY_STYLE_UNKNOWN
387
+ } UNITY_DISPLAY_STYLE_T;
388
+
389
+ #ifndef UNITY_EXCLUDE_FLOAT
390
+ typedef enum _UNITY_FLOAT_TRAIT_T
391
+ {
392
+ UNITY_FLOAT_IS_NOT_INF = 0,
393
+ UNITY_FLOAT_IS_INF,
394
+ UNITY_FLOAT_IS_NOT_NEG_INF,
395
+ UNITY_FLOAT_IS_NEG_INF,
396
+ UNITY_FLOAT_IS_NOT_NAN,
397
+ UNITY_FLOAT_IS_NAN,
398
+ UNITY_FLOAT_IS_NOT_DET,
399
+ UNITY_FLOAT_IS_DET,
400
+ } UNITY_FLOAT_TRAIT_T;
401
+ #endif
402
+
403
+ struct _Unity
404
+ {
405
+ const char* TestFile;
406
+ const char* CurrentTestName;
407
+ #ifndef UNITY_EXCLUDE_DETAILS
408
+ const char* CurrentDetail1;
409
+ const char* CurrentDetail2;
410
+ #endif
411
+ UNITY_LINE_TYPE CurrentTestLineNumber;
412
+ UNITY_COUNTER_TYPE NumberOfTests;
413
+ UNITY_COUNTER_TYPE TestFailures;
414
+ UNITY_COUNTER_TYPE TestIgnores;
415
+ UNITY_COUNTER_TYPE CurrentTestFailed;
416
+ UNITY_COUNTER_TYPE CurrentTestIgnored;
417
+ jmp_buf AbortFrame;
418
+ };
419
+
420
+ extern struct _Unity Unity;
421
+
422
+ //-------------------------------------------------------
423
+ // Test Suite Management
424
+ //-------------------------------------------------------
425
+
426
+ void UnityBegin(const char* filename);
427
+ int UnityEnd(void);
428
+ void UnityConcludeTest(void);
429
+ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum);
430
+
431
+ //-------------------------------------------------------
432
+ // Details Support
433
+ //-------------------------------------------------------
434
+
435
+ #ifdef UNITY_EXCLUDE_DETAILS
436
+ #define UNITY_CLR_DETAILS()
437
+ #define UNITY_SET_DETAIL(d1)
438
+ #define UNITY_SET_DETAILS(d1,d2)
439
+ #else
440
+ #define UNITY_CLR_DETAILS() { Unity.CurrentDetail1 = 0; Unity.CurrentDetail2 = 0; }
441
+ #define UNITY_SET_DETAIL(d1) { Unity.CurrentDetail1 = d1; Unity.CurrentDetail2 = 0; }
442
+ #define UNITY_SET_DETAILS(d1,d2) { Unity.CurrentDetail1 = d1; Unity.CurrentDetail2 = d2; }
443
+
444
+ #ifndef UNITY_DETAIL1_NAME
445
+ #define UNITY_DETAIL1_NAME "Function"
446
+ #endif
447
+
448
+ #ifndef UNITY_DETAIL2_NAME
449
+ #define UNITY_DETAIL2_NAME "Argument"
450
+ #endif
451
+ #endif
452
+
453
+ //-------------------------------------------------------
454
+ // Test Output
455
+ //-------------------------------------------------------
456
+
457
+ void UnityPrint(const char* string);
458
+ void UnityPrintMask(const _U_UINT mask, const _U_UINT number);
459
+ void UnityPrintNumberByStyle(const _U_SINT number, const UNITY_DISPLAY_STYLE_T style);
460
+ void UnityPrintNumber(const _U_SINT number);
461
+ void UnityPrintNumberUnsigned(const _U_UINT number);
462
+ void UnityPrintNumberHex(const _U_UINT number, const char nibbles);
463
+
464
+ #ifdef UNITY_FLOAT_VERBOSE
465
+ void UnityPrintFloat(const _UF number);
466
+ #endif
467
+
468
+ //-------------------------------------------------------
469
+ // Test Assertion Fuctions
470
+ //-------------------------------------------------------
471
+ // Use the macros below this section instead of calling
472
+ // these directly. The macros have a consistent naming
473
+ // convention and will pull in file and line information
474
+ // for you.
475
+
476
+ void UnityAssertEqualNumber(const _U_SINT expected,
477
+ const _U_SINT actual,
478
+ const char* msg,
479
+ const UNITY_LINE_TYPE lineNumber,
480
+ const UNITY_DISPLAY_STYLE_T style);
481
+
482
+ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
483
+ UNITY_INTERNAL_PTR actual,
484
+ const _UU32 num_elements,
485
+ const char* msg,
486
+ const UNITY_LINE_TYPE lineNumber,
487
+ const UNITY_DISPLAY_STYLE_T style);
488
+
489
+ void UnityAssertBits(const _U_SINT mask,
490
+ const _U_SINT expected,
491
+ const _U_SINT actual,
492
+ const char* msg,
493
+ const UNITY_LINE_TYPE lineNumber);
494
+
495
+ void UnityAssertEqualString(const char* expected,
496
+ const char* actual,
497
+ const char* msg,
498
+ const UNITY_LINE_TYPE lineNumber);
499
+
500
+ void UnityAssertEqualStringLen(const char* expected,
501
+ const char* actual,
502
+ const _UU32 length,
503
+ const char* msg,
504
+ const UNITY_LINE_TYPE lineNumber);
505
+
506
+ void UnityAssertEqualStringArray( const char** expected,
507
+ const char** actual,
508
+ const _UU32 num_elements,
509
+ const char* msg,
510
+ const UNITY_LINE_TYPE lineNumber);
511
+
512
+ void UnityAssertEqualMemory( UNITY_INTERNAL_PTR expected,
513
+ UNITY_INTERNAL_PTR actual,
514
+ const _UU32 length,
515
+ const _UU32 num_elements,
516
+ const char* msg,
517
+ const UNITY_LINE_TYPE lineNumber);
518
+
519
+ void UnityAssertNumbersWithin(const _U_UINT delta,
520
+ const _U_SINT expected,
521
+ const _U_SINT actual,
522
+ const char* msg,
523
+ const UNITY_LINE_TYPE lineNumber,
524
+ const UNITY_DISPLAY_STYLE_T style);
525
+
526
+ void UnityFail(const char* message, const UNITY_LINE_TYPE line);
527
+
528
+ void UnityIgnore(const char* message, const UNITY_LINE_TYPE line);
529
+
530
+ #ifndef UNITY_EXCLUDE_FLOAT
531
+ void UnityAssertFloatsWithin(const _UF delta,
532
+ const _UF expected,
533
+ const _UF actual,
534
+ const char* msg,
535
+ const UNITY_LINE_TYPE lineNumber);
536
+
537
+ void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const _UF* expected,
538
+ UNITY_PTR_ATTRIBUTE const _UF* actual,
539
+ const _UU32 num_elements,
540
+ const char* msg,
541
+ const UNITY_LINE_TYPE lineNumber);
542
+
543
+ void UnityAssertFloatSpecial(const _UF actual,
544
+ const char* msg,
545
+ const UNITY_LINE_TYPE lineNumber,
546
+ const UNITY_FLOAT_TRAIT_T style);
547
+ #endif
548
+
549
+ #ifndef UNITY_EXCLUDE_DOUBLE
550
+ void UnityAssertDoublesWithin(const _UD delta,
551
+ const _UD expected,
552
+ const _UD actual,
553
+ const char* msg,
554
+ const UNITY_LINE_TYPE lineNumber);
555
+
556
+ void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const _UD* expected,
557
+ UNITY_PTR_ATTRIBUTE const _UD* actual,
558
+ const _UU32 num_elements,
559
+ const char* msg,
560
+ const UNITY_LINE_TYPE lineNumber);
561
+
562
+ void UnityAssertDoubleSpecial(const _UD actual,
563
+ const char* msg,
564
+ const UNITY_LINE_TYPE lineNumber,
565
+ const UNITY_FLOAT_TRAIT_T style);
566
+ #endif
567
+
568
+ //-------------------------------------------------------
569
+ // Error Strings We Might Need
570
+ //-------------------------------------------------------
571
+
572
+ extern const char UnityStrErrFloat[];
573
+ extern const char UnityStrErrDouble[];
574
+ extern const char UnityStrErr64[];
575
+
576
+ //-------------------------------------------------------
577
+ // Test Running Macros
578
+ //-------------------------------------------------------
579
+
580
+ #define TEST_PROTECT() (setjmp(Unity.AbortFrame) == 0)
581
+
582
+ #define TEST_ABORT() {longjmp(Unity.AbortFrame, 1);}
583
+
584
+ //This tricky series of macros gives us an optional line argument to treat it as RUN_TEST(func, num=__LINE__)
585
+ #ifndef RUN_TEST
586
+ #ifdef __STDC_VERSION__
587
+ #if __STDC_VERSION__ >= 199901L
588
+ #define RUN_TEST(...) UnityDefaultTestRun(RUN_TEST_FIRST(__VA_ARGS__), RUN_TEST_SECOND(__VA_ARGS__))
589
+ #define RUN_TEST_FIRST(...) RUN_TEST_FIRST_HELPER(__VA_ARGS__, throwaway)
590
+ #define RUN_TEST_FIRST_HELPER(first, ...) (first), #first
591
+ #define RUN_TEST_SECOND(...) RUN_TEST_SECOND_HELPER(__VA_ARGS__, __LINE__, throwaway)
592
+ #define RUN_TEST_SECOND_HELPER(first, second, ...) (second)
593
+ #endif
594
+ #endif
595
+ #endif
596
+
597
+ //If we can't do the tricky version, we'll just have to require them to always include the line number
598
+ #ifndef RUN_TEST
599
+ #ifdef CMOCK
600
+ #define RUN_TEST(func, num) UnityDefaultTestRun(func, #func, num)
601
+ #else
602
+ #define RUN_TEST(func) UnityDefaultTestRun(func, #func, __LINE__)
603
+ #endif
604
+ #endif
605
+
606
+ #define TEST_LINE_NUM (Unity.CurrentTestLineNumber)
607
+ #define TEST_IS_IGNORED (Unity.CurrentTestIgnored)
608
+ #define UNITY_NEW_TEST(a) \
609
+ Unity.CurrentTestName = (a); \
610
+ Unity.CurrentTestLineNumber = (UNITY_LINE_TYPE)(__LINE__); \
611
+ Unity.NumberOfTests++;
612
+
613
+ #ifndef UNITY_BEGIN
614
+ #define UNITY_BEGIN() UnityBegin(__FILE__)
615
+ #endif
616
+
617
+ #ifndef UNITY_END
618
+ #define UNITY_END() UnityEnd()
619
+ #endif
620
+
621
+ #define UNITY_UNUSED(x) (void)(sizeof(x))
622
+
623
+ //-------------------------------------------------------
624
+ // Basic Fail and Ignore
625
+ //-------------------------------------------------------
626
+
627
+ #define UNITY_TEST_FAIL(line, message) UnityFail( (message), (UNITY_LINE_TYPE)(line))
628
+ #define UNITY_TEST_IGNORE(line, message) UnityIgnore( (message), (UNITY_LINE_TYPE)(line))
629
+
630
+ //-------------------------------------------------------
631
+ // Test Asserts
632
+ //-------------------------------------------------------
633
+
634
+ #define UNITY_TEST_ASSERT(condition, line, message) if (condition) {} else {UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), (message));}
635
+ #define UNITY_TEST_ASSERT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) == NULL), (UNITY_LINE_TYPE)(line), (message))
636
+ #define UNITY_TEST_ASSERT_NOT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) != NULL), (UNITY_LINE_TYPE)(line), (message))
637
+
638
+ #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)
639
+ #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_INT8)
640
+ #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_INT16)
641
+ #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_INT32)
642
+ #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)
643
+ #define UNITY_TEST_ASSERT_EQUAL_UINT8(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_UU8 )(expected), (_U_SINT)(_UU8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
644
+ #define UNITY_TEST_ASSERT_EQUAL_UINT16(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_UU16)(expected), (_U_SINT)(_UU16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
645
+ #define UNITY_TEST_ASSERT_EQUAL_UINT32(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_UU32)(expected), (_U_SINT)(_UU32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
646
+ #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)
647
+ #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)
648
+ #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)
649
+ #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))
650
+
651
+ #define UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
652
+ #define UNITY_TEST_ASSERT_INT8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_UU8 )(delta), (_U_SINT)(_US8 )(expected), (_U_SINT)(_US8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
653
+ #define UNITY_TEST_ASSERT_INT16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_UU16)(delta), (_U_SINT)(_US16)(expected), (_U_SINT)(_US16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
654
+ #define UNITY_TEST_ASSERT_INT32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_UU32)(delta), (_U_SINT)(_US32)(expected), (_U_SINT)(_US32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
655
+ #define UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
656
+ #define UNITY_TEST_ASSERT_UINT8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_UU8 )(delta), (_U_SINT)(_U_UINT)(_UU8 )(expected), (_U_SINT)(_U_UINT)(_UU8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
657
+ #define UNITY_TEST_ASSERT_UINT16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_UU16)(delta), (_U_SINT)(_U_UINT)(_UU16)(expected), (_U_SINT)(_U_UINT)(_UU16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
658
+ #define UNITY_TEST_ASSERT_UINT32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_UU32)(delta), (_U_SINT)(_U_UINT)(_UU32)(expected), (_U_SINT)(_U_UINT)(_UU32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
659
+ #define UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_UU8 )(delta), (_U_SINT)(_U_UINT)(_UU8 )(expected), (_U_SINT)(_U_UINT)(_UU8 )(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
660
+ #define UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_UU16)(delta), (_U_SINT)(_U_UINT)(_UU16)(expected), (_U_SINT)(_U_UINT)(_UU16)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
661
+ #define UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_UU32)(delta), (_U_SINT)(_U_UINT)(_UU32)(expected), (_U_SINT)(_U_UINT)(_UU32)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
662
+
663
+ #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)
664
+ #define UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, line, message) UnityAssertEqualString((const char*)(expected), (const char*)(actual), (message), (UNITY_LINE_TYPE)(line))
665
+ #define UNITY_TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len, line, message) UnityAssertEqualStringLen((const char*)(expected), (const char*)(actual), (_UU32)(len), (message), (UNITY_LINE_TYPE)(line))
666
+ #define UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(len), 1, (message), (UNITY_LINE_TYPE)(line))
667
+
668
+ #define UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
669
+ #define UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
670
+ #define UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
671
+ #define UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
672
+ #define UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
673
+ #define UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
674
+ #define UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
675
+ #define UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
676
+ #define UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
677
+ #define UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
678
+ #define UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
679
+ #define UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(_UP*)(expected), (UNITY_INTERNAL_PTR)(_UP*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER)
680
+ #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))
681
+ #define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(len), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line))
682
+
683
+ #ifdef UNITY_SUPPORT_64
684
+ #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)
685
+ #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)
686
+ #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)
687
+ #define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
688
+ #define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
689
+ #define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
690
+ #define UNITY_TEST_ASSERT_INT64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
691
+ #define UNITY_TEST_ASSERT_UINT64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
692
+ #define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((delta), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
693
+ #else
694
+ #define UNITY_TEST_ASSERT_EQUAL_INT64(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
695
+ #define UNITY_TEST_ASSERT_EQUAL_UINT64(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
696
+ #define UNITY_TEST_ASSERT_EQUAL_HEX64(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
697
+ #define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
698
+ #define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
699
+ #define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
700
+ #define UNITY_TEST_ASSERT_INT64_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
701
+ #define UNITY_TEST_ASSERT_UINT64_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
702
+ #define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
703
+ #endif
704
+
705
+ #ifdef UNITY_EXCLUDE_FLOAT
706
+ #define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
707
+ #define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
708
+ #define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
709
+ #define UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
710
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
711
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
712
+ #define UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
713
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
714
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
715
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
716
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
717
+ #else
718
+ #define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UnityAssertFloatsWithin((_UF)(delta), (_UF)(expected), (_UF)(actual), (message), (UNITY_LINE_TYPE)(line))
719
+ #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))
720
+ #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))
721
+ #define UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_INF)
722
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NEG_INF)
723
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NAN)
724
+ #define UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_DET)
725
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_INF)
726
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NEG_INF)
727
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NAN)
728
+ #define UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual, line, message) UnityAssertFloatSpecial((_UF)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET)
729
+ #endif
730
+
731
+ #ifdef UNITY_EXCLUDE_DOUBLE
732
+ #define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
733
+ #define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
734
+ #define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
735
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
736
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
737
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
738
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
739
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
740
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
741
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
742
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
743
+ #else
744
+ #define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UnityAssertDoublesWithin((_UD)(delta), (_UD)(expected), (_UD)(actual), (message), (UNITY_LINE_TYPE)line)
745
+ #define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((_UD)(expected) * (_UD)UNITY_DOUBLE_PRECISION, (_UD)expected, (_UD)actual, (UNITY_LINE_TYPE)(line), message)
746
+ #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)
747
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_INF)
748
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NEG_INF)
749
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NAN)
750
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_DET)
751
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_INF)
752
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NEG_INF)
753
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NAN)
754
+ #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET)
755
+ #endif
756
+
757
+ //End of UNITY_INTERNALS_H
758
+ #endif