ceedling 0.19.0 → 0.20.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +10 -10
- data/bin/ceedling +205 -92
- data/ceedling-0.19.0.gem +0 -0
- data/config/test_environment.rb +12 -12
- data/docs/CeedlingPacket.md +866 -853
- data/docs/CeedlingPacket.odt +0 -0
- data/docs/CeedlingPacket.pdf +0 -0
- data/examples/temp_sensor/rakefile.rb +4 -4
- data/examples/temp_sensor/src/AdcConductor.c +42 -42
- data/examples/temp_sensor/src/AdcConductor.h +13 -13
- data/examples/temp_sensor/src/AdcHardware.c +27 -27
- data/examples/temp_sensor/src/AdcHardware.h +11 -11
- data/examples/temp_sensor/src/AdcHardwareConfigurator.c +18 -18
- data/examples/temp_sensor/src/AdcHardwareConfigurator.h +10 -10
- data/examples/temp_sensor/src/AdcModel.c +33 -33
- data/examples/temp_sensor/src/AdcModel.h +13 -13
- data/examples/temp_sensor/src/AdcTemperatureSensor.c +51 -51
- data/examples/temp_sensor/src/AdcTemperatureSensor.h +10 -10
- data/examples/temp_sensor/src/Executor.c +25 -25
- data/examples/temp_sensor/src/Executor.h +9 -9
- data/examples/temp_sensor/src/IntrinsicsWrapper.c +18 -18
- data/examples/temp_sensor/src/IntrinsicsWrapper.h +7 -7
- data/examples/temp_sensor/src/Main.c +46 -46
- data/examples/temp_sensor/src/Main.h +7 -7
- data/examples/temp_sensor/src/Model.c +10 -10
- data/examples/temp_sensor/src/Model.h +8 -8
- data/examples/temp_sensor/src/ModelConfig.h +7 -7
- data/examples/temp_sensor/src/TaskScheduler.c +72 -72
- data/examples/temp_sensor/src/TaskScheduler.h +11 -11
- data/examples/temp_sensor/src/TemperatureCalculator.c +27 -27
- data/examples/temp_sensor/src/TemperatureCalculator.h +8 -8
- data/examples/temp_sensor/src/TemperatureFilter.c +38 -38
- data/examples/temp_sensor/src/TemperatureFilter.h +10 -10
- data/examples/temp_sensor/src/TimerConductor.c +15 -15
- data/examples/temp_sensor/src/TimerConductor.h +9 -9
- data/examples/temp_sensor/src/TimerConfigurator.c +51 -51
- data/examples/temp_sensor/src/TimerConfigurator.h +15 -15
- data/examples/temp_sensor/src/TimerHardware.c +15 -15
- data/examples/temp_sensor/src/TimerHardware.h +8 -8
- data/examples/temp_sensor/src/TimerInterruptConfigurator.c +55 -55
- data/examples/temp_sensor/src/TimerInterruptConfigurator.h +13 -13
- data/examples/temp_sensor/src/TimerInterruptHandler.c +25 -25
- data/examples/temp_sensor/src/TimerInterruptHandler.h +10 -10
- data/examples/temp_sensor/src/TimerModel.c +9 -9
- data/examples/temp_sensor/src/TimerModel.h +8 -8
- data/examples/temp_sensor/src/Types.h +90 -90
- data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +18 -18
- data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +8 -8
- data/examples/temp_sensor/src/UsartConductor.c +21 -21
- data/examples/temp_sensor/src/UsartConductor.h +7 -7
- data/examples/temp_sensor/src/UsartConfigurator.c +39 -39
- data/examples/temp_sensor/src/UsartConfigurator.h +13 -13
- data/examples/temp_sensor/src/UsartHardware.c +22 -22
- data/examples/temp_sensor/src/UsartHardware.h +9 -9
- data/examples/temp_sensor/src/UsartModel.c +34 -34
- data/examples/temp_sensor/src/UsartModel.h +10 -10
- data/examples/temp_sensor/src/UsartPutChar.c +16 -16
- data/examples/temp_sensor/src/UsartPutChar.h +8 -8
- data/examples/temp_sensor/src/UsartTransmitBufferStatus.c +7 -7
- data/examples/temp_sensor/src/UsartTransmitBufferStatus.h +8 -8
- data/examples/temp_sensor/test/TestAdcConductor.c +121 -121
- data/examples/temp_sensor/test/TestAdcHardware.c +44 -44
- data/examples/temp_sensor/test/TestAdcModel.c +33 -33
- data/examples/temp_sensor/test/TestExecutor.c +36 -36
- data/examples/temp_sensor/test/TestMain.c +24 -24
- data/examples/temp_sensor/test/TestModel.c +20 -20
- data/examples/temp_sensor/test/TestTaskScheduler.c +104 -104
- data/examples/temp_sensor/test/TestTemperatureCalculator.c +33 -33
- data/examples/temp_sensor/test/TestTemperatureFilter.c +79 -79
- data/examples/temp_sensor/test/TestTimerConductor.c +32 -32
- data/examples/temp_sensor/test/TestTimerHardware.c +26 -26
- data/examples/temp_sensor/test/TestTimerModel.c +18 -18
- data/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +21 -21
- data/examples/temp_sensor/test/TestUsartConductor.c +40 -40
- data/examples/temp_sensor/test/TestUsartHardware.c +36 -36
- data/examples/temp_sensor/test/TestUsartModel.c +36 -36
- data/examples/temp_sensor/test/support/UnityHelper.c +12 -12
- data/examples/temp_sensor/test/support/UnityHelper.h +12 -12
- data/lib/ceedling/configurator_builder.rb +1 -1
- data/lib/ceedling/tasks_base.rake +10 -2
- data/lib/ceedling/tool_executor.rb +3 -0
- data/lib/ceedling/version.rb +3 -3
- data/license.txt +1 -1
- data/plugins/bullseye/bullseye.rake +162 -162
- data/plugins/gcov/gcov.rake +152 -152
- data/plugins/module_generator/lib/module_generator.rb +145 -145
- data/plugins/module_generator/module_generator.rake +14 -14
- data/plugins/stdout_gtestlike_tests_report/assets/template.erb +84 -0
- data/plugins/stdout_gtestlike_tests_report/assets/template.erb copy +59 -0
- data/plugins/stdout_gtestlike_tests_report/config/stdout_gtestlike_tests_report.yml +4 -0
- data/plugins/stdout_gtestlike_tests_report/lib/stdout_gtestlike_tests_report.rb +43 -0
- data/spec/system/deployment_spec.rb +0 -1
- data/test_graveyard/integration/paths_test.rb +80 -80
- data/test_graveyard/integration/rake_rules_aux_dependencies_test.rb +75 -75
- data/test_graveyard/integration/rake_rules_cmock_test.rb +74 -74
- data/test_graveyard/integration/rake_rules_preprocess_test.rb +178 -178
- data/test_graveyard/integration/rake_rules_test.rb +268 -268
- data/test_graveyard/integration/rake_tasks_test.rb +103 -103
- data/test_graveyard/integration_test_helper.rb +34 -34
- data/test_graveyard/rakefile_rules.rb +10 -10
- data/test_graveyard/rakefile_rules_aux_dependencies.rb +10 -10
- data/test_graveyard/rakefile_rules_cmock.rb +10 -10
- data/test_graveyard/rakefile_rules_preprocess.rb +10 -10
- data/test_graveyard/rakefile_tasks.rb +10 -10
- data/test_graveyard/system/file_system_test.rb +78 -78
- data/test_graveyard/system/project_mocks_test.rb +38 -38
- data/test_graveyard/system/project_simple_test.rb +39 -39
- data/test_graveyard/system/rule_mocks_test.rb +44 -44
- data/test_graveyard/system/rule_runners_test.rb +44 -44
- data/test_graveyard/system_test_helper.rb +73 -73
- data/test_graveyard/test_helper.rb +93 -93
- data/test_graveyard/unit/busted/configurator_builder_test.rb +569 -569
- data/test_graveyard/unit/busted/configurator_helper_test.rb +234 -234
- data/test_graveyard/unit/busted/configurator_test.rb +232 -232
- data/test_graveyard/unit/busted/configurator_validator_test.rb +169 -169
- data/test_graveyard/unit/busted/deep_merge_fix_test.rb +55 -55
- data/test_graveyard/unit/busted/dependinator_test.rb +129 -129
- data/test_graveyard/unit/busted/file_finder_helper_test.rb +45 -45
- data/test_graveyard/unit/busted/file_finder_test.rb +114 -114
- data/test_graveyard/unit/busted/file_path_utils_test.rb +97 -97
- data/test_graveyard/unit/busted/file_system_utils_test.rb +21 -21
- data/test_graveyard/unit/busted/generator_test.rb +187 -187
- data/test_graveyard/unit/busted/generator_test_results_test.rb +129 -129
- data/test_graveyard/unit/busted/generator_test_runner_test.rb +475 -475
- data/test_graveyard/unit/busted/preprocessinator_file_handler_test.rb +39 -39
- data/test_graveyard/unit/busted/preprocessinator_helper_test.rb +156 -156
- data/test_graveyard/unit/busted/preprocessinator_includes_handler_test.rb +93 -93
- data/test_graveyard/unit/busted/preprocessinator_test.rb +57 -57
- data/test_graveyard/unit/busted/project_file_loader_test.rb +142 -142
- data/test_graveyard/unit/busted/setupinator_test.rb +45 -45
- data/test_graveyard/unit/busted/streaminator_test.rb +49 -49
- data/test_graveyard/unit/busted/task_invoker_test.rb +69 -69
- data/test_graveyard/unit/busted/test_includes_extractor_test.rb +111 -111
- data/test_graveyard/unit/busted/test_invoker_helper_test.rb +62 -62
- data/test_graveyard/unit/busted/test_invoker_test.rb +47 -47
- data/test_graveyard/unit/busted/tool_executor_helper_test.rb +100 -100
- data/test_graveyard/unit/busted/tool_executor_test.rb +351 -351
- data/test_graveyard/unit/busted/verbosinator_test.rb +65 -65
- data/test_graveyard/unit/preprocessinator_extractor_test.rb +731 -731
- data/test_graveyard/unit_test_helper.rb +16 -16
- data/vendor/c_exception/LICENSE.txt +30 -30
- data/vendor/c_exception/README.md +11 -1
- data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/c_exception/docs/readme.txt +261 -242
- data/vendor/c_exception/lib/CException.c +46 -46
- data/vendor/c_exception/lib/CException.h +110 -86
- data/vendor/c_exception/makefile +23 -23
- data/vendor/c_exception/test/CExceptionConfig.h +46 -46
- data/vendor/c_exception/test/TestException.c +391 -342
- data/vendor/c_exception/test/TestException_Runner.c +5 -12
- data/vendor/c_exception/vendor/unity/README.md +211 -0
- data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +1 -1
- data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +38 -38
- data/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -36
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +202 -202
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +391 -320
- data/vendor/c_exception/vendor/unity/auto/parseOutput.rb +2 -0
- data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +260 -0
- data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +8 -0
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +135 -0
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +148 -139
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +224 -216
- data/vendor/c_exception/vendor/unity/docs/license.txt +21 -31
- data/vendor/c_exception/vendor/unity/examples/example_1/makefile +40 -15
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +32 -25
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +29 -22
- data/vendor/c_exception/vendor/unity/examples/example_2/makefile +40 -14
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +2 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +2 -2
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +0 -1
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +2 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -37
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +179 -179
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +135 -94
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +13 -17
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -18
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +30 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +60 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +4 -3
- data/vendor/c_exception/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +182 -27
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +13 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +8 -6
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +2 -2
- data/vendor/c_exception/vendor/unity/release/build.info +1 -1
- data/vendor/c_exception/vendor/unity/release/version.info +1 -1
- data/vendor/c_exception/vendor/unity/src/unity.c +1333 -1145
- data/vendor/c_exception/vendor/unity/src/unity.h +290 -307
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +758 -620
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +7 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +7 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +4 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +4 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +4 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +4 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +4 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +9 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +7 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +9 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -3
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +10 -6
- data/vendor/c_exception/vendor/unity/{rakefile.rb → test/rakefile} +60 -61
- data/vendor/c_exception/vendor/unity/{rakefile_helper.rb → test/rakefile_helper.rb} +255 -249
- data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +83 -0
- data/vendor/c_exception/vendor/unity/{targets → test/targets}/clang_strict.yml +83 -83
- data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -0
- data/vendor/c_exception/vendor/unity/{targets/gcc_64.yml → test/targets/gcc_auto_limits.yml} +46 -45
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +47 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +58 -0
- data/vendor/{cmock/vendor/c_exception/vendor/unity/targets/gcc_64.yml → c_exception/vendor/unity/test/targets/gcc_manual_math.yml} +46 -45
- data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/hitech_picc18.yml +101 -101
- data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_arm_v4.yml +89 -89
- data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_arm_v5.yml +79 -79
- data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_arm_v5_3.yml +79 -79
- data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -93
- data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_cortexm3_v5.yml +83 -83
- data/vendor/{cmock/vendor/c_exception/vendor/unity → c_exception/vendor/unity/test}/targets/iar_msp430.yml +94 -94
- data/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_sh2a_v6.yml +85 -85
- data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +51 -51
- data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +8 -8
- data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +68 -51
- data/vendor/{cmock/vendor/c_exception/vendor/unity/test → c_exception/vendor/unity/test/tests}/test_generate_test_runner.rb +102 -88
- data/vendor/{cmock/vendor/c_exception/vendor/unity/test → c_exception/vendor/unity/test/tests}/testparameterized.c +104 -101
- data/vendor/c_exception/vendor/unity/test/{testunity.c → tests/testunity.c} +3682 -3447
- data/vendor/cmock/docs/CMock_Summary.md +3 -0
- data/vendor/cmock/lib/cmock_config.rb +1 -0
- data/vendor/cmock/lib/cmock_file_writer.rb +7 -3
- data/vendor/cmock/lib/cmock_generator.rb +3 -2
- data/vendor/cmock/lib/cmock_header_parser.rb +12 -5
- data/vendor/cmock/release/version.info +1 -1
- data/vendor/cmock/test/system/test_compilation/parsing.h +3 -0
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +7 -0
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +57 -1
- data/vendor/cmock/vendor/c_exception/LICENSE.txt +30 -30
- data/vendor/cmock/vendor/c_exception/README.md +11 -1
- data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/docs/readme.txt +261 -242
- data/vendor/cmock/vendor/c_exception/lib/CException.c +46 -46
- data/vendor/cmock/vendor/c_exception/lib/CException.h +110 -86
- data/vendor/cmock/vendor/c_exception/makefile +23 -23
- data/vendor/cmock/vendor/c_exception/test/CExceptionConfig.h +46 -46
- data/vendor/cmock/vendor/c_exception/test/TestException.c +391 -342
- data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +5 -12
- data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +211 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +38 -38
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -36
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +202 -202
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +391 -320
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parseOutput.rb +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +260 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +8 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +135 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +148 -139
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +224 -216
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/license.txt +21 -31
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +40 -15
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +32 -25
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +29 -22
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +40 -14
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +0 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -37
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +179 -179
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +135 -94
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +13 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -18
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +30 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +60 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +182 -27
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +13 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +8 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/release/build.info +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/release/version.info +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +1333 -1145
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +290 -307
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +758 -620
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +7 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +7 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +4 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +9 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +7 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +9 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +10 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/{rakefile.rb → test/rakefile} +60 -61
- data/vendor/cmock/vendor/c_exception/vendor/unity/{rakefile_helper.rb → test/rakefile_helper.rb} +255 -249
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +83 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/clang_strict.yml +83 -83
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/{targets/gcc_32.yml → test/targets/gcc_auto_limits.yml} +46 -44
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +47 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +58 -0
- data/vendor/{c_exception/vendor/unity/targets/gcc_32.yml → cmock/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml} +46 -44
- data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/hitech_picc18.yml +101 -101
- data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_arm_v4.yml +89 -89
- data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_arm_v5.yml +79 -79
- data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_arm_v5_3.yml +79 -79
- data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_armcortex_LM3S9B92_v5_4.yml +93 -93
- data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_cortexm3_v5.yml +83 -83
- data/vendor/{c_exception/vendor/unity → cmock/vendor/c_exception/vendor/unity/test}/targets/iar_msp430.yml +94 -94
- data/vendor/cmock/vendor/c_exception/vendor/unity/{targets → test/targets}/iar_sh2a_v6.yml +85 -85
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +51 -51
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/sample.yml +8 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testsample.c +68 -51
- data/vendor/{c_exception/vendor/unity/test → cmock/vendor/c_exception/vendor/unity/test/tests}/test_generate_test_runner.rb +102 -88
- data/vendor/{c_exception/vendor/unity/test → cmock/vendor/c_exception/vendor/unity/test/tests}/testparameterized.c +104 -101
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/{testunity.c → tests/testunity.c} +3682 -3447
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +30 -13
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +260 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +96 -93
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +1 -1
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +12 -19
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +18 -17
- data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +66 -5
- data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +2 -1
- data/vendor/cmock/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +187 -27
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +14 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +6 -5
- data/vendor/cmock/vendor/unity/release/version.info +1 -1
- data/vendor/cmock/vendor/unity/src/unity.c +38 -27
- data/vendor/cmock/vendor/unity/src/unity.h +5 -0
- data/vendor/cmock/vendor/unity/src/unity_internals.h +22 -18
- data/vendor/cmock/vendor/unity/test/Makefile +52 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +7 -4
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +6 -4
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +4 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +4 -0
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +1 -1
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_sizeof.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +0 -1
- data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +0 -1
- data/vendor/cmock/vendor/unity/test/testdata/testsample.c +19 -2
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +55 -4
- data/vendor/unity/auto/generate_test_runner.rb +4 -2
- data/vendor/unity/auto/stylize_as_junit.rb +260 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.c +24 -41
- data/vendor/unity/extras/fixture/src/unity_fixture.h +1 -1
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +5 -7
- data/vendor/unity/extras/fixture/test/Makefile +53 -8
- data/vendor/unity/extras/fixture/test/{testunity_fixture.c → template_fixture_tests.c} +0 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +129 -32
- data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +6 -0
- data/vendor/unity/extras/fixture/test/unity_output_Spy.c +4 -4
- data/vendor/unity/release/version.info +1 -1
- data/vendor/unity/src/unity.c +32 -21
- data/vendor/unity/src/unity.h +5 -0
- data/vendor/unity/src/unity_internals.h +7 -3
- data/vendor/unity/test/Makefile +52 -0
- data/vendor/unity/test/expectdata/testsample_cmd.c +4 -0
- data/vendor/unity/test/expectdata/testsample_def.c +4 -0
- data/vendor/unity/test/expectdata/testsample_head1.c +4 -0
- data/vendor/unity/test/expectdata/testsample_head1.h +7 -4
- data/vendor/unity/test/expectdata/testsample_mock_head1.h +6 -4
- data/vendor/unity/test/expectdata/testsample_new1.c +4 -0
- data/vendor/unity/test/expectdata/testsample_new2.c +4 -0
- data/vendor/unity/test/expectdata/testsample_param.c +4 -0
- data/vendor/unity/test/expectdata/testsample_run1.c +4 -0
- data/vendor/unity/test/expectdata/testsample_run2.c +4 -0
- data/vendor/unity/test/expectdata/testsample_yaml.c +4 -0
- data/vendor/unity/test/testdata/testsample.c +19 -2
- data/vendor/unity/test/tests/testunity.c +35 -4
- metadata +75 -52
- data/ceedling-0.18.0.gem +0 -0
- data/docs/CeedlingLogo.png +0 -0
- data/vendor/c_exception/vendor/unity/Gemfile +0 -4
- data/vendor/c_exception/vendor/unity/Gemfile.lock +0 -12
- data/vendor/c_exception/vendor/unity/examples/example_3/makefile +0 -41
- data/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c +0 -46
- data/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c +0 -50
- data/vendor/c_exception/vendor/unity/makefile +0 -37
- data/vendor/cmock/vendor/c_exception/vendor/unity/Gemfile +0 -4
- data/vendor/cmock/vendor/c_exception/vendor/unity/Gemfile.lock +0 -12
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/makefile +0 -41
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode2_Runner.c +0 -46
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/no_ruby/TestProductionCode_Runner.c +0 -50
- 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
|
-
#
|
11
|
-
#include
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
//
|
20
|
-
|
21
|
-
#
|
22
|
-
#
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
#
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
//
|
52
|
-
|
53
|
-
|
54
|
-
#
|
55
|
-
|
56
|
-
#
|
57
|
-
#define
|
58
|
-
#elif (
|
59
|
-
#define
|
60
|
-
#
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
#
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
#
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
#
|
89
|
-
#
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
#
|
103
|
-
#
|
104
|
-
|
105
|
-
#
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
#
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
#
|
119
|
-
typedef unsigned char _UU8;
|
120
|
-
typedef unsigned
|
121
|
-
typedef unsigned
|
122
|
-
typedef signed char _US8;
|
123
|
-
typedef signed
|
124
|
-
typedef signed
|
125
|
-
#
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
#
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
#
|
143
|
-
|
144
|
-
|
145
|
-
#
|
146
|
-
|
147
|
-
|
148
|
-
#
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
#if (
|
161
|
-
typedef
|
162
|
-
|
163
|
-
#elif (
|
164
|
-
|
165
|
-
|
166
|
-
#
|
167
|
-
|
168
|
-
#
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
#
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
#
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
#
|
185
|
-
|
186
|
-
|
187
|
-
#
|
188
|
-
#
|
189
|
-
#
|
190
|
-
|
191
|
-
#
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
#
|
196
|
-
#
|
197
|
-
|
198
|
-
#
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
#
|
210
|
-
#
|
211
|
-
|
212
|
-
#
|
213
|
-
|
214
|
-
|
215
|
-
#
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
#
|
220
|
-
#
|
221
|
-
|
222
|
-
#
|
223
|
-
#
|
224
|
-
#endif
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
#
|
230
|
-
#
|
231
|
-
|
232
|
-
#ifndef
|
233
|
-
#define
|
234
|
-
#endif
|
235
|
-
|
236
|
-
|
237
|
-
#
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
//
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
#
|
256
|
-
|
257
|
-
#
|
258
|
-
|
259
|
-
|
260
|
-
#
|
261
|
-
#
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
#
|
269
|
-
|
270
|
-
|
271
|
-
#
|
272
|
-
#define
|
273
|
-
#endif
|
274
|
-
|
275
|
-
#
|
276
|
-
#
|
277
|
-
|
278
|
-
|
279
|
-
#
|
280
|
-
|
281
|
-
#
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
#
|
291
|
-
|
292
|
-
#
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
#
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
#
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
#
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
#
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
#
|
327
|
-
|
328
|
-
#
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
#
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
#
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
#
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
void
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
#
|
548
|
-
|
549
|
-
#
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
#endif
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
#
|
581
|
-
|
582
|
-
#define
|
583
|
-
|
584
|
-
|
585
|
-
#
|
586
|
-
#
|
587
|
-
#
|
588
|
-
#define
|
589
|
-
#define
|
590
|
-
#define
|
591
|
-
#define
|
592
|
-
#
|
593
|
-
|
594
|
-
#
|
595
|
-
#
|
596
|
-
|
597
|
-
|
598
|
-
#
|
599
|
-
#
|
600
|
-
#define
|
601
|
-
#
|
602
|
-
#define
|
603
|
-
#
|
604
|
-
#
|
605
|
-
|
606
|
-
#
|
607
|
-
#define
|
608
|
-
#define
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
#
|
614
|
-
#define
|
615
|
-
#
|
616
|
-
|
617
|
-
#
|
618
|
-
#
|
619
|
-
|
620
|
-
|
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
|