ceedling 0.29.1 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Gemfile +15 -16
- data/Gemfile.lock +1 -1
- data/README.md +108 -107
- data/Rakefile +11 -11
- data/assets/ceedling +3 -3
- data/assets/ceedling.cmd +0 -0
- data/assets/default_gitignore +5 -5
- data/assets/example_file.c +5 -5
- data/assets/example_file.h +6 -6
- data/assets/project_as_gem.yml +101 -97
- data/assets/project_with_guts.yml +102 -98
- data/assets/project_with_guts_gcov.yml +102 -98
- data/assets/project_with_guts_gcov_abortonuncovered.yml +93 -0
- data/assets/test_example_file.c +13 -13
- data/assets/test_example_file_boom.c +13 -13
- data/assets/test_example_file_success.c +14 -14
- data/assets/test_example_file_verbose.c +12 -12
- data/assets/uncovered_example_file.c +5 -0
- data/bin/ceedling +351 -339
- data/ceedling.gemspec +52 -36
- data/config/test_environment.rb +11 -11
- data/docs/Ceedling Basic Porting.pdf +0 -0
- data/docs/Ceedling Managing Release Code.pdf +0 -0
- data/docs/Ceedling Powerful Plugins.pdf +0 -0
- data/docs/Ceedling Working with IDEs.pdf +0 -0
- data/docs/CeedlingPacket.md +2213 -2134
- data/docs/CeedlingUpgrade.md +83 -83
- data/docs/ThrowTheSwitchCodingStandard.md +207 -207
- data/examples/blinky/project.yml +99 -99
- data/examples/blinky/rakefile.rb +31 -31
- data/examples/blinky/src/BlinkTask.c +21 -21
- data/examples/blinky/src/BlinkTask.h +6 -6
- data/examples/blinky/src/Configure.c +36 -36
- data/examples/blinky/src/Configure.h +6 -6
- data/examples/blinky/src/main.c +51 -51
- data/examples/blinky/src/main.h +9 -9
- data/examples/blinky/test/support/stub_interrupt.h +347 -347
- data/examples/blinky/test/support/stub_io.h +421 -421
- data/examples/blinky/test/support/stub_iom328p.h +883 -883
- data/examples/blinky/test/support/stub_sfr_defs.h +269 -269
- data/examples/blinky/test/test_BlinkTask.c +42 -42
- data/examples/blinky/test/test_Configure.c +29 -29
- data/examples/blinky/test/test_main.c +60 -60
- data/examples/temp_sensor/project.yml +66 -76
- data/examples/temp_sensor/rakefile.rb +6 -6
- 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 +36 -36
- 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 +40 -40
- data/examples/temp_sensor/test/support/UnityHelper.c +12 -12
- data/examples/temp_sensor/test/support/UnityHelper.h +12 -12
- data/lib/ceedling.rb +99 -99
- data/lib/ceedling/build_invoker_utils.rb +39 -39
- data/lib/ceedling/cacheinator.rb +47 -47
- data/lib/ceedling/cacheinator_helper.rb +35 -31
- data/lib/ceedling/cmock_builder.rb +15 -15
- data/lib/ceedling/configurator.rb +372 -363
- data/lib/ceedling/configurator_builder.rb +463 -458
- data/lib/ceedling/configurator_plugins.rb +111 -111
- data/lib/ceedling/configurator_setup.rb +127 -127
- data/lib/ceedling/configurator_validator.rb +193 -193
- data/lib/ceedling/constants.rb +99 -97
- data/lib/ceedling/defaults.rb +447 -418
- data/lib/ceedling/dependinator.rb +97 -98
- data/lib/ceedling/erb_wrapper.rb +8 -8
- data/lib/ceedling/file_finder.rb +149 -149
- data/lib/ceedling/file_finder_helper.rb +56 -54
- data/lib/ceedling/file_path_utils.rb +202 -200
- data/lib/ceedling/file_system_utils.rb +69 -69
- data/lib/ceedling/file_system_wrapper.rb +9 -9
- data/lib/ceedling/file_wrapper.rb +83 -83
- data/lib/ceedling/flaginator.rb +74 -74
- data/lib/ceedling/generator.rb +186 -183
- data/lib/ceedling/generator_helper.rb +40 -40
- data/lib/ceedling/generator_test_results.rb +100 -100
- data/lib/ceedling/generator_test_results_sanity_checker.rb +65 -65
- data/lib/ceedling/generator_test_runner.rb +58 -56
- data/lib/ceedling/loginator.rb +31 -31
- data/lib/ceedling/makefile.rb +46 -46
- data/lib/ceedling/objects.yml +311 -310
- data/lib/ceedling/par_map.rb +19 -19
- data/lib/ceedling/plugin.rb +80 -80
- data/lib/ceedling/plugin_builder.rb +52 -52
- data/lib/ceedling/plugin_manager.rb +107 -107
- data/lib/ceedling/plugin_manager_helper.rb +19 -19
- data/lib/ceedling/plugin_reportinator.rb +76 -76
- data/lib/ceedling/plugin_reportinator_helper.rb +51 -51
- data/lib/ceedling/preprocessinator.rb +47 -42
- data/lib/ceedling/preprocessinator_extractor.rb +30 -30
- data/lib/ceedling/preprocessinator_file_handler.rb +21 -21
- data/lib/ceedling/preprocessinator_helper.rb +50 -46
- data/lib/ceedling/preprocessinator_includes_handler.rb +181 -181
- data/lib/ceedling/project_config_manager.rb +52 -46
- data/lib/ceedling/project_file_loader.rb +99 -99
- data/lib/ceedling/rake_utils.rb +17 -17
- data/lib/ceedling/rake_wrapper.rb +33 -33
- data/lib/ceedling/rakefile.rb +86 -86
- data/lib/ceedling/release_invoker.rb +98 -73
- data/lib/ceedling/release_invoker_helper.rb +19 -19
- data/lib/ceedling/reportinator.rb +26 -26
- data/lib/ceedling/rules_cmock.rake +9 -9
- data/lib/ceedling/rules_preprocess.rake +26 -26
- data/lib/ceedling/rules_release.rake +99 -86
- data/lib/ceedling/rules_release_deep_dependencies.rake +15 -15
- data/lib/ceedling/rules_tests.rake +73 -74
- data/lib/ceedling/rules_tests_deep_dependencies.rake +15 -15
- data/lib/ceedling/setupinator.rb +53 -53
- data/lib/ceedling/stream_wrapper.rb +28 -28
- data/lib/ceedling/streaminator.rb +40 -40
- data/lib/ceedling/streaminator_helper.rb +15 -15
- data/lib/ceedling/system_utils.rb +37 -37
- data/lib/ceedling/system_wrapper.rb +80 -80
- data/lib/ceedling/target_loader.rb +38 -38
- data/lib/ceedling/task_invoker.rb +122 -117
- data/lib/ceedling/tasks_base.rake +116 -105
- data/lib/ceedling/tasks_filesystem.rake +113 -112
- data/lib/ceedling/tasks_release.rake +30 -30
- data/lib/ceedling/tasks_release_deep_dependencies.rake +9 -9
- data/lib/ceedling/tasks_tests.rake +60 -60
- data/lib/ceedling/tasks_tests_deep_dependencies.rake +9 -9
- data/lib/ceedling/tasks_vendor.rake +35 -35
- data/lib/ceedling/test_includes_extractor.rb +111 -85
- data/lib/ceedling/test_invoker.rb +164 -188
- data/lib/ceedling/test_invoker_helper.rb +32 -32
- data/lib/ceedling/tool_executor.rb +229 -229
- data/lib/ceedling/tool_executor_helper.rb +164 -164
- data/lib/ceedling/verbosinator.rb +10 -10
- data/lib/ceedling/version.rb +50 -50
- data/lib/ceedling/yaml_wrapper.rb +17 -17
- data/license.txt +31 -31
- data/plugins/beep/README.md +22 -22
- data/plugins/beep/lib/beep.rb +40 -40
- data/plugins/bullseye/README.md +76 -0
- data/plugins/bullseye/assets/template.erb +15 -15
- data/plugins/bullseye/bullseye.rake +173 -169
- data/plugins/bullseye/config/defaults.yml +57 -57
- data/plugins/bullseye/lib/bullseye.rb +194 -194
- data/plugins/colour_report/README.md +20 -0
- data/plugins/colour_report/lib/colour_report.rb +16 -16
- data/plugins/command_hooks/README.md +53 -53
- data/plugins/command_hooks/lib/command_hooks.rb +92 -92
- data/plugins/compile_commands_json/README.md +29 -0
- data/plugins/compile_commands_json/lib/compile_commands_json.rb +35 -0
- data/plugins/dependencies/README.md +254 -0
- data/plugins/dependencies/config/defaults.yml +5 -0
- data/plugins/dependencies/dependencies.rake +144 -0
- data/plugins/dependencies/lib/dependencies.rb +231 -0
- data/plugins/fake_function_framework/README.md +250 -250
- data/plugins/fake_function_framework/Rakefile +18 -18
- data/plugins/fake_function_framework/examples/fff_example/project.yml +71 -71
- data/plugins/fake_function_framework/examples/fff_example/rakefile.rb +7 -7
- data/plugins/fake_function_framework/examples/fff_example/src/bar.c +1 -1
- data/plugins/fake_function_framework/examples/fff_example/src/bar.h +14 -14
- data/plugins/fake_function_framework/examples/fff_example/src/custom_types.h +6 -6
- data/plugins/fake_function_framework/examples/fff_example/src/display.c +6 -6
- data/plugins/fake_function_framework/examples/fff_example/src/display.h +16 -16
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +93 -93
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.h +11 -11
- data/plugins/fake_function_framework/examples/fff_example/src/foo.c +16 -16
- data/plugins/fake_function_framework/examples/fff_example/src/foo.h +8 -8
- data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.c +1 -1
- data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.h +6 -6
- data/plugins/fake_function_framework/examples/fff_example/test/test_event_processor.c +155 -155
- data/plugins/fake_function_framework/examples/fff_example/test/test_foo.c +47 -47
- data/plugins/fake_function_framework/lib/fake_function_framework.rb +87 -87
- data/plugins/fake_function_framework/lib/fff_mock_generator.rb +163 -163
- data/plugins/fake_function_framework/spec/fff_mock_header_generator_spec.rb +304 -304
- data/plugins/fake_function_framework/spec/fff_mock_source_generator_spec.rb +148 -148
- data/plugins/fake_function_framework/spec/header_generator.rb +50 -50
- data/plugins/fake_function_framework/spec/spec_helper.rb +96 -96
- data/plugins/fake_function_framework/src/fff_unity_helper.h +32 -32
- data/plugins/gcov/README.md +412 -101
- data/plugins/gcov/assets/template.erb +15 -15
- data/plugins/gcov/config/defaults.yml +51 -73
- data/plugins/gcov/gcov.rake +209 -220
- data/plugins/gcov/lib/gcov.rb +133 -113
- data/plugins/gcov/lib/gcov_constants.rb +48 -19
- data/plugins/gcov/lib/gcovr_reportinator.rb +331 -0
- data/plugins/gcov/lib/reportgenerator_reportinator.rb +153 -0
- data/plugins/gcov/lib/reportinator_helper.rb +15 -0
- data/plugins/json_tests_report/README.md +36 -0
- data/plugins/json_tests_report/lib/json_tests_report.rb +83 -0
- data/plugins/junit_tests_report/README.md +36 -36
- data/plugins/junit_tests_report/lib/junit_tests_report.rb +134 -130
- data/plugins/module_generator/README.md +105 -0
- data/plugins/module_generator/config/module_generator.yml +3 -3
- data/plugins/module_generator/lib/module_generator.rb +79 -70
- data/plugins/module_generator/module_generator.rake +62 -47
- data/plugins/raw_output_report/README.md +19 -0
- data/plugins/raw_output_report/lib/raw_output_report.rb +41 -41
- data/plugins/stdout_gtestlike_tests_report/README.md +19 -0
- data/plugins/stdout_gtestlike_tests_report/assets/template.erb +84 -84
- data/plugins/stdout_gtestlike_tests_report/assets/template.erb copy +59 -59
- data/plugins/stdout_gtestlike_tests_report/config/stdout_gtestlike_tests_report.yml +4 -4
- data/plugins/stdout_gtestlike_tests_report/lib/stdout_gtestlike_tests_report.rb +43 -43
- data/plugins/stdout_ide_tests_report/README.md +18 -0
- data/plugins/stdout_ide_tests_report/config/stdout_ide_tests_report.yml +4 -4
- data/plugins/stdout_ide_tests_report/lib/stdout_ide_tests_report.rb +44 -44
- data/plugins/stdout_pretty_tests_report/README.md +20 -0
- data/plugins/stdout_pretty_tests_report/assets/template.erb +59 -59
- data/plugins/stdout_pretty_tests_report/config/stdout_pretty_tests_report.yml +4 -4
- data/plugins/stdout_pretty_tests_report/lib/stdout_pretty_tests_report.rb +47 -47
- data/plugins/subprojects/README.md +63 -63
- data/plugins/subprojects/config/defaults.yml +33 -33
- data/plugins/subprojects/lib/subprojects.rb +92 -92
- data/plugins/subprojects/subprojects.rake +78 -78
- data/plugins/teamcity_tests_report/README.md +18 -0
- data/plugins/teamcity_tests_report/config/teamcity_tests_report.yml +4 -4
- data/plugins/teamcity_tests_report/lib/teamcity_tests_report.rb +57 -57
- data/plugins/warnings_report/README.md +19 -0
- data/plugins/warnings_report/lib/warnings_report.rb +69 -69
- data/plugins/xml_tests_report/README.md +36 -36
- data/plugins/xml_tests_report/lib/xml_tests_report.rb +110 -110
- data/spec/build_invoker_utils_spec.rb +54 -54
- data/spec/ceedling_spec.rb +154 -154
- data/spec/configurator_builder_spec.rb +6 -6
- data/spec/configurator_helper_spec.rb +4 -4
- data/spec/configurator_spec.rb +9 -9
- data/spec/file_finder_helper_spec.rb +53 -53
- data/spec/gcov/gcov_deployment_spec.rb +72 -70
- data/spec/gcov/gcov_test_cases_spec.rb +128 -91
- data/spec/generator_test_results_sanity_checker_spec.rb +88 -88
- data/spec/generator_test_results_spec.rb +107 -107
- data/spec/par_map_spec.rb +57 -57
- data/spec/preprocessinator_extractor_spec.rb +45 -45
- data/spec/preprocessinator_includes_handler_spec.rb +202 -202
- data/spec/reportinator_spec.rb +19 -19
- data/spec/spec_helper.rb +27 -27
- data/spec/spec_system_helper.rb +616 -615
- data/spec/support/test_example.fail +24 -24
- data/spec/support/test_example.pass +24 -24
- data/spec/support/test_example_empty.pass +14 -14
- data/spec/support/test_example_ignore.pass +24 -24
- data/spec/support/test_example_mangled.pass +21 -21
- data/spec/support/test_example_with_time.pass +24 -24
- data/spec/system/deployment_spec.rb +225 -225
- data/spec/system_utils_spec.rb +56 -56
- data/spec/target_loader_spec.rb +30 -30
- data/spec/tool_executor_helper_spec.rb +310 -310
- data/spec/uncatagorized_specs_spec.rb +8 -8
- data/vendor/behaviors/Manifest.txt +9 -9
- data/vendor/behaviors/Rakefile +19 -19
- data/vendor/behaviors/lib/behaviors.rb +76 -76
- data/vendor/behaviors/lib/behaviors/reporttask.rb +158 -158
- data/vendor/behaviors/test/behaviors_tasks_test.rb +73 -73
- data/vendor/behaviors/test/behaviors_test.rb +50 -50
- data/vendor/behaviors/test/tasks_test/Rakefile +19 -19
- data/vendor/behaviors/test/tasks_test/lib/user.rb +2 -2
- data/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -17
- data/vendor/c_exception/Gemfile +4 -4
- data/vendor/c_exception/Gemfile.lock +12 -12
- data/vendor/c_exception/README.md +249 -162
- data/vendor/c_exception/docs/CException.md +332 -292
- data/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -207
- data/vendor/c_exception/lib/CException.c +46 -46
- data/vendor/c_exception/lib/CException.h +115 -115
- data/vendor/c_exception/lib/meson.build +11 -0
- data/vendor/c_exception/meson.build +48 -0
- data/vendor/c_exception/project.yml +37 -0
- data/vendor/c_exception/test/TestException.c +391 -391
- data/vendor/{cmock/vendor/c_exception/test → c_exception/test/support}/CExceptionConfig.h +46 -46
- data/vendor/c_exception/vendor/unity/README.md +220 -220
- data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +118 -118
- data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +39 -39
- data/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -36
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +308 -308
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +437 -437
- data/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -220
- data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +252 -252
- data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +25 -25
- data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +6 -6
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +139 -139
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +136 -136
- data/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -146
- data/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -207
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -716
- data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -398
- data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -191
- data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -242
- data/vendor/c_exception/vendor/unity/docs/license.txt +21 -21
- data/vendor/c_exception/vendor/unity/examples/example_1/makefile +71 -71
- data/vendor/c_exception/vendor/unity/examples/example_1/readme.txt +4 -4
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +24 -24
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.h +3 -3
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -11
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -2
- data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -62
- data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -31
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -53
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -57
- data/vendor/c_exception/vendor/unity/examples/example_2/makefile +70 -70
- data/vendor/c_exception/vendor/unity/examples/example_2/readme.txt +4 -4
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.c +24 -24
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.h +3 -3
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -11
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -2
- data/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -64
- data/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -33
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +8 -8
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +10 -10
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -12
- data/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -10
- data/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -12
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +43 -43
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +249 -249
- data/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +13 -13
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.c +24 -24
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.h +3 -3
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -11
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -2
- data/vendor/c_exception/vendor/unity/examples/example_3/target_gcc_32.yml +46 -46
- data/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -62
- data/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -31
- data/vendor/c_exception/vendor/unity/examples/unity_config.h +237 -237
- data/vendor/c_exception/vendor/unity/extras/eclipse/error_parsers.txt +26 -26
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -48
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +178 -178
- data/vendor/c_exception/vendor/unity/extras/fixture/readme.txt +8 -8
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +432 -432
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +83 -83
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +51 -51
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +47 -47
- data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +74 -74
- data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +22 -22
- data/vendor/c_exception/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -39
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +543 -543
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +57 -57
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +57 -57
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -17
- data/vendor/c_exception/vendor/unity/release/build.info +2 -2
- data/vendor/c_exception/vendor/unity/release/version.info +2 -2
- data/vendor/c_exception/vendor/unity/src/unity.c +1517 -1517
- data/vendor/c_exception/vendor/unity/src/unity.h +339 -339
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +784 -784
- data/vendor/c_exception/vendor/unity/test/Makefile +63 -63
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +61 -61
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +57 -57
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -55
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -15
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -80
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +76 -76
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -75
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -13
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -89
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -89
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +77 -77
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -89
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -89
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -90
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +67 -67
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +70 -70
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +58 -58
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +67 -67
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +70 -70
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +71 -71
- data/vendor/c_exception/vendor/unity/test/rakefile +125 -125
- data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +260 -260
- data/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -158
- data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +78 -78
- data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +78 -78
- data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -49
- data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -50
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +47 -47
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +59 -59
- data/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +47 -47
- data/vendor/c_exception/vendor/unity/test/targets/hitech_picc18.yml +101 -101
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +90 -90
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +80 -80
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +80 -80
- data/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +94 -94
- data/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +84 -84
- data/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +95 -95
- data/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +86 -86
- data/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -11
- data/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -8
- data/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -14
- data/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -13
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -183
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +67 -67
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -192
- data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1252 -1252
- data/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +110 -110
- data/vendor/c_exception/vendor/unity/test/tests/testunity.c +4993 -4993
- data/vendor/cmock/Gemfile +8 -9
- data/vendor/cmock/LICENSE.txt +18 -18
- data/vendor/cmock/README.md +34 -34
- data/vendor/cmock/config/production_environment.rb +12 -14
- data/vendor/cmock/config/test_environment.rb +16 -16
- data/vendor/cmock/docs/CMock_Summary.md +806 -696
- data/vendor/cmock/docs/ThrowTheSwitchCodingStandard.md +207 -207
- data/vendor/cmock/examples/make_example/Makefile +30 -30
- data/vendor/cmock/examples/make_example/src/foo.c +5 -5
- data/vendor/cmock/examples/make_example/src/foo.h +5 -5
- data/vendor/cmock/examples/make_example/src/main.c +15 -15
- data/vendor/cmock/examples/make_example/test/test_foo.c +17 -17
- data/vendor/cmock/examples/make_example/test/test_main.c +15 -15
- data/vendor/cmock/examples/temp_sensor/gcc.yml +44 -44
- data/vendor/cmock/examples/temp_sensor/iar_v4.yml +92 -92
- data/vendor/cmock/examples/temp_sensor/iar_v5.yml +81 -81
- data/vendor/cmock/examples/temp_sensor/rakefile.rb +42 -42
- data/vendor/cmock/examples/temp_sensor/rakefile_helper.rb +268 -272
- data/vendor/cmock/examples/temp_sensor/src/AT91SAM7X256.h +2556 -2556
- data/vendor/cmock/examples/temp_sensor/src/AdcConductor.c +42 -42
- data/vendor/cmock/examples/temp_sensor/src/AdcConductor.h +11 -11
- data/vendor/cmock/examples/temp_sensor/src/AdcHardware.c +27 -27
- data/vendor/cmock/examples/temp_sensor/src/AdcHardware.h +9 -9
- data/vendor/cmock/examples/temp_sensor/src/AdcHardwareConfigurator.c +18 -18
- data/vendor/cmock/examples/temp_sensor/src/AdcHardwareConfigurator.h +10 -10
- data/vendor/cmock/examples/temp_sensor/src/AdcModel.c +33 -33
- data/vendor/cmock/examples/temp_sensor/src/AdcModel.h +13 -13
- data/vendor/cmock/examples/temp_sensor/src/AdcTemperatureSensor.c +51 -51
- data/vendor/cmock/examples/temp_sensor/src/AdcTemperatureSensor.h +10 -10
- data/vendor/cmock/examples/temp_sensor/src/Executor.c +25 -25
- data/vendor/cmock/examples/temp_sensor/src/Executor.h +9 -9
- data/vendor/cmock/examples/temp_sensor/src/IntrinsicsWrapper.c +18 -18
- data/vendor/cmock/examples/temp_sensor/src/IntrinsicsWrapper.h +7 -7
- data/vendor/cmock/examples/temp_sensor/src/Main.c +46 -46
- data/vendor/cmock/examples/temp_sensor/src/Main.h +7 -7
- data/vendor/cmock/examples/temp_sensor/src/Model.c +10 -10
- data/vendor/cmock/examples/temp_sensor/src/Model.h +8 -8
- data/vendor/cmock/examples/temp_sensor/src/ModelConfig.h +7 -7
- data/vendor/cmock/examples/temp_sensor/src/TaskScheduler.c +72 -72
- data/vendor/cmock/examples/temp_sensor/src/TaskScheduler.h +11 -11
- data/vendor/cmock/examples/temp_sensor/src/TemperatureCalculator.c +27 -27
- data/vendor/cmock/examples/temp_sensor/src/TemperatureCalculator.h +6 -6
- data/vendor/cmock/examples/temp_sensor/src/TemperatureFilter.c +39 -39
- data/vendor/cmock/examples/temp_sensor/src/TemperatureFilter.h +10 -10
- data/vendor/cmock/examples/temp_sensor/src/TimerConductor.c +15 -15
- data/vendor/cmock/examples/temp_sensor/src/TimerConductor.h +9 -9
- data/vendor/cmock/examples/temp_sensor/src/TimerConfigurator.c +51 -51
- data/vendor/cmock/examples/temp_sensor/src/TimerConfigurator.h +15 -15
- data/vendor/cmock/examples/temp_sensor/src/TimerHardware.c +15 -15
- data/vendor/cmock/examples/temp_sensor/src/TimerHardware.h +8 -8
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptConfigurator.c +55 -55
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptConfigurator.h +13 -13
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptHandler.c +25 -25
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptHandler.h +10 -10
- data/vendor/cmock/examples/temp_sensor/src/TimerModel.c +9 -9
- data/vendor/cmock/examples/temp_sensor/src/TimerModel.h +8 -8
- data/vendor/cmock/examples/temp_sensor/src/Types.h +103 -103
- data/vendor/cmock/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +18 -18
- data/vendor/cmock/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +6 -6
- data/vendor/cmock/examples/temp_sensor/src/UsartConductor.c +21 -21
- data/vendor/cmock/examples/temp_sensor/src/UsartConductor.h +7 -7
- data/vendor/cmock/examples/temp_sensor/src/UsartConfigurator.c +39 -39
- data/vendor/cmock/examples/temp_sensor/src/UsartConfigurator.h +13 -13
- data/vendor/cmock/examples/temp_sensor/src/UsartHardware.c +22 -22
- data/vendor/cmock/examples/temp_sensor/src/UsartHardware.h +9 -9
- data/vendor/cmock/examples/temp_sensor/src/UsartModel.c +34 -34
- data/vendor/cmock/examples/temp_sensor/src/UsartModel.h +10 -10
- data/vendor/cmock/examples/temp_sensor/src/UsartPutChar.c +16 -16
- data/vendor/cmock/examples/temp_sensor/src/UsartPutChar.h +8 -8
- data/vendor/cmock/examples/temp_sensor/src/UsartTransmitBufferStatus.c +7 -7
- data/vendor/cmock/examples/temp_sensor/src/UsartTransmitBufferStatus.h +8 -8
- data/vendor/cmock/examples/temp_sensor/test/TestAdcConductor.c +121 -121
- data/vendor/cmock/examples/temp_sensor/test/TestAdcHardware.c +44 -44
- data/vendor/cmock/examples/temp_sensor/test/TestAdcHardwareConfigurator.c +43 -43
- data/vendor/cmock/examples/temp_sensor/test/TestAdcModel.c +33 -33
- data/vendor/cmock/examples/temp_sensor/test/TestAdcTemperatureSensor.c +47 -47
- data/vendor/cmock/examples/temp_sensor/test/TestExecutor.c +36 -36
- data/vendor/cmock/examples/temp_sensor/test/TestMain.c +24 -24
- data/vendor/cmock/examples/temp_sensor/test/TestModel.c +20 -20
- data/vendor/cmock/examples/temp_sensor/test/TestTaskScheduler.c +104 -104
- data/vendor/cmock/examples/temp_sensor/test/TestTemperatureCalculator.c +33 -33
- data/vendor/cmock/examples/temp_sensor/test/TestTemperatureFilter.c +69 -69
- data/vendor/cmock/examples/temp_sensor/test/TestTimerConductor.c +32 -32
- data/vendor/cmock/examples/temp_sensor/test/TestTimerConfigurator.c +112 -112
- data/vendor/cmock/examples/temp_sensor/test/TestTimerHardware.c +26 -26
- data/vendor/cmock/examples/temp_sensor/test/TestTimerInterruptConfigurator.c +78 -78
- data/vendor/cmock/examples/temp_sensor/test/TestTimerInterruptHandler.c +66 -66
- data/vendor/cmock/examples/temp_sensor/test/TestTimerModel.c +18 -18
- data/vendor/cmock/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +21 -21
- data/vendor/cmock/examples/temp_sensor/test/TestUsartConductor.c +40 -40
- data/vendor/cmock/examples/temp_sensor/test/TestUsartConfigurator.c +77 -77
- data/vendor/cmock/examples/temp_sensor/test/TestUsartHardware.c +37 -37
- data/vendor/cmock/examples/temp_sensor/test/TestUsartModel.c +40 -40
- data/vendor/cmock/examples/temp_sensor/test/TestUsartPutChar.c +43 -43
- data/vendor/cmock/examples/temp_sensor/test/TestUsartTransmitBufferStatus.c +22 -22
- data/vendor/cmock/lib/cmock.rb +104 -86
- data/vendor/cmock/lib/cmock_config.rb +173 -163
- data/vendor/cmock/lib/cmock_file_writer.rb +48 -44
- data/vendor/cmock/lib/cmock_generator.rb +333 -275
- data/vendor/cmock/lib/cmock_generator_plugin_array.rb +63 -63
- data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +88 -88
- data/vendor/cmock/lib/cmock_generator_plugin_cexception.rb +49 -51
- data/vendor/cmock/lib/cmock_generator_plugin_expect.rb +100 -103
- data/vendor/cmock/lib/cmock_generator_plugin_expect_any_args.rb +50 -53
- data/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +88 -75
- data/vendor/cmock/lib/cmock_generator_plugin_ignore_arg.rb +42 -42
- data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +79 -79
- data/vendor/cmock/lib/cmock_generator_utils.rb +247 -253
- data/vendor/cmock/lib/cmock_header_parser.rb +595 -474
- data/vendor/cmock/lib/cmock_plugin_manager.rb +50 -55
- data/vendor/cmock/lib/cmock_unityhelper_parser.rb +77 -75
- data/vendor/cmock/meson.build +53 -72
- data/vendor/cmock/scripts/create_makefile.rb +203 -202
- data/vendor/cmock/scripts/create_mock.rb +8 -8
- data/vendor/cmock/scripts/create_runner.rb +18 -20
- data/vendor/cmock/scripts/test_summary.rb +18 -19
- data/vendor/cmock/src/cmock.c +216 -216
- data/vendor/cmock/src/cmock.h +41 -40
- data/vendor/cmock/src/cmock_internals.h +91 -91
- data/vendor/cmock/src/meson.build +12 -17
- data/vendor/cmock/test/c/TestCMockC.c +333 -333
- data/vendor/cmock/test/c/TestCMockC.yml +14 -14
- data/vendor/cmock/test/c/TestCMockCDynamic.c +186 -186
- data/vendor/cmock/test/c/TestCMockCDynamic.yml +12 -12
- data/vendor/cmock/test/c/TestCMockCDynamic_Runner.c +36 -36
- data/vendor/cmock/test/c/TestCMockC_Runner.c +41 -41
- data/vendor/cmock/test/iar/iar_v4/Resource/at91SAM7X256_FLASH.xcl +185 -185
- data/vendor/cmock/test/iar/iar_v4/Resource/at91SAM7X256_RAM.xcl +185 -185
- data/vendor/cmock/test/iar/iar_v4/Resource/ioat91sam7x256.ddf +2259 -2259
- data/vendor/cmock/test/iar/iar_v4/cmock_demo.dep +3691 -3691
- data/vendor/cmock/test/iar/iar_v4/cmock_demo.ewp +2581 -2581
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X-EK.h +61 -61
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.inc +2314 -2314
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.rdf +4704 -4704
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.tcl +3407 -3407
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256_inc.h +2268 -2268
- data/vendor/cmock/test/iar/iar_v4/incIAR/ioat91sam7x256.h +4380 -4380
- data/vendor/cmock/test/iar/iar_v4/incIAR/lib_AT91SAM7X256.h +4211 -4211
- data/vendor/cmock/test/iar/iar_v4/settings/cmock_demo.cspy.bat +32 -32
- data/vendor/cmock/test/iar/iar_v4/srcIAR/Cstartup.s79 +265 -265
- data/vendor/cmock/test/iar/iar_v4/srcIAR/Cstartup_SAM7.c +98 -98
- data/vendor/cmock/test/iar/iar_v5/Resource/at91SAM7X256_FLASH.icf +43 -43
- data/vendor/cmock/test/iar/iar_v5/Resource/at91SAM7X256_RAM.icf +42 -42
- data/vendor/cmock/test/iar/iar_v5/cmock_demo.dep +4204 -4204
- data/vendor/cmock/test/iar/iar_v5/cmock_demo.ewp +2426 -2426
- data/vendor/cmock/test/iar/iar_v5/incIAR/AT91SAM7X-EK.h +61 -61
- data/vendor/cmock/test/iar/iar_v5/incIAR/AT91SAM7X256_inc.h +2268 -2268
- data/vendor/cmock/test/iar/iar_v5/incIAR/lib_AT91SAM7X256.h +4211 -4211
- data/vendor/cmock/test/iar/iar_v5/incIAR/project.h +30 -30
- data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +33 -33
- data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +12 -12
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo.cspy.bat +33 -33
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_Binary.jlink +12 -12
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +12 -12
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_RAM_Debug.jlink +12 -12
- data/vendor/cmock/test/iar/iar_v5/srcIAR/Cstartup.s +299 -299
- data/vendor/cmock/test/iar/iar_v5/srcIAR/Cstartup_SAM7.c +98 -98
- data/vendor/cmock/test/rakefile +147 -106
- data/vendor/cmock/test/rakefile_helper.rb +403 -382
- data/vendor/cmock/test/system/systest_generator.rb +205 -193
- data/vendor/cmock/test/system/test_compilation/callingconv.h +11 -11
- data/vendor/cmock/test/system/test_compilation/config.yml +10 -10
- data/vendor/cmock/test/system/test_compilation/const.h +37 -37
- data/vendor/cmock/test/system/test_compilation/inline.h +23 -23
- data/vendor/cmock/test/system/test_compilation/osek.h +275 -275
- data/vendor/cmock/test/system/test_compilation/parsing.h +89 -89
- data/vendor/cmock/test/system/test_interactions/all_plugins_but_other_limits.yml +375 -375
- data/vendor/cmock/test/system/test_interactions/all_plugins_coexist.yml +460 -460
- data/vendor/cmock/test/system/test_interactions/array_and_pointer_handling.yml +446 -446
- data/vendor/cmock/test/system/test_interactions/basic_expect_and_return.yml +124 -124
- data/vendor/cmock/test/system/test_interactions/const_primitives_handling.yml +87 -87
- data/vendor/cmock/test/system/test_interactions/doesnt_leave_details_behind.yml +308 -308
- data/vendor/cmock/test/system/test_interactions/enforce_strict_ordering.yml +247 -247
- data/vendor/cmock/test/system/test_interactions/expect_and_return_custom_types.yml +108 -108
- data/vendor/cmock/test/system/test_interactions/expect_and_return_treat_as.yml +173 -173
- data/vendor/cmock/test/system/test_interactions/expect_and_throw.yml +170 -170
- data/vendor/cmock/test/system/test_interactions/expect_any_args.yml +238 -238
- data/vendor/cmock/test/system/test_interactions/fancy_pointer_handling.yml +210 -210
- data/vendor/cmock/test/system/test_interactions/function_pointer_handling.yml +83 -82
- data/vendor/cmock/test/system/test_interactions/ignore_and_return.yml +329 -329
- data/vendor/cmock/test/system/test_interactions/ignore_strict_mock_calling.yml +37 -37
- data/vendor/cmock/test/system/test_interactions/newer_standards_stuff1.yml +52 -52
- data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_1.yml +91 -91
- data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml +59 -59
- data/vendor/cmock/test/system/test_interactions/out_of_memory.yml +65 -65
- data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +242 -242
- data/vendor/cmock/test/system/test_interactions/return_thru_ptr_and_expect_any_args.yml +235 -235
- data/vendor/cmock/test/system/test_interactions/return_thru_ptr_ignore_arg.yml +231 -231
- data/vendor/cmock/test/system/test_interactions/skeleton.yml +55 -0
- data/vendor/cmock/test/system/test_interactions/skeleton_update.yml +76 -0
- data/vendor/cmock/test/system/test_interactions/struct_union_enum_expect_and_return.yml +277 -277
- data/vendor/cmock/test/system/test_interactions/struct_union_enum_expect_and_return_with_plugins.yml +280 -280
- data/vendor/cmock/test/system/test_interactions/stubs_with_callbacks.yml +221 -221
- data/vendor/cmock/test/system/test_interactions/unity_64bit_support.yml +77 -77
- data/vendor/cmock/test/system/test_interactions/unity_ignores.yml +139 -139
- data/vendor/cmock/test/system/test_interactions/unity_void_pointer_compare.yml +91 -91
- data/vendor/cmock/test/targets/clang_strict.yml +90 -90
- data/vendor/cmock/test/targets/gcc.yml +58 -58
- data/vendor/cmock/test/targets/gcc_64.yml +58 -58
- data/vendor/cmock/test/targets/gcc_tiny.yml +80 -80
- data/vendor/cmock/test/targets/iar_arm_v4.yml +110 -110
- data/vendor/cmock/test/targets/iar_arm_v5.yml +95 -95
- data/vendor/cmock/test/test_helper.rb +44 -44
- data/vendor/cmock/test/unit/cmock_config_test.rb +126 -123
- data/vendor/cmock/test/unit/cmock_config_test.yml +7 -6
- data/vendor/cmock/test/unit/cmock_file_writer_test.rb +27 -27
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +686 -551
- data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +141 -141
- data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +281 -281
- data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +96 -96
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +185 -183
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +67 -67
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +201 -200
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +116 -116
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +119 -105
- data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +136 -136
- data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +398 -415
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +2717 -2000
- data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +100 -100
- data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +223 -223
- data/vendor/cmock/vendor/behaviors/Manifest.txt +9 -9
- data/vendor/cmock/vendor/behaviors/Rakefile +19 -19
- data/vendor/cmock/vendor/behaviors/lib/behaviors.rb +76 -76
- data/vendor/cmock/vendor/behaviors/lib/behaviors/reporttask.rb +158 -158
- data/vendor/cmock/vendor/behaviors/test/behaviors_tasks_test.rb +73 -73
- data/vendor/cmock/vendor/behaviors/test/behaviors_test.rb +50 -50
- data/vendor/cmock/vendor/behaviors/test/tasks_test/Rakefile +19 -19
- data/vendor/cmock/vendor/behaviors/test/tasks_test/lib/user.rb +2 -2
- data/vendor/cmock/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -17
- data/vendor/cmock/vendor/c_exception/Gemfile +4 -4
- data/vendor/cmock/vendor/c_exception/Gemfile.lock +12 -12
- data/vendor/cmock/vendor/c_exception/README.md +249 -162
- data/vendor/cmock/vendor/c_exception/docs/CException.md +332 -292
- data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -207
- data/vendor/cmock/vendor/c_exception/lib/CException.c +46 -46
- data/vendor/cmock/vendor/c_exception/lib/CException.h +115 -115
- data/vendor/cmock/vendor/c_exception/lib/meson.build +11 -0
- data/vendor/cmock/vendor/c_exception/meson.build +48 -0
- data/vendor/cmock/vendor/c_exception/project.yml +37 -0
- data/vendor/cmock/vendor/c_exception/test/TestException.c +391 -391
- data/vendor/{c_exception/test → cmock/vendor/c_exception/test/support}/CExceptionConfig.h +46 -46
- data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +220 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +118 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +39 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +308 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +437 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +252 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +25 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +6 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +139 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +136 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/license.txt +21 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +71 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/readme.txt +5 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +24 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.h +3 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +70 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/readme.txt +5 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.c +24 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.h +3 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +9 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +11 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +43 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +249 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +13 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.c +24 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.h +3 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/target_gcc_32.yml +46 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +237 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/eclipse/error_parsers.txt +26 -0
- data/vendor/cmock/vendor/{unity → c_exception/vendor/unity}/extras/fixture/rakefile.rb +48 -44
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +178 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/readme.txt +9 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +432 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +83 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +51 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +47 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +74 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +22 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +543 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +57 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +57 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/release/build.info +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/release/version.info +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +1517 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +339 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +784 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +63 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +61 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +57 -0
- 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 +80 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +76 -0
- 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 +89 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +77 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +67 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +70 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +58 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +67 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +70 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +71 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +125 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +260 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +78 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +78 -0
- 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/test/targets/gcc_auto_limits.yml +47 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +59 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +47 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/hitech_picc18.yml +101 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +90 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +80 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +80 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +94 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +84 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +95 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +86 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +67 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1252 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +110 -0
- data/vendor/cmock/vendor/{unity → c_exception/vendor/unity}/test/tests/testunity.c +4993 -8168
- data/vendor/cmock/vendor/unity/CMakeLists.txt +133 -31
- data/vendor/cmock/vendor/unity/LICENSE.txt +21 -21
- data/vendor/cmock/vendor/unity/README.md +191 -191
- data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +119 -119
- data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +39 -39
- data/vendor/cmock/vendor/unity/auto/generate_config.yml +36 -36
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +312 -309
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +511 -495
- data/vendor/cmock/vendor/unity/auto/parse_output.rb +322 -322
- data/vendor/cmock/vendor/unity/auto/run_test.erb +37 -36
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +251 -251
- data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +25 -25
- data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +6 -6
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +139 -139
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +135 -135
- data/vendor/cmock/vendor/unity/auto/unity_to_junit.py +146 -146
- data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +206 -206
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +831 -850
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +563 -541
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +251 -251
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +278 -266
- data/vendor/cmock/vendor/unity/examples/example_1/makefile +72 -72
- data/vendor/cmock/vendor/unity/examples/example_1/readme.txt +4 -4
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.c +24 -24
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.h +3 -3
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -11
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -2
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -62
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -31
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -53
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -57
- data/vendor/cmock/vendor/unity/examples/example_2/makefile +71 -71
- data/vendor/cmock/vendor/unity/examples/example_2/readme.txt +4 -4
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.c +24 -24
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.h +3 -3
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -11
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -2
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -64
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -33
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +8 -8
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +10 -10
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -12
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -10
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -12
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +38 -38
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +250 -250
- data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +13 -13
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.c +24 -24
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.h +3 -3
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -11
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -2
- data/vendor/cmock/vendor/unity/examples/example_3/target_gcc_32.yml +47 -47
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -62
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -31
- data/vendor/cmock/vendor/unity/examples/example_4/meson.build +12 -17
- data/vendor/cmock/vendor/unity/examples/example_4/readme.txt +14 -14
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode.c +24 -24
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode.h +3 -3
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode2.c +11 -11
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode2.h +2 -2
- data/vendor/cmock/vendor/unity/examples/example_4/src/meson.build +16 -21
- data/vendor/cmock/vendor/unity/examples/example_4/subprojects/unity.wrap +4 -4
- data/vendor/cmock/vendor/unity/examples/example_4/test/TestProductionCode.c +63 -63
- data/vendor/cmock/vendor/unity/examples/example_4/test/TestProductionCode2.c +35 -35
- data/vendor/cmock/vendor/unity/examples/example_4/test/meson.build +7 -12
- data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +53 -53
- data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +57 -57
- data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/meson.build +13 -16
- data/vendor/cmock/vendor/unity/examples/unity_config.h +244 -263
- data/vendor/cmock/vendor/unity/extras/eclipse/error_parsers.txt +26 -26
- data/vendor/cmock/vendor/unity/extras/fixture/readme.md +29 -17
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +310 -275
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +83 -83
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +50 -50
- data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +72 -72
- data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +20 -20
- data/vendor/cmock/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -39
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +245 -245
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +32 -32
- data/vendor/cmock/vendor/unity/extras/memory/readme.md +49 -49
- data/vendor/cmock/vendor/unity/extras/memory/src/unity_memory.c +202 -202
- data/vendor/cmock/vendor/unity/extras/memory/src/unity_memory.h +60 -60
- data/vendor/cmock/vendor/unity/extras/memory/test/Makefile +78 -78
- data/vendor/cmock/vendor/unity/extras/memory/test/unity_memory_Test.c +325 -325
- data/vendor/cmock/vendor/unity/extras/memory/test/unity_memory_TestRunner.c +49 -49
- data/vendor/cmock/vendor/unity/extras/memory/test/unity_output_Spy.c +56 -56
- data/vendor/cmock/vendor/unity/extras/memory/test/unity_output_Spy.h +16 -16
- data/vendor/cmock/vendor/unity/meson.build +48 -69
- data/vendor/cmock/vendor/unity/src/meson.build +11 -16
- data/vendor/cmock/vendor/unity/src/unity.c +2109 -2085
- data/vendor/cmock/vendor/unity/src/unity.h +661 -617
- data/vendor/cmock/vendor/unity/src/unity_internals.h +1030 -1002
- data/vendor/cmock/vendor/unity/test/Makefile +159 -67
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +61 -61
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +57 -57
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +55 -55
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +15 -15
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -80
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +76 -76
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -75
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -13
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +77 -77
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -90
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +67 -67
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +70 -70
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +58 -58
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +67 -67
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +70 -70
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +71 -71
- data/vendor/cmock/vendor/unity/test/rakefile +163 -124
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +315 -269
- data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -158
- data/vendor/cmock/vendor/unity/test/targets/ansi.yml +44 -49
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +72 -78
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +71 -78
- data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +45 -49
- data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +46 -50
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +43 -47
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +55 -59
- data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +43 -47
- data/vendor/cmock/vendor/unity/test/targets/hitech_picc18.yml +91 -101
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v4.yml +98 -90
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5.yml +92 -80
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5_3.yml +92 -80
- data/vendor/cmock/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +90 -94
- data/vendor/cmock/vendor/unity/test/targets/iar_cortexm3_v5.yml +94 -84
- data/vendor/cmock/vendor/unity/test/targets/iar_msp430.yml +112 -95
- data/vendor/cmock/vendor/unity/test/targets/iar_sh2a_v6.yml +99 -86
- data/vendor/cmock/vendor/unity/test/testdata/CException.h +11 -11
- data/vendor/cmock/vendor/unity/test/testdata/Defs.h +8 -8
- data/vendor/cmock/vendor/unity/test/testdata/cmock.h +14 -14
- data/vendor/cmock/vendor/unity/test/testdata/mockMock.h +13 -13
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c +189 -189
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +70 -70
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +197 -197
- data/vendor/cmock/vendor/unity/test/tests/self_assessment_utils.h +144 -0
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +1260 -1268
- data/vendor/cmock/vendor/unity/test/tests/test_unity_arrays.c +2874 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_core.c +371 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_doubles.c +773 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_floats.c +884 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_integers.c +2847 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_integers_64.c +773 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_memory.c +81 -0
- data/vendor/{unity/test/tests/testparameterized.c → cmock/vendor/unity/test/tests/test_unity_parameterized.c} +171 -171
- data/vendor/cmock/vendor/unity/test/tests/test_unity_strings.c +329 -0
- data/vendor/cmock/vendor/unity/unityConfig.cmake +1 -0
- data/vendor/deep_merge/MIT-LICENSE +20 -20
- data/vendor/deep_merge/README +94 -94
- data/vendor/deep_merge/Rakefile +28 -28
- data/vendor/deep_merge/lib/deep_merge.rb +211 -211
- data/vendor/deep_merge/test/test_deep_merge.rb +553 -553
- data/vendor/diy/History.txt +28 -28
- data/vendor/diy/README.rdoc +233 -233
- data/vendor/diy/Rakefile +33 -33
- data/vendor/diy/TODO.txt +9 -9
- data/vendor/diy/diy.gemspec +131 -131
- data/vendor/diy/lib/diy.rb +403 -403
- data/vendor/diy/lib/diy/factory.rb +36 -36
- data/vendor/diy/sample_code/car.rb +7 -7
- data/vendor/diy/sample_code/chassis.rb +5 -5
- data/vendor/diy/sample_code/diy_example.rb +26 -26
- data/vendor/diy/sample_code/engine.rb +5 -5
- data/vendor/diy/sample_code/objects.yml +10 -10
- data/vendor/diy/test/constructor.rb +119 -119
- data/vendor/diy/test/diy_test.rb +608 -608
- data/vendor/diy/test/factory_test.rb +79 -79
- data/vendor/diy/test/files/broken_construction.yml +7 -7
- data/vendor/diy/test/files/cat/cat.rb +3 -3
- data/vendor/diy/test/files/cat/extra_conflict.yml +5 -5
- data/vendor/diy/test/files/cat/heritage.rb +2 -2
- data/vendor/diy/test/files/cat/needs_input.yml +3 -3
- data/vendor/diy/test/files/cat/the_cat_lineage.rb +1 -1
- data/vendor/diy/test/files/dog/dog_model.rb +3 -3
- data/vendor/diy/test/files/dog/dog_presenter.rb +3 -3
- data/vendor/diy/test/files/dog/dog_view.rb +2 -2
- data/vendor/diy/test/files/dog/file_resolver.rb +2 -2
- data/vendor/diy/test/files/dog/other_thing.rb +2 -2
- data/vendor/diy/test/files/dog/simple.yml +11 -11
- data/vendor/diy/test/files/donkey/foo.rb +8 -8
- data/vendor/diy/test/files/donkey/foo/bar/qux.rb +7 -7
- data/vendor/diy/test/files/factory/beef.rb +5 -5
- data/vendor/diy/test/files/factory/dog.rb +6 -6
- data/vendor/diy/test/files/factory/factory.yml +19 -19
- data/vendor/diy/test/files/factory/farm/llama.rb +7 -7
- data/vendor/diy/test/files/factory/farm/pork.rb +7 -7
- data/vendor/diy/test/files/factory/kitten.rb +13 -13
- data/vendor/diy/test/files/fud/objects.yml +13 -13
- data/vendor/diy/test/files/fud/toy.rb +14 -14
- data/vendor/diy/test/files/functions/attached_things_builder.rb +1 -1
- data/vendor/diy/test/files/functions/invalid_method.yml +4 -4
- data/vendor/diy/test/files/functions/method_extractor.rb +2 -2
- data/vendor/diy/test/files/functions/nonsingleton_objects.yml +5 -5
- data/vendor/diy/test/files/functions/objects.yml +21 -21
- data/vendor/diy/test/files/functions/thing.rb +2 -2
- data/vendor/diy/test/files/functions/thing_builder.rb +24 -24
- data/vendor/diy/test/files/functions/things_builder.rb +2 -2
- data/vendor/diy/test/files/gnu/objects.yml +14 -14
- data/vendor/diy/test/files/gnu/thinger.rb +7 -7
- data/vendor/diy/test/files/goat/base.rb +8 -8
- data/vendor/diy/test/files/goat/can.rb +6 -6
- data/vendor/diy/test/files/goat/goat.rb +6 -6
- data/vendor/diy/test/files/goat/objects.yml +12 -12
- data/vendor/diy/test/files/goat/paper.rb +6 -6
- data/vendor/diy/test/files/goat/plane.rb +7 -7
- data/vendor/diy/test/files/goat/shirt.rb +6 -6
- data/vendor/diy/test/files/goat/wings.rb +8 -8
- data/vendor/diy/test/files/horse/holder_thing.rb +3 -3
- data/vendor/diy/test/files/horse/objects.yml +7 -7
- data/vendor/diy/test/files/namespace/animal/bird.rb +5 -5
- data/vendor/diy/test/files/namespace/animal/cat.rb +5 -5
- data/vendor/diy/test/files/namespace/animal/reptile/hardshell/turtle.rb +8 -8
- data/vendor/diy/test/files/namespace/animal/reptile/lizard.rb +7 -7
- data/vendor/diy/test/files/namespace/bad_module_specified.yml +8 -8
- data/vendor/diy/test/files/namespace/class_name_combine.yml +8 -8
- data/vendor/diy/test/files/namespace/no_module_specified.yml +8 -8
- data/vendor/diy/test/files/namespace/objects.yml +21 -21
- data/vendor/diy/test/files/namespace/road.rb +2 -2
- data/vendor/diy/test/files/namespace/sky.rb +2 -2
- data/vendor/diy/test/files/namespace/subcontext.yml +22 -22
- data/vendor/diy/test/files/non_singleton/air.rb +2 -2
- data/vendor/diy/test/files/non_singleton/fat_cat.rb +3 -3
- data/vendor/diy/test/files/non_singleton/objects.yml +19 -19
- data/vendor/diy/test/files/non_singleton/pig.rb +3 -3
- data/vendor/diy/test/files/non_singleton/thread_spinner.rb +3 -3
- data/vendor/diy/test/files/non_singleton/tick.rb +3 -3
- data/vendor/diy/test/files/non_singleton/yard.rb +2 -2
- data/vendor/diy/test/files/yak/core_model.rb +3 -3
- data/vendor/diy/test/files/yak/core_presenter.rb +3 -3
- data/vendor/diy/test/files/yak/core_view.rb +1 -1
- data/vendor/diy/test/files/yak/data_source.rb +1 -1
- data/vendor/diy/test/files/yak/fringe_model.rb +3 -3
- data/vendor/diy/test/files/yak/fringe_presenter.rb +3 -3
- data/vendor/diy/test/files/yak/fringe_view.rb +1 -1
- data/vendor/diy/test/files/yak/giant_squid.rb +3 -3
- data/vendor/diy/test/files/yak/krill.rb +2 -2
- data/vendor/diy/test/files/yak/my_objects.yml +21 -21
- data/vendor/diy/test/files/yak/sub_sub_context_test.yml +27 -27
- data/vendor/diy/test/test_helper.rb +55 -55
- data/vendor/hardmock/CHANGES +78 -78
- data/vendor/hardmock/LICENSE +7 -7
- data/vendor/hardmock/README +70 -70
- data/vendor/hardmock/Rakefile +8 -8
- data/vendor/hardmock/config/environment.rb +12 -12
- data/vendor/hardmock/lib/assert_error.rb +23 -23
- data/vendor/hardmock/lib/extend_test_unit.rb +14 -14
- data/vendor/hardmock/lib/hardmock.rb +86 -86
- data/vendor/hardmock/lib/hardmock/errors.rb +22 -22
- data/vendor/hardmock/lib/hardmock/expectation.rb +229 -229
- data/vendor/hardmock/lib/hardmock/expectation_builder.rb +9 -9
- data/vendor/hardmock/lib/hardmock/expector.rb +26 -26
- data/vendor/hardmock/lib/hardmock/method_cleanout.rb +33 -33
- data/vendor/hardmock/lib/hardmock/mock.rb +180 -180
- data/vendor/hardmock/lib/hardmock/mock_control.rb +53 -53
- data/vendor/hardmock/lib/hardmock/stubbing.rb +210 -210
- data/vendor/hardmock/lib/hardmock/trapper.rb +31 -31
- data/vendor/hardmock/lib/hardmock/utils.rb +9 -9
- data/vendor/hardmock/lib/test_unit_before_after.rb +169 -169
- data/vendor/hardmock/rake_tasks/rdoc.rake +19 -19
- data/vendor/hardmock/rake_tasks/rdoc_options.rb +4 -4
- data/vendor/hardmock/rake_tasks/test.rake +22 -22
- data/vendor/hardmock/test/functional/assert_error_test.rb +52 -52
- data/vendor/hardmock/test/functional/auto_verify_test.rb +178 -178
- data/vendor/hardmock/test/functional/direct_mock_usage_test.rb +396 -396
- data/vendor/hardmock/test/functional/hardmock_test.rb +434 -434
- data/vendor/hardmock/test/functional/stubbing_test.rb +479 -479
- data/vendor/hardmock/test/test_helper.rb +43 -43
- data/vendor/hardmock/test/unit/expectation_builder_test.rb +19 -19
- data/vendor/hardmock/test/unit/expectation_test.rb +372 -372
- data/vendor/hardmock/test/unit/expector_test.rb +57 -57
- data/vendor/hardmock/test/unit/method_cleanout_test.rb +36 -36
- data/vendor/hardmock/test/unit/mock_control_test.rb +175 -175
- data/vendor/hardmock/test/unit/mock_test.rb +279 -279
- data/vendor/hardmock/test/unit/test_unit_before_after_test.rb +452 -452
- data/vendor/hardmock/test/unit/trapper_test.rb +62 -62
- data/vendor/hardmock/test/unit/verify_error_test.rb +40 -40
- data/vendor/unity/CMakeLists.txt +133 -31
- data/vendor/unity/LICENSE.txt +21 -21
- data/vendor/unity/README.md +191 -191
- data/vendor/unity/auto/colour_prompt.rb +119 -119
- data/vendor/unity/auto/colour_reporter.rb +39 -39
- data/vendor/unity/auto/generate_config.yml +36 -36
- data/vendor/unity/auto/generate_module.rb +312 -309
- data/vendor/unity/auto/generate_test_runner.rb +511 -495
- data/vendor/unity/auto/parse_output.rb +322 -322
- data/vendor/unity/auto/run_test.erb +37 -36
- data/vendor/unity/auto/stylize_as_junit.rb +251 -251
- data/vendor/unity/auto/test_file_filter.rb +25 -25
- data/vendor/unity/auto/type_sanitizer.rb +6 -6
- data/vendor/unity/auto/unity_test_summary.py +139 -139
- data/vendor/unity/auto/unity_test_summary.rb +135 -135
- data/vendor/unity/auto/unity_to_junit.py +146 -146
- data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +206 -206
- data/vendor/unity/docs/UnityAssertionsReference.md +831 -850
- data/vendor/unity/docs/UnityConfigurationGuide.md +563 -541
- data/vendor/unity/docs/UnityGettingStartedGuide.md +251 -251
- data/vendor/unity/docs/UnityHelperScriptsGuide.md +278 -266
- data/vendor/unity/examples/example_1/makefile +72 -72
- data/vendor/unity/examples/example_1/readme.txt +4 -4
- data/vendor/unity/examples/example_1/src/ProductionCode.c +24 -24
- data/vendor/unity/examples/example_1/src/ProductionCode.h +3 -3
- data/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -11
- data/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -2
- data/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -62
- data/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -31
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -53
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -57
- data/vendor/unity/examples/example_2/makefile +71 -71
- data/vendor/unity/examples/example_2/readme.txt +4 -4
- data/vendor/unity/examples/example_2/src/ProductionCode.c +24 -24
- data/vendor/unity/examples/example_2/src/ProductionCode.h +3 -3
- data/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -11
- data/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -2
- data/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -64
- data/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -33
- data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +8 -8
- data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +10 -10
- data/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -12
- data/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -10
- data/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -12
- data/vendor/unity/examples/example_3/rakefile.rb +38 -38
- data/vendor/unity/examples/example_3/rakefile_helper.rb +250 -250
- data/vendor/unity/examples/example_3/readme.txt +13 -13
- data/vendor/unity/examples/example_3/src/ProductionCode.c +24 -24
- data/vendor/unity/examples/example_3/src/ProductionCode.h +3 -3
- data/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -11
- data/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -2
- data/vendor/unity/examples/example_3/target_gcc_32.yml +47 -47
- data/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -62
- data/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -31
- data/vendor/unity/examples/example_4/meson.build +12 -17
- data/vendor/unity/examples/example_4/readme.txt +14 -14
- data/vendor/unity/examples/example_4/src/ProductionCode.c +24 -24
- data/vendor/unity/examples/example_4/src/ProductionCode.h +3 -3
- data/vendor/unity/examples/example_4/src/ProductionCode2.c +11 -11
- data/vendor/unity/examples/example_4/src/ProductionCode2.h +2 -2
- data/vendor/unity/examples/example_4/src/meson.build +16 -21
- data/vendor/unity/examples/example_4/subprojects/unity.wrap +4 -4
- data/vendor/unity/examples/example_4/test/TestProductionCode.c +63 -63
- data/vendor/unity/examples/example_4/test/TestProductionCode2.c +35 -35
- data/vendor/unity/examples/example_4/test/meson.build +7 -12
- data/vendor/unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +53 -53
- data/vendor/unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +57 -57
- data/vendor/unity/examples/example_4/test/test_runners/meson.build +13 -16
- data/vendor/unity/examples/unity_config.h +244 -263
- data/vendor/unity/extras/eclipse/error_parsers.txt +26 -26
- data/vendor/unity/extras/fixture/readme.md +29 -17
- data/vendor/unity/extras/fixture/src/unity_fixture.c +310 -275
- data/vendor/unity/extras/fixture/src/unity_fixture.h +83 -83
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +50 -50
- data/vendor/unity/extras/fixture/test/Makefile +72 -72
- data/vendor/unity/extras/fixture/test/main/AllTests.c +20 -20
- data/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -39
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +245 -245
- data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +32 -32
- data/vendor/unity/extras/memory/readme.md +49 -49
- data/vendor/unity/extras/memory/src/unity_memory.c +202 -202
- data/vendor/unity/extras/memory/src/unity_memory.h +60 -60
- data/vendor/unity/extras/memory/test/Makefile +78 -78
- data/vendor/unity/extras/memory/test/unity_memory_Test.c +325 -325
- data/vendor/unity/extras/memory/test/unity_memory_TestRunner.c +49 -49
- data/vendor/unity/extras/memory/test/unity_output_Spy.c +56 -56
- data/vendor/unity/extras/memory/test/unity_output_Spy.h +16 -16
- data/vendor/unity/meson.build +48 -69
- data/vendor/unity/src/meson.build +11 -16
- data/vendor/unity/src/unity.c +2109 -2085
- data/vendor/unity/src/unity.h +661 -617
- data/vendor/unity/src/unity_internals.h +1030 -1002
- data/vendor/unity/test/Makefile +159 -67
- data/vendor/unity/test/expectdata/testsample_cmd.c +61 -61
- data/vendor/unity/test/expectdata/testsample_def.c +57 -57
- data/vendor/unity/test/expectdata/testsample_head1.c +55 -55
- data/vendor/unity/test/expectdata/testsample_head1.h +15 -15
- data/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -80
- data/vendor/unity/test/expectdata/testsample_mock_def.c +76 -76
- data/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -75
- data/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -13
- data/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -89
- data/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -89
- data/vendor/unity/test/expectdata/testsample_mock_param.c +77 -77
- data/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -89
- data/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -89
- data/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -90
- data/vendor/unity/test/expectdata/testsample_new1.c +67 -67
- data/vendor/unity/test/expectdata/testsample_new2.c +70 -70
- data/vendor/unity/test/expectdata/testsample_param.c +58 -58
- data/vendor/unity/test/expectdata/testsample_run1.c +67 -67
- data/vendor/unity/test/expectdata/testsample_run2.c +70 -70
- data/vendor/unity/test/expectdata/testsample_yaml.c +71 -71
- data/vendor/unity/test/rakefile +163 -124
- data/vendor/unity/test/rakefile_helper.rb +315 -269
- data/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -158
- data/vendor/unity/test/targets/ansi.yml +44 -49
- data/vendor/unity/test/targets/clang_file.yml +72 -78
- data/vendor/unity/test/targets/clang_strict.yml +71 -78
- data/vendor/unity/test/targets/gcc_32.yml +45 -49
- data/vendor/unity/test/targets/gcc_64.yml +46 -50
- data/vendor/unity/test/targets/gcc_auto_limits.yml +43 -47
- data/vendor/unity/test/targets/gcc_auto_stdint.yml +55 -59
- data/vendor/unity/test/targets/gcc_manual_math.yml +43 -47
- data/vendor/unity/test/targets/hitech_picc18.yml +91 -101
- data/vendor/unity/test/targets/iar_arm_v4.yml +98 -90
- data/vendor/unity/test/targets/iar_arm_v5.yml +92 -80
- data/vendor/unity/test/targets/iar_arm_v5_3.yml +92 -80
- data/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +90 -94
- data/vendor/unity/test/targets/iar_cortexm3_v5.yml +94 -84
- data/vendor/unity/test/targets/iar_msp430.yml +112 -95
- data/vendor/unity/test/targets/iar_sh2a_v6.yml +99 -86
- data/vendor/unity/test/testdata/CException.h +11 -11
- data/vendor/unity/test/testdata/Defs.h +8 -8
- data/vendor/unity/test/testdata/cmock.h +14 -14
- data/vendor/unity/test/testdata/mockMock.h +13 -13
- data/vendor/unity/test/testdata/testRunnerGenerator.c +189 -189
- data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +70 -70
- data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +197 -197
- data/vendor/unity/test/tests/self_assessment_utils.h +144 -0
- data/vendor/unity/test/tests/test_generate_test_runner.rb +1260 -1268
- data/vendor/unity/test/tests/test_unity_arrays.c +2874 -0
- data/vendor/unity/test/tests/test_unity_core.c +371 -0
- data/vendor/unity/test/tests/test_unity_doubles.c +773 -0
- data/vendor/unity/test/tests/test_unity_floats.c +884 -0
- data/vendor/unity/test/tests/test_unity_integers.c +2847 -0
- data/vendor/unity/test/tests/test_unity_integers_64.c +773 -0
- data/vendor/unity/test/tests/test_unity_memory.c +81 -0
- data/vendor/{cmock/vendor/unity/test/tests/testparameterized.c → unity/test/tests/test_unity_parameterized.c} +171 -171
- data/vendor/unity/test/tests/test_unity_strings.c +329 -0
- data/vendor/unity/unityConfig.cmake +1 -0
- metadata +225 -62
- data/ceedling.sublime-project +0 -28
- data/ceedling.sublime-workspace +0 -1276
- data/docs/CeedlingPacket.odt +0 -0
- data/docs/CeedlingPacket.pdf +0 -0
- data/plugins/bullseye/readme.txt +0 -0
- data/vendor/c_exception/LICENSE.txt +0 -30
- data/vendor/c_exception/Rakefile +0 -42
- data/vendor/c_exception/makefile +0 -24
- data/vendor/c_exception/test/TestException_Runner.c +0 -67
- data/vendor/cmock/vendor/c_exception/LICENSE.txt +0 -30
- data/vendor/cmock/vendor/c_exception/Rakefile +0 -42
- data/vendor/cmock/vendor/c_exception/makefile +0 -24
- data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +0 -67
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +0 -183
- data/vendor/cmock/vendor/unity/extras/memory/rakefile.rb +0 -45
- data/vendor/cmock/vendor/unity/extras/memory/rakefile_helper.rb +0 -187
- data/vendor/cmock/vendor/unity/src/CMakeLists.txt +0 -22
- data/vendor/unity/extras/fixture/rakefile.rb +0 -44
- data/vendor/unity/extras/fixture/rakefile_helper.rb +0 -183
- data/vendor/unity/extras/memory/rakefile.rb +0 -45
- data/vendor/unity/extras/memory/rakefile_helper.rb +0 -187
- data/vendor/unity/src/CMakeLists.txt +0 -22
- data/vendor/unity/test/tests/testunity.c +0 -8168
@@ -1,49 +1,49 @@
|
|
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
|
-
#include "unity.h"
|
8
|
-
#include "unity_memory.h"
|
9
|
-
|
10
|
-
extern void test_ForceMallocFail(void);
|
11
|
-
extern void test_ReallocSmallerIsUnchanged(void);
|
12
|
-
extern void test_ReallocSameIsUnchanged(void);
|
13
|
-
extern void test_ReallocLargerNeeded(void);
|
14
|
-
extern void test_ReallocNullPointerIsLikeMalloc(void);
|
15
|
-
extern void test_ReallocSizeZeroFreesMemAndReturnsNullPointer(void);
|
16
|
-
extern void test_CallocFillsWithZero(void);
|
17
|
-
extern void test_FreeNULLSafety(void);
|
18
|
-
extern void test_DetectsLeak(void);
|
19
|
-
extern void test_BufferOverrunFoundDuringFree(void);
|
20
|
-
extern void test_BufferOverrunFoundDuringRealloc(void);
|
21
|
-
extern void test_BufferGuardWriteFoundDuringFree(void);
|
22
|
-
extern void test_BufferGuardWriteFoundDuringRealloc(void);
|
23
|
-
extern void test_MallocPastBufferFails(void);
|
24
|
-
extern void test_CallocPastBufferFails(void);
|
25
|
-
extern void test_MallocThenReallocGrowsMemoryInPlace(void);
|
26
|
-
extern void test_ReallocFailDoesNotFreeMem(void);
|
27
|
-
|
28
|
-
int main(void)
|
29
|
-
{
|
30
|
-
UnityBegin("unity_memory_Test.c");
|
31
|
-
RUN_TEST(test_ForceMallocFail);
|
32
|
-
RUN_TEST(test_ReallocSmallerIsUnchanged);
|
33
|
-
RUN_TEST(test_ReallocSameIsUnchanged);
|
34
|
-
RUN_TEST(test_ReallocLargerNeeded);
|
35
|
-
RUN_TEST(test_ReallocNullPointerIsLikeMalloc);
|
36
|
-
RUN_TEST(test_ReallocSizeZeroFreesMemAndReturnsNullPointer);
|
37
|
-
RUN_TEST(test_CallocFillsWithZero);
|
38
|
-
RUN_TEST(test_FreeNULLSafety);
|
39
|
-
RUN_TEST(test_DetectsLeak);
|
40
|
-
RUN_TEST(test_BufferOverrunFoundDuringFree);
|
41
|
-
RUN_TEST(test_BufferOverrunFoundDuringRealloc);
|
42
|
-
RUN_TEST(test_BufferGuardWriteFoundDuringFree);
|
43
|
-
RUN_TEST(test_BufferGuardWriteFoundDuringRealloc);
|
44
|
-
RUN_TEST(test_MallocPastBufferFails);
|
45
|
-
RUN_TEST(test_CallocPastBufferFails);
|
46
|
-
RUN_TEST(test_MallocThenReallocGrowsMemoryInPlace);
|
47
|
-
RUN_TEST(test_ReallocFailDoesNotFreeMem);
|
48
|
-
return UnityEnd();
|
49
|
-
}
|
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
|
+
#include "unity.h"
|
8
|
+
#include "unity_memory.h"
|
9
|
+
|
10
|
+
extern void test_ForceMallocFail(void);
|
11
|
+
extern void test_ReallocSmallerIsUnchanged(void);
|
12
|
+
extern void test_ReallocSameIsUnchanged(void);
|
13
|
+
extern void test_ReallocLargerNeeded(void);
|
14
|
+
extern void test_ReallocNullPointerIsLikeMalloc(void);
|
15
|
+
extern void test_ReallocSizeZeroFreesMemAndReturnsNullPointer(void);
|
16
|
+
extern void test_CallocFillsWithZero(void);
|
17
|
+
extern void test_FreeNULLSafety(void);
|
18
|
+
extern void test_DetectsLeak(void);
|
19
|
+
extern void test_BufferOverrunFoundDuringFree(void);
|
20
|
+
extern void test_BufferOverrunFoundDuringRealloc(void);
|
21
|
+
extern void test_BufferGuardWriteFoundDuringFree(void);
|
22
|
+
extern void test_BufferGuardWriteFoundDuringRealloc(void);
|
23
|
+
extern void test_MallocPastBufferFails(void);
|
24
|
+
extern void test_CallocPastBufferFails(void);
|
25
|
+
extern void test_MallocThenReallocGrowsMemoryInPlace(void);
|
26
|
+
extern void test_ReallocFailDoesNotFreeMem(void);
|
27
|
+
|
28
|
+
int main(void)
|
29
|
+
{
|
30
|
+
UnityBegin("unity_memory_Test.c");
|
31
|
+
RUN_TEST(test_ForceMallocFail);
|
32
|
+
RUN_TEST(test_ReallocSmallerIsUnchanged);
|
33
|
+
RUN_TEST(test_ReallocSameIsUnchanged);
|
34
|
+
RUN_TEST(test_ReallocLargerNeeded);
|
35
|
+
RUN_TEST(test_ReallocNullPointerIsLikeMalloc);
|
36
|
+
RUN_TEST(test_ReallocSizeZeroFreesMemAndReturnsNullPointer);
|
37
|
+
RUN_TEST(test_CallocFillsWithZero);
|
38
|
+
RUN_TEST(test_FreeNULLSafety);
|
39
|
+
RUN_TEST(test_DetectsLeak);
|
40
|
+
RUN_TEST(test_BufferOverrunFoundDuringFree);
|
41
|
+
RUN_TEST(test_BufferOverrunFoundDuringRealloc);
|
42
|
+
RUN_TEST(test_BufferGuardWriteFoundDuringFree);
|
43
|
+
RUN_TEST(test_BufferGuardWriteFoundDuringRealloc);
|
44
|
+
RUN_TEST(test_MallocPastBufferFails);
|
45
|
+
RUN_TEST(test_CallocPastBufferFails);
|
46
|
+
RUN_TEST(test_MallocThenReallocGrowsMemoryInPlace);
|
47
|
+
RUN_TEST(test_ReallocFailDoesNotFreeMem);
|
48
|
+
return UnityEnd();
|
49
|
+
}
|
@@ -1,56 +1,56 @@
|
|
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
|
-
#include "unity.h"
|
8
|
-
#include "unity_output_Spy.h"
|
9
|
-
|
10
|
-
#include <stdio.h>
|
11
|
-
#include <string.h>
|
12
|
-
#include <stdlib.h>
|
13
|
-
|
14
|
-
static int size;
|
15
|
-
static int count;
|
16
|
-
static char* buffer;
|
17
|
-
static int spy_enable;
|
18
|
-
|
19
|
-
void UnityOutputCharSpy_Create(int s)
|
20
|
-
{
|
21
|
-
size = (s > 0) ? s : 0;
|
22
|
-
count = 0;
|
23
|
-
spy_enable = 0;
|
24
|
-
buffer = malloc((size_t)size);
|
25
|
-
TEST_ASSERT_NOT_NULL_MESSAGE(buffer, "Internal malloc failed in Spy Create():" __FILE__);
|
26
|
-
memset(buffer, 0, (size_t)size);
|
27
|
-
}
|
28
|
-
|
29
|
-
void UnityOutputCharSpy_Destroy(void)
|
30
|
-
{
|
31
|
-
size = 0;
|
32
|
-
free(buffer);
|
33
|
-
}
|
34
|
-
|
35
|
-
void UnityOutputCharSpy_OutputChar(int c)
|
36
|
-
{
|
37
|
-
if (spy_enable)
|
38
|
-
{
|
39
|
-
if (count < (size-1))
|
40
|
-
buffer[count++] = (char)c;
|
41
|
-
}
|
42
|
-
else
|
43
|
-
{
|
44
|
-
putchar(c);
|
45
|
-
}
|
46
|
-
}
|
47
|
-
|
48
|
-
const char * UnityOutputCharSpy_Get(void)
|
49
|
-
{
|
50
|
-
return buffer;
|
51
|
-
}
|
52
|
-
|
53
|
-
void UnityOutputCharSpy_Enable(int enable)
|
54
|
-
{
|
55
|
-
spy_enable = enable;
|
56
|
-
}
|
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
|
+
#include "unity.h"
|
8
|
+
#include "unity_output_Spy.h"
|
9
|
+
|
10
|
+
#include <stdio.h>
|
11
|
+
#include <string.h>
|
12
|
+
#include <stdlib.h>
|
13
|
+
|
14
|
+
static int size;
|
15
|
+
static int count;
|
16
|
+
static char* buffer;
|
17
|
+
static int spy_enable;
|
18
|
+
|
19
|
+
void UnityOutputCharSpy_Create(int s)
|
20
|
+
{
|
21
|
+
size = (s > 0) ? s : 0;
|
22
|
+
count = 0;
|
23
|
+
spy_enable = 0;
|
24
|
+
buffer = malloc((size_t)size);
|
25
|
+
TEST_ASSERT_NOT_NULL_MESSAGE(buffer, "Internal malloc failed in Spy Create():" __FILE__);
|
26
|
+
memset(buffer, 0, (size_t)size);
|
27
|
+
}
|
28
|
+
|
29
|
+
void UnityOutputCharSpy_Destroy(void)
|
30
|
+
{
|
31
|
+
size = 0;
|
32
|
+
free(buffer);
|
33
|
+
}
|
34
|
+
|
35
|
+
void UnityOutputCharSpy_OutputChar(int c)
|
36
|
+
{
|
37
|
+
if (spy_enable)
|
38
|
+
{
|
39
|
+
if (count < (size-1))
|
40
|
+
buffer[count++] = (char)c;
|
41
|
+
}
|
42
|
+
else
|
43
|
+
{
|
44
|
+
putchar(c);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
const char * UnityOutputCharSpy_Get(void)
|
49
|
+
{
|
50
|
+
return buffer;
|
51
|
+
}
|
52
|
+
|
53
|
+
void UnityOutputCharSpy_Enable(int enable)
|
54
|
+
{
|
55
|
+
spy_enable = enable;
|
56
|
+
}
|
@@ -1,16 +1,16 @@
|
|
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_OUTPUT_SPY_H
|
8
|
-
#define UNITY_OUTPUT_SPY_H
|
9
|
-
|
10
|
-
void UnityOutputCharSpy_Create(int s);
|
11
|
-
void UnityOutputCharSpy_Destroy(void);
|
12
|
-
void UnityOutputCharSpy_OutputChar(int c);
|
13
|
-
const char * UnityOutputCharSpy_Get(void);
|
14
|
-
void UnityOutputCharSpy_Enable(int enable);
|
15
|
-
|
16
|
-
#endif
|
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_OUTPUT_SPY_H
|
8
|
+
#define UNITY_OUTPUT_SPY_H
|
9
|
+
|
10
|
+
void UnityOutputCharSpy_Create(int s);
|
11
|
+
void UnityOutputCharSpy_Destroy(void);
|
12
|
+
void UnityOutputCharSpy_OutputChar(int c);
|
13
|
+
const char * UnityOutputCharSpy_Get(void);
|
14
|
+
void UnityOutputCharSpy_Enable(int enable);
|
15
|
+
|
16
|
+
#endif
|
@@ -1,69 +1,48 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
-
'-Waggregate-return' , '-Wformat-nonliteral' ,
|
50
|
-
'-Wmissing-prototypes' , '-Wold-style-definition' ,
|
51
|
-
'-Wmissing-declarations', '-Wmissing-include-dirs' ,
|
52
|
-
'-Wno-unused-parameter' , '-Wdeclaration-after-statement'
|
53
|
-
]
|
54
|
-
), language: lang)
|
55
|
-
endif
|
56
|
-
|
57
|
-
if cc.get_id() == 'msvc'
|
58
|
-
add_project_arguments(cc.get_supported_arguments(
|
59
|
-
[
|
60
|
-
'/w44265', '/w44061', '/w44062',
|
61
|
-
'/wd4018', '/wd4146', '/wd4244',
|
62
|
-
'/wd4305',
|
63
|
-
]
|
64
|
-
), language: lang)
|
65
|
-
endif
|
66
|
-
|
67
|
-
subdir('src')
|
68
|
-
|
69
|
-
unity_dep = declare_dependency(link_with: unity_lib, include_directories: unity_dir)
|
1
|
+
#
|
2
|
+
# build script written by : Michael Brockus.
|
3
|
+
# github repo author: Mike Karlesky, Mark VanderVoord, Greg Williams.
|
4
|
+
#
|
5
|
+
# license: MIT
|
6
|
+
#
|
7
|
+
project('unity', 'c',
|
8
|
+
license: 'MIT',
|
9
|
+
meson_version: '>=0.53.0',
|
10
|
+
default_options: ['layout=flat', 'warning_level=3', 'werror=true', 'c_std=c11']
|
11
|
+
)
|
12
|
+
lang = 'c'
|
13
|
+
cc = meson.get_compiler(lang)
|
14
|
+
|
15
|
+
#
|
16
|
+
# Meson: Add compiler flags
|
17
|
+
if cc.get_id() == 'clang'
|
18
|
+
add_project_arguments(cc.get_supported_arguments(
|
19
|
+
[
|
20
|
+
'-Wexit-time-destructors',
|
21
|
+
'-Wglobal-constructors',
|
22
|
+
'-Wmissing-prototypes',
|
23
|
+
'-Wmissing-noreturn',
|
24
|
+
'-Wno-missing-braces',
|
25
|
+
'-Wold-style-cast', '-Wpointer-arith', '-Wweak-vtables',
|
26
|
+
'-Wcast-align', '-Wconversion', '-Wcast-qual', '-Wshadow'
|
27
|
+
]
|
28
|
+
), language: lang)
|
29
|
+
endif
|
30
|
+
|
31
|
+
if cc.get_argument_syntax() == 'gcc'
|
32
|
+
add_project_arguments(cc.get_supported_arguments(
|
33
|
+
[
|
34
|
+
'-Wformat', '-Waddress', '-Winit-self', '-Wno-multichar',
|
35
|
+
'-Wpointer-arith' , '-Wwrite-strings' ,
|
36
|
+
'-Wno-parentheses' , '-Wno-type-limits' ,
|
37
|
+
'-Wformat-security' , '-Wunreachable-code' ,
|
38
|
+
'-Waggregate-return' , '-Wformat-nonliteral' ,
|
39
|
+
'-Wmissing-declarations', '-Wmissing-include-dirs' ,
|
40
|
+
'-Wno-unused-parameter'
|
41
|
+
]
|
42
|
+
), language: lang)
|
43
|
+
endif
|
44
|
+
|
45
|
+
#
|
46
|
+
# Sub directory to project source code
|
47
|
+
subdir('src')
|
48
|
+
unity_dep = declare_dependency(link_with: unity_lib, include_directories: unity_dir)
|
@@ -1,16 +1,11 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
unity_dir = include_directories('.')
|
13
|
-
|
14
|
-
unity_lib = static_library(meson.project_name(),
|
15
|
-
sources: ['unity.c'],
|
16
|
-
include_directories: unity_dir)
|
1
|
+
#
|
2
|
+
# build script written by : Michael Brockus.
|
3
|
+
# github repo author: Mike Karlesky, Mark VanderVoord, Greg Williams.
|
4
|
+
#
|
5
|
+
# license: MIT
|
6
|
+
#
|
7
|
+
unity_dir = include_directories('.')
|
8
|
+
|
9
|
+
unity_lib = static_library(meson.project_name(),
|
10
|
+
sources: ['unity.c'],
|
11
|
+
include_directories: unity_dir)
|
@@ -1,2085 +1,2109 @@
|
|
1
|
-
/* =========================================================================
|
2
|
-
Unity Project - A Test Framework for C
|
3
|
-
Copyright (c) 2007-19 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
-
[Released under MIT License. Please refer to license.txt for details]
|
5
|
-
============================================================================ */
|
6
|
-
|
7
|
-
#include "unity.h"
|
8
|
-
#include <stddef.h>
|
9
|
-
|
10
|
-
#ifdef AVR
|
11
|
-
#include <avr/pgmspace.h>
|
12
|
-
#else
|
13
|
-
#define PROGMEM
|
14
|
-
#endif
|
15
|
-
|
16
|
-
/* If omitted from header, declare overrideable prototypes here so they're ready for use */
|
17
|
-
#ifdef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
|
18
|
-
void UNITY_OUTPUT_CHAR(int);
|
19
|
-
#endif
|
20
|
-
|
21
|
-
/* Helpful macros for us to use here in Assert functions */
|
22
|
-
#define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; UNITY_OUTPUT_FLUSH(); TEST_ABORT(); }
|
23
|
-
#define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; UNITY_OUTPUT_FLUSH(); TEST_ABORT(); }
|
24
|
-
#define RETURN_IF_FAIL_OR_IGNORE if (Unity.CurrentTestFailed || Unity.CurrentTestIgnored)
|
25
|
-
|
26
|
-
struct UNITY_STORAGE_T Unity;
|
27
|
-
|
28
|
-
#ifdef UNITY_OUTPUT_COLOR
|
29
|
-
const char PROGMEM UnityStrOk[] = "\033[42mOK\033[00m";
|
30
|
-
const char PROGMEM UnityStrPass[] = "\033[42mPASS\033[00m";
|
31
|
-
const char PROGMEM UnityStrFail[] = "\033[41mFAIL\033[00m";
|
32
|
-
const char PROGMEM UnityStrIgnore[] = "\033[43mIGNORE\033[00m";
|
33
|
-
#else
|
34
|
-
const char PROGMEM UnityStrOk[] = "OK";
|
35
|
-
const char PROGMEM UnityStrPass[] = "PASS";
|
36
|
-
const char PROGMEM UnityStrFail[] = "FAIL";
|
37
|
-
const char PROGMEM UnityStrIgnore[] = "IGNORE";
|
38
|
-
#endif
|
39
|
-
static const char PROGMEM UnityStrNull[] = "NULL";
|
40
|
-
static const char PROGMEM UnityStrSpacer[] = ". ";
|
41
|
-
static const char PROGMEM UnityStrExpected[] = " Expected ";
|
42
|
-
static const char PROGMEM UnityStrWas[] = " Was ";
|
43
|
-
static const char PROGMEM UnityStrGt[] = " to be greater than ";
|
44
|
-
static const char PROGMEM UnityStrLt[] = " to be less than ";
|
45
|
-
static const char PROGMEM UnityStrOrEqual[] = "or equal to ";
|
46
|
-
static const char PROGMEM
|
47
|
-
static const char PROGMEM
|
48
|
-
static const char PROGMEM
|
49
|
-
static const char PROGMEM
|
50
|
-
static const char PROGMEM
|
51
|
-
static const char PROGMEM
|
52
|
-
static const char PROGMEM
|
53
|
-
|
54
|
-
|
55
|
-
static const char PROGMEM
|
56
|
-
static const char PROGMEM
|
57
|
-
static const char PROGMEM
|
58
|
-
static const char PROGMEM
|
59
|
-
static const char PROGMEM
|
60
|
-
|
61
|
-
|
62
|
-
const char PROGMEM
|
63
|
-
const char PROGMEM
|
64
|
-
const char PROGMEM
|
65
|
-
|
66
|
-
static const char PROGMEM
|
67
|
-
static const char PROGMEM
|
68
|
-
static const char PROGMEM
|
69
|
-
static const char PROGMEM
|
70
|
-
static const char PROGMEM
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
UNITY_OUTPUT_CHAR('
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
UNITY_OUTPUT_CHAR('
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
UNITY_OUTPUT_CHAR('
|
102
|
-
|
103
|
-
|
104
|
-
}
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
pch
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
pch
|
146
|
-
|
147
|
-
|
148
|
-
}
|
149
|
-
|
150
|
-
/*-----------------------------------------------*/
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
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
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
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
|
-
|
273
|
-
|
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
|
-
if (
|
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
|
-
if
|
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
|
-
|
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
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
}
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
UnityPrint(
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
}
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
{
|
656
|
-
|
657
|
-
{
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
{
|
662
|
-
|
663
|
-
UnityPrint(
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
}
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
UnityPrint(
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
}
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
}
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
{
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
}
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
}
|
1301
|
-
else
|
1302
|
-
{
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
}
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
if
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
}
|
1521
|
-
|
1522
|
-
if (
|
1523
|
-
{
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
{
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
{
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
}
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
*
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
{
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
#
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
1786
|
-
}
|
1787
|
-
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
}
|
1822
|
-
|
1823
|
-
/*-----------------------------------------------*/
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1915
|
-
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
1932
|
-
|
1933
|
-
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
{
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1988
|
-
|
1989
|
-
|
1990
|
-
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
-
|
1995
|
-
|
1996
|
-
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
2002
|
-
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
2020
|
-
|
2021
|
-
|
2022
|
-
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
if (
|
2032
|
-
{
|
2033
|
-
|
2034
|
-
}
|
2035
|
-
|
2036
|
-
/*
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
|
2045
|
-
|
2046
|
-
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2050
|
-
|
2051
|
-
|
2052
|
-
|
2053
|
-
|
2054
|
-
|
2055
|
-
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
2059
|
-
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2071
|
-
|
2072
|
-
|
2073
|
-
|
2074
|
-
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
2085
|
-
|
1
|
+
/* =========================================================================
|
2
|
+
Unity Project - A Test Framework for C
|
3
|
+
Copyright (c) 2007-19 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
+
[Released under MIT License. Please refer to license.txt for details]
|
5
|
+
============================================================================ */
|
6
|
+
|
7
|
+
#include "unity.h"
|
8
|
+
#include <stddef.h>
|
9
|
+
|
10
|
+
#ifdef AVR
|
11
|
+
#include <avr/pgmspace.h>
|
12
|
+
#else
|
13
|
+
#define PROGMEM
|
14
|
+
#endif
|
15
|
+
|
16
|
+
/* If omitted from header, declare overrideable prototypes here so they're ready for use */
|
17
|
+
#ifdef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
|
18
|
+
void UNITY_OUTPUT_CHAR(int);
|
19
|
+
#endif
|
20
|
+
|
21
|
+
/* Helpful macros for us to use here in Assert functions */
|
22
|
+
#define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; UNITY_OUTPUT_FLUSH(); TEST_ABORT(); }
|
23
|
+
#define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; UNITY_OUTPUT_FLUSH(); TEST_ABORT(); }
|
24
|
+
#define RETURN_IF_FAIL_OR_IGNORE if (Unity.CurrentTestFailed || Unity.CurrentTestIgnored) TEST_ABORT()
|
25
|
+
|
26
|
+
struct UNITY_STORAGE_T Unity;
|
27
|
+
|
28
|
+
#ifdef UNITY_OUTPUT_COLOR
|
29
|
+
const char PROGMEM UnityStrOk[] = "\033[42mOK\033[00m";
|
30
|
+
const char PROGMEM UnityStrPass[] = "\033[42mPASS\033[00m";
|
31
|
+
const char PROGMEM UnityStrFail[] = "\033[41mFAIL\033[00m";
|
32
|
+
const char PROGMEM UnityStrIgnore[] = "\033[43mIGNORE\033[00m";
|
33
|
+
#else
|
34
|
+
const char PROGMEM UnityStrOk[] = "OK";
|
35
|
+
const char PROGMEM UnityStrPass[] = "PASS";
|
36
|
+
const char PROGMEM UnityStrFail[] = "FAIL";
|
37
|
+
const char PROGMEM UnityStrIgnore[] = "IGNORE";
|
38
|
+
#endif
|
39
|
+
static const char PROGMEM UnityStrNull[] = "NULL";
|
40
|
+
static const char PROGMEM UnityStrSpacer[] = ". ";
|
41
|
+
static const char PROGMEM UnityStrExpected[] = " Expected ";
|
42
|
+
static const char PROGMEM UnityStrWas[] = " Was ";
|
43
|
+
static const char PROGMEM UnityStrGt[] = " to be greater than ";
|
44
|
+
static const char PROGMEM UnityStrLt[] = " to be less than ";
|
45
|
+
static const char PROGMEM UnityStrOrEqual[] = "or equal to ";
|
46
|
+
static const char PROGMEM UnityStrNotEqual[] = " to be not equal to ";
|
47
|
+
static const char PROGMEM UnityStrElement[] = " Element ";
|
48
|
+
static const char PROGMEM UnityStrByte[] = " Byte ";
|
49
|
+
static const char PROGMEM UnityStrMemory[] = " Memory Mismatch.";
|
50
|
+
static const char PROGMEM UnityStrDelta[] = " Values Not Within Delta ";
|
51
|
+
static const char PROGMEM UnityStrPointless[] = " You Asked Me To Compare Nothing, Which Was Pointless.";
|
52
|
+
static const char PROGMEM UnityStrNullPointerForExpected[] = " Expected pointer to be NULL";
|
53
|
+
static const char PROGMEM UnityStrNullPointerForActual[] = " Actual pointer was NULL";
|
54
|
+
#ifndef UNITY_EXCLUDE_FLOAT
|
55
|
+
static const char PROGMEM UnityStrNot[] = "Not ";
|
56
|
+
static const char PROGMEM UnityStrInf[] = "Infinity";
|
57
|
+
static const char PROGMEM UnityStrNegInf[] = "Negative Infinity";
|
58
|
+
static const char PROGMEM UnityStrNaN[] = "NaN";
|
59
|
+
static const char PROGMEM UnityStrDet[] = "Determinate";
|
60
|
+
static const char PROGMEM UnityStrInvalidFloatTrait[] = "Invalid Float Trait";
|
61
|
+
#endif
|
62
|
+
const char PROGMEM UnityStrErrShorthand[] = "Unity Shorthand Support Disabled";
|
63
|
+
const char PROGMEM UnityStrErrFloat[] = "Unity Floating Point Disabled";
|
64
|
+
const char PROGMEM UnityStrErrDouble[] = "Unity Double Precision Disabled";
|
65
|
+
const char PROGMEM UnityStrErr64[] = "Unity 64-bit Support Disabled";
|
66
|
+
static const char PROGMEM UnityStrBreaker[] = "-----------------------";
|
67
|
+
static const char PROGMEM UnityStrResultsTests[] = " Tests ";
|
68
|
+
static const char PROGMEM UnityStrResultsFailures[] = " Failures ";
|
69
|
+
static const char PROGMEM UnityStrResultsIgnored[] = " Ignored ";
|
70
|
+
static const char PROGMEM UnityStrDetail1Name[] = UNITY_DETAIL1_NAME " ";
|
71
|
+
static const char PROGMEM UnityStrDetail2Name[] = " " UNITY_DETAIL2_NAME " ";
|
72
|
+
|
73
|
+
/*-----------------------------------------------
|
74
|
+
* Pretty Printers & Test Result Output Handlers
|
75
|
+
*-----------------------------------------------*/
|
76
|
+
|
77
|
+
/*-----------------------------------------------*/
|
78
|
+
/* Local helper function to print characters. */
|
79
|
+
static void UnityPrintChar(const char* pch)
|
80
|
+
{
|
81
|
+
/* printable characters plus CR & LF are printed */
|
82
|
+
if ((*pch <= 126) && (*pch >= 32))
|
83
|
+
{
|
84
|
+
UNITY_OUTPUT_CHAR(*pch);
|
85
|
+
}
|
86
|
+
/* write escaped carriage returns */
|
87
|
+
else if (*pch == 13)
|
88
|
+
{
|
89
|
+
UNITY_OUTPUT_CHAR('\\');
|
90
|
+
UNITY_OUTPUT_CHAR('r');
|
91
|
+
}
|
92
|
+
/* write escaped line feeds */
|
93
|
+
else if (*pch == 10)
|
94
|
+
{
|
95
|
+
UNITY_OUTPUT_CHAR('\\');
|
96
|
+
UNITY_OUTPUT_CHAR('n');
|
97
|
+
}
|
98
|
+
/* unprintable characters are shown as codes */
|
99
|
+
else
|
100
|
+
{
|
101
|
+
UNITY_OUTPUT_CHAR('\\');
|
102
|
+
UNITY_OUTPUT_CHAR('x');
|
103
|
+
UnityPrintNumberHex((UNITY_UINT)*pch, 2);
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
/*-----------------------------------------------*/
|
108
|
+
/* Local helper function to print ANSI escape strings e.g. "\033[42m". */
|
109
|
+
#ifdef UNITY_OUTPUT_COLOR
|
110
|
+
static UNITY_UINT UnityPrintAnsiEscapeString(const char* string)
|
111
|
+
{
|
112
|
+
const char* pch = string;
|
113
|
+
UNITY_UINT count = 0;
|
114
|
+
|
115
|
+
while (*pch && (*pch != 'm'))
|
116
|
+
{
|
117
|
+
UNITY_OUTPUT_CHAR(*pch);
|
118
|
+
pch++;
|
119
|
+
count++;
|
120
|
+
}
|
121
|
+
UNITY_OUTPUT_CHAR('m');
|
122
|
+
count++;
|
123
|
+
|
124
|
+
return count;
|
125
|
+
}
|
126
|
+
#endif
|
127
|
+
|
128
|
+
/*-----------------------------------------------*/
|
129
|
+
void UnityPrint(const char* string)
|
130
|
+
{
|
131
|
+
const char* pch = string;
|
132
|
+
|
133
|
+
if (pch != NULL)
|
134
|
+
{
|
135
|
+
while (*pch)
|
136
|
+
{
|
137
|
+
#ifdef UNITY_OUTPUT_COLOR
|
138
|
+
/* print ANSI escape code */
|
139
|
+
if ((*pch == 27) && (*(pch + 1) == '['))
|
140
|
+
{
|
141
|
+
pch += UnityPrintAnsiEscapeString(pch);
|
142
|
+
continue;
|
143
|
+
}
|
144
|
+
#endif
|
145
|
+
UnityPrintChar(pch);
|
146
|
+
pch++;
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
/*-----------------------------------------------*/
|
151
|
+
void UnityPrintLen(const char* string, const UNITY_UINT32 length)
|
152
|
+
{
|
153
|
+
const char* pch = string;
|
154
|
+
|
155
|
+
if (pch != NULL)
|
156
|
+
{
|
157
|
+
while (*pch && ((UNITY_UINT32)(pch - string) < length))
|
158
|
+
{
|
159
|
+
/* printable characters plus CR & LF are printed */
|
160
|
+
if ((*pch <= 126) && (*pch >= 32))
|
161
|
+
{
|
162
|
+
UNITY_OUTPUT_CHAR(*pch);
|
163
|
+
}
|
164
|
+
/* write escaped carriage returns */
|
165
|
+
else if (*pch == 13)
|
166
|
+
{
|
167
|
+
UNITY_OUTPUT_CHAR('\\');
|
168
|
+
UNITY_OUTPUT_CHAR('r');
|
169
|
+
}
|
170
|
+
/* write escaped line feeds */
|
171
|
+
else if (*pch == 10)
|
172
|
+
{
|
173
|
+
UNITY_OUTPUT_CHAR('\\');
|
174
|
+
UNITY_OUTPUT_CHAR('n');
|
175
|
+
}
|
176
|
+
/* unprintable characters are shown as codes */
|
177
|
+
else
|
178
|
+
{
|
179
|
+
UNITY_OUTPUT_CHAR('\\');
|
180
|
+
UNITY_OUTPUT_CHAR('x');
|
181
|
+
UnityPrintNumberHex((UNITY_UINT)*pch, 2);
|
182
|
+
}
|
183
|
+
pch++;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
}
|
187
|
+
|
188
|
+
/*-----------------------------------------------*/
|
189
|
+
void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style)
|
190
|
+
{
|
191
|
+
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
|
192
|
+
{
|
193
|
+
if (style == UNITY_DISPLAY_STYLE_CHAR)
|
194
|
+
{
|
195
|
+
/* printable characters plus CR & LF are printed */
|
196
|
+
UNITY_OUTPUT_CHAR('\'');
|
197
|
+
if ((number <= 126) && (number >= 32))
|
198
|
+
{
|
199
|
+
UNITY_OUTPUT_CHAR((int)number);
|
200
|
+
}
|
201
|
+
/* write escaped carriage returns */
|
202
|
+
else if (number == 13)
|
203
|
+
{
|
204
|
+
UNITY_OUTPUT_CHAR('\\');
|
205
|
+
UNITY_OUTPUT_CHAR('r');
|
206
|
+
}
|
207
|
+
/* write escaped line feeds */
|
208
|
+
else if (number == 10)
|
209
|
+
{
|
210
|
+
UNITY_OUTPUT_CHAR('\\');
|
211
|
+
UNITY_OUTPUT_CHAR('n');
|
212
|
+
}
|
213
|
+
/* unprintable characters are shown as codes */
|
214
|
+
else
|
215
|
+
{
|
216
|
+
UNITY_OUTPUT_CHAR('\\');
|
217
|
+
UNITY_OUTPUT_CHAR('x');
|
218
|
+
UnityPrintNumberHex((UNITY_UINT)number, 2);
|
219
|
+
}
|
220
|
+
UNITY_OUTPUT_CHAR('\'');
|
221
|
+
}
|
222
|
+
else
|
223
|
+
{
|
224
|
+
UnityPrintNumber(number);
|
225
|
+
}
|
226
|
+
}
|
227
|
+
else if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT)
|
228
|
+
{
|
229
|
+
UnityPrintNumberUnsigned((UNITY_UINT)number);
|
230
|
+
}
|
231
|
+
else
|
232
|
+
{
|
233
|
+
UNITY_OUTPUT_CHAR('0');
|
234
|
+
UNITY_OUTPUT_CHAR('x');
|
235
|
+
UnityPrintNumberHex((UNITY_UINT)number, (char)((style & 0xF) * 2));
|
236
|
+
}
|
237
|
+
}
|
238
|
+
|
239
|
+
/*-----------------------------------------------*/
|
240
|
+
void UnityPrintNumber(const UNITY_INT number_to_print)
|
241
|
+
{
|
242
|
+
UNITY_UINT number = (UNITY_UINT)number_to_print;
|
243
|
+
|
244
|
+
if (number_to_print < 0)
|
245
|
+
{
|
246
|
+
/* A negative number, including MIN negative */
|
247
|
+
UNITY_OUTPUT_CHAR('-');
|
248
|
+
number = (~number) + 1;
|
249
|
+
}
|
250
|
+
UnityPrintNumberUnsigned(number);
|
251
|
+
}
|
252
|
+
|
253
|
+
/*-----------------------------------------------
|
254
|
+
* basically do an itoa using as little ram as possible */
|
255
|
+
void UnityPrintNumberUnsigned(const UNITY_UINT number)
|
256
|
+
{
|
257
|
+
UNITY_UINT divisor = 1;
|
258
|
+
|
259
|
+
/* figure out initial divisor */
|
260
|
+
while (number / divisor > 9)
|
261
|
+
{
|
262
|
+
divisor *= 10;
|
263
|
+
}
|
264
|
+
|
265
|
+
/* now mod and print, then divide divisor */
|
266
|
+
do
|
267
|
+
{
|
268
|
+
UNITY_OUTPUT_CHAR((char)('0' + (number / divisor % 10)));
|
269
|
+
divisor /= 10;
|
270
|
+
} while (divisor > 0);
|
271
|
+
}
|
272
|
+
|
273
|
+
/*-----------------------------------------------*/
|
274
|
+
void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print)
|
275
|
+
{
|
276
|
+
int nibble;
|
277
|
+
char nibbles = nibbles_to_print;
|
278
|
+
|
279
|
+
if ((unsigned)nibbles > UNITY_MAX_NIBBLES)
|
280
|
+
{
|
281
|
+
nibbles = UNITY_MAX_NIBBLES;
|
282
|
+
}
|
283
|
+
|
284
|
+
while (nibbles > 0)
|
285
|
+
{
|
286
|
+
nibbles--;
|
287
|
+
nibble = (int)(number >> (nibbles * 4)) & 0x0F;
|
288
|
+
if (nibble <= 9)
|
289
|
+
{
|
290
|
+
UNITY_OUTPUT_CHAR((char)('0' + nibble));
|
291
|
+
}
|
292
|
+
else
|
293
|
+
{
|
294
|
+
UNITY_OUTPUT_CHAR((char)('A' - 10 + nibble));
|
295
|
+
}
|
296
|
+
}
|
297
|
+
}
|
298
|
+
|
299
|
+
/*-----------------------------------------------*/
|
300
|
+
void UnityPrintMask(const UNITY_UINT mask, const UNITY_UINT number)
|
301
|
+
{
|
302
|
+
UNITY_UINT current_bit = (UNITY_UINT)1 << (UNITY_INT_WIDTH - 1);
|
303
|
+
UNITY_INT32 i;
|
304
|
+
|
305
|
+
for (i = 0; i < UNITY_INT_WIDTH; i++)
|
306
|
+
{
|
307
|
+
if (current_bit & mask)
|
308
|
+
{
|
309
|
+
if (current_bit & number)
|
310
|
+
{
|
311
|
+
UNITY_OUTPUT_CHAR('1');
|
312
|
+
}
|
313
|
+
else
|
314
|
+
{
|
315
|
+
UNITY_OUTPUT_CHAR('0');
|
316
|
+
}
|
317
|
+
}
|
318
|
+
else
|
319
|
+
{
|
320
|
+
UNITY_OUTPUT_CHAR('X');
|
321
|
+
}
|
322
|
+
current_bit = current_bit >> 1;
|
323
|
+
}
|
324
|
+
}
|
325
|
+
|
326
|
+
/*-----------------------------------------------*/
|
327
|
+
#ifndef UNITY_EXCLUDE_FLOAT_PRINT
|
328
|
+
/*
|
329
|
+
* This function prints a floating-point value in a format similar to
|
330
|
+
* printf("%.7g") on a single-precision machine or printf("%.9g") on a
|
331
|
+
* double-precision machine. The 7th digit won't always be totally correct
|
332
|
+
* in single-precision operation (for that level of accuracy, a more
|
333
|
+
* complicated algorithm would be needed).
|
334
|
+
*/
|
335
|
+
void UnityPrintFloat(const UNITY_DOUBLE input_number)
|
336
|
+
{
|
337
|
+
#ifdef UNITY_INCLUDE_DOUBLE
|
338
|
+
static const int sig_digits = 9;
|
339
|
+
static const UNITY_INT32 min_scaled = 100000000;
|
340
|
+
static const UNITY_INT32 max_scaled = 1000000000;
|
341
|
+
#else
|
342
|
+
static const int sig_digits = 7;
|
343
|
+
static const UNITY_INT32 min_scaled = 1000000;
|
344
|
+
static const UNITY_INT32 max_scaled = 10000000;
|
345
|
+
#endif
|
346
|
+
|
347
|
+
UNITY_DOUBLE number = input_number;
|
348
|
+
|
349
|
+
/* print minus sign (does not handle negative zero) */
|
350
|
+
if (number < 0.0f)
|
351
|
+
{
|
352
|
+
UNITY_OUTPUT_CHAR('-');
|
353
|
+
number = -number;
|
354
|
+
}
|
355
|
+
|
356
|
+
/* handle zero, NaN, and +/- infinity */
|
357
|
+
if (number == 0.0f)
|
358
|
+
{
|
359
|
+
UnityPrint("0");
|
360
|
+
}
|
361
|
+
else if (isnan(number))
|
362
|
+
{
|
363
|
+
UnityPrint("nan");
|
364
|
+
}
|
365
|
+
else if (isinf(number))
|
366
|
+
{
|
367
|
+
UnityPrint("inf");
|
368
|
+
}
|
369
|
+
else
|
370
|
+
{
|
371
|
+
UNITY_INT32 n_int = 0, n;
|
372
|
+
int exponent = 0;
|
373
|
+
int decimals, digits;
|
374
|
+
char buf[16] = {0};
|
375
|
+
|
376
|
+
/*
|
377
|
+
* Scale up or down by powers of 10. To minimize rounding error,
|
378
|
+
* start with a factor/divisor of 10^10, which is the largest
|
379
|
+
* power of 10 that can be represented exactly. Finally, compute
|
380
|
+
* (exactly) the remaining power of 10 and perform one more
|
381
|
+
* multiplication or division.
|
382
|
+
*/
|
383
|
+
if (number < 1.0f)
|
384
|
+
{
|
385
|
+
UNITY_DOUBLE factor = 1.0f;
|
386
|
+
|
387
|
+
while (number < (UNITY_DOUBLE)max_scaled / 1e10f) { number *= 1e10f; exponent -= 10; }
|
388
|
+
while (number * factor < (UNITY_DOUBLE)min_scaled) { factor *= 10.0f; exponent--; }
|
389
|
+
|
390
|
+
number *= factor;
|
391
|
+
}
|
392
|
+
else if (number > (UNITY_DOUBLE)max_scaled)
|
393
|
+
{
|
394
|
+
UNITY_DOUBLE divisor = 1.0f;
|
395
|
+
|
396
|
+
while (number > (UNITY_DOUBLE)min_scaled * 1e10f) { number /= 1e10f; exponent += 10; }
|
397
|
+
while (number / divisor > (UNITY_DOUBLE)max_scaled) { divisor *= 10.0f; exponent++; }
|
398
|
+
|
399
|
+
number /= divisor;
|
400
|
+
}
|
401
|
+
else
|
402
|
+
{
|
403
|
+
/*
|
404
|
+
* In this range, we can split off the integer part before
|
405
|
+
* doing any multiplications. This reduces rounding error by
|
406
|
+
* freeing up significant bits in the fractional part.
|
407
|
+
*/
|
408
|
+
UNITY_DOUBLE factor = 1.0f;
|
409
|
+
n_int = (UNITY_INT32)number;
|
410
|
+
number -= (UNITY_DOUBLE)n_int;
|
411
|
+
|
412
|
+
while (n_int < min_scaled) { n_int *= 10; factor *= 10.0f; exponent--; }
|
413
|
+
|
414
|
+
number *= factor;
|
415
|
+
}
|
416
|
+
|
417
|
+
/* round to nearest integer */
|
418
|
+
n = ((UNITY_INT32)(number + number) + 1) / 2;
|
419
|
+
|
420
|
+
#ifndef UNITY_ROUND_TIES_AWAY_FROM_ZERO
|
421
|
+
/* round to even if exactly between two integers */
|
422
|
+
if ((n & 1) && (((UNITY_DOUBLE)n - number) == 0.5f))
|
423
|
+
n--;
|
424
|
+
#endif
|
425
|
+
|
426
|
+
n += n_int;
|
427
|
+
|
428
|
+
if (n >= max_scaled)
|
429
|
+
{
|
430
|
+
n = min_scaled;
|
431
|
+
exponent++;
|
432
|
+
}
|
433
|
+
|
434
|
+
/* determine where to place decimal point */
|
435
|
+
decimals = ((exponent <= 0) && (exponent >= -(sig_digits + 3))) ? (-exponent) : (sig_digits - 1);
|
436
|
+
exponent += decimals;
|
437
|
+
|
438
|
+
/* truncate trailing zeroes after decimal point */
|
439
|
+
while ((decimals > 0) && ((n % 10) == 0))
|
440
|
+
{
|
441
|
+
n /= 10;
|
442
|
+
decimals--;
|
443
|
+
}
|
444
|
+
|
445
|
+
/* build up buffer in reverse order */
|
446
|
+
digits = 0;
|
447
|
+
while ((n != 0) || (digits < (decimals + 1)))
|
448
|
+
{
|
449
|
+
buf[digits++] = (char)('0' + n % 10);
|
450
|
+
n /= 10;
|
451
|
+
}
|
452
|
+
while (digits > 0)
|
453
|
+
{
|
454
|
+
if (digits == decimals) { UNITY_OUTPUT_CHAR('.'); }
|
455
|
+
UNITY_OUTPUT_CHAR(buf[--digits]);
|
456
|
+
}
|
457
|
+
|
458
|
+
/* print exponent if needed */
|
459
|
+
if (exponent != 0)
|
460
|
+
{
|
461
|
+
UNITY_OUTPUT_CHAR('e');
|
462
|
+
|
463
|
+
if (exponent < 0)
|
464
|
+
{
|
465
|
+
UNITY_OUTPUT_CHAR('-');
|
466
|
+
exponent = -exponent;
|
467
|
+
}
|
468
|
+
else
|
469
|
+
{
|
470
|
+
UNITY_OUTPUT_CHAR('+');
|
471
|
+
}
|
472
|
+
|
473
|
+
digits = 0;
|
474
|
+
while ((exponent != 0) || (digits < 2))
|
475
|
+
{
|
476
|
+
buf[digits++] = (char)('0' + exponent % 10);
|
477
|
+
exponent /= 10;
|
478
|
+
}
|
479
|
+
while (digits > 0)
|
480
|
+
{
|
481
|
+
UNITY_OUTPUT_CHAR(buf[--digits]);
|
482
|
+
}
|
483
|
+
}
|
484
|
+
}
|
485
|
+
}
|
486
|
+
#endif /* ! UNITY_EXCLUDE_FLOAT_PRINT */
|
487
|
+
|
488
|
+
/*-----------------------------------------------*/
|
489
|
+
static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line)
|
490
|
+
{
|
491
|
+
#ifdef UNITY_OUTPUT_FOR_ECLIPSE
|
492
|
+
UNITY_OUTPUT_CHAR('(');
|
493
|
+
UnityPrint(file);
|
494
|
+
UNITY_OUTPUT_CHAR(':');
|
495
|
+
UnityPrintNumber((UNITY_INT)line);
|
496
|
+
UNITY_OUTPUT_CHAR(')');
|
497
|
+
UNITY_OUTPUT_CHAR(' ');
|
498
|
+
UnityPrint(Unity.CurrentTestName);
|
499
|
+
UNITY_OUTPUT_CHAR(':');
|
500
|
+
#else
|
501
|
+
#ifdef UNITY_OUTPUT_FOR_IAR_WORKBENCH
|
502
|
+
UnityPrint("<SRCREF line=");
|
503
|
+
UnityPrintNumber((UNITY_INT)line);
|
504
|
+
UnityPrint(" file=\"");
|
505
|
+
UnityPrint(file);
|
506
|
+
UNITY_OUTPUT_CHAR('"');
|
507
|
+
UNITY_OUTPUT_CHAR('>');
|
508
|
+
UnityPrint(Unity.CurrentTestName);
|
509
|
+
UnityPrint("</SRCREF> ");
|
510
|
+
#else
|
511
|
+
#ifdef UNITY_OUTPUT_FOR_QT_CREATOR
|
512
|
+
UnityPrint("file://");
|
513
|
+
UnityPrint(file);
|
514
|
+
UNITY_OUTPUT_CHAR(':');
|
515
|
+
UnityPrintNumber((UNITY_INT)line);
|
516
|
+
UNITY_OUTPUT_CHAR(' ');
|
517
|
+
UnityPrint(Unity.CurrentTestName);
|
518
|
+
UNITY_OUTPUT_CHAR(':');
|
519
|
+
#else
|
520
|
+
UnityPrint(file);
|
521
|
+
UNITY_OUTPUT_CHAR(':');
|
522
|
+
UnityPrintNumber((UNITY_INT)line);
|
523
|
+
UNITY_OUTPUT_CHAR(':');
|
524
|
+
UnityPrint(Unity.CurrentTestName);
|
525
|
+
UNITY_OUTPUT_CHAR(':');
|
526
|
+
#endif
|
527
|
+
#endif
|
528
|
+
#endif
|
529
|
+
}
|
530
|
+
|
531
|
+
/*-----------------------------------------------*/
|
532
|
+
static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line)
|
533
|
+
{
|
534
|
+
UnityTestResultsBegin(Unity.TestFile, line);
|
535
|
+
UnityPrint(UnityStrFail);
|
536
|
+
UNITY_OUTPUT_CHAR(':');
|
537
|
+
}
|
538
|
+
|
539
|
+
/*-----------------------------------------------*/
|
540
|
+
void UnityConcludeTest(void)
|
541
|
+
{
|
542
|
+
if (Unity.CurrentTestIgnored)
|
543
|
+
{
|
544
|
+
Unity.TestIgnores++;
|
545
|
+
}
|
546
|
+
else if (!Unity.CurrentTestFailed)
|
547
|
+
{
|
548
|
+
UnityTestResultsBegin(Unity.TestFile, Unity.CurrentTestLineNumber);
|
549
|
+
UnityPrint(UnityStrPass);
|
550
|
+
}
|
551
|
+
else
|
552
|
+
{
|
553
|
+
Unity.TestFailures++;
|
554
|
+
}
|
555
|
+
|
556
|
+
Unity.CurrentTestFailed = 0;
|
557
|
+
Unity.CurrentTestIgnored = 0;
|
558
|
+
UNITY_PRINT_EXEC_TIME();
|
559
|
+
UNITY_PRINT_EOL();
|
560
|
+
UNITY_FLUSH_CALL();
|
561
|
+
}
|
562
|
+
|
563
|
+
/*-----------------------------------------------*/
|
564
|
+
static void UnityAddMsgIfSpecified(const char* msg)
|
565
|
+
{
|
566
|
+
if (msg)
|
567
|
+
{
|
568
|
+
UnityPrint(UnityStrSpacer);
|
569
|
+
|
570
|
+
#ifdef UNITY_PRINT_TEST_CONTEXT
|
571
|
+
UNITY_PRINT_TEST_CONTEXT();
|
572
|
+
#endif
|
573
|
+
#ifndef UNITY_EXCLUDE_DETAILS
|
574
|
+
if (Unity.CurrentDetail1)
|
575
|
+
{
|
576
|
+
UnityPrint(UnityStrDetail1Name);
|
577
|
+
UnityPrint(Unity.CurrentDetail1);
|
578
|
+
if (Unity.CurrentDetail2)
|
579
|
+
{
|
580
|
+
UnityPrint(UnityStrDetail2Name);
|
581
|
+
UnityPrint(Unity.CurrentDetail2);
|
582
|
+
}
|
583
|
+
UnityPrint(UnityStrSpacer);
|
584
|
+
}
|
585
|
+
#endif
|
586
|
+
UnityPrint(msg);
|
587
|
+
}
|
588
|
+
}
|
589
|
+
|
590
|
+
/*-----------------------------------------------*/
|
591
|
+
static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual)
|
592
|
+
{
|
593
|
+
UnityPrint(UnityStrExpected);
|
594
|
+
if (expected != NULL)
|
595
|
+
{
|
596
|
+
UNITY_OUTPUT_CHAR('\'');
|
597
|
+
UnityPrint(expected);
|
598
|
+
UNITY_OUTPUT_CHAR('\'');
|
599
|
+
}
|
600
|
+
else
|
601
|
+
{
|
602
|
+
UnityPrint(UnityStrNull);
|
603
|
+
}
|
604
|
+
UnityPrint(UnityStrWas);
|
605
|
+
if (actual != NULL)
|
606
|
+
{
|
607
|
+
UNITY_OUTPUT_CHAR('\'');
|
608
|
+
UnityPrint(actual);
|
609
|
+
UNITY_OUTPUT_CHAR('\'');
|
610
|
+
}
|
611
|
+
else
|
612
|
+
{
|
613
|
+
UnityPrint(UnityStrNull);
|
614
|
+
}
|
615
|
+
}
|
616
|
+
|
617
|
+
/*-----------------------------------------------*/
|
618
|
+
static void UnityPrintExpectedAndActualStringsLen(const char* expected,
|
619
|
+
const char* actual,
|
620
|
+
const UNITY_UINT32 length)
|
621
|
+
{
|
622
|
+
UnityPrint(UnityStrExpected);
|
623
|
+
if (expected != NULL)
|
624
|
+
{
|
625
|
+
UNITY_OUTPUT_CHAR('\'');
|
626
|
+
UnityPrintLen(expected, length);
|
627
|
+
UNITY_OUTPUT_CHAR('\'');
|
628
|
+
}
|
629
|
+
else
|
630
|
+
{
|
631
|
+
UnityPrint(UnityStrNull);
|
632
|
+
}
|
633
|
+
UnityPrint(UnityStrWas);
|
634
|
+
if (actual != NULL)
|
635
|
+
{
|
636
|
+
UNITY_OUTPUT_CHAR('\'');
|
637
|
+
UnityPrintLen(actual, length);
|
638
|
+
UNITY_OUTPUT_CHAR('\'');
|
639
|
+
}
|
640
|
+
else
|
641
|
+
{
|
642
|
+
UnityPrint(UnityStrNull);
|
643
|
+
}
|
644
|
+
}
|
645
|
+
|
646
|
+
/*-----------------------------------------------
|
647
|
+
* Assertion & Control Helpers
|
648
|
+
*-----------------------------------------------*/
|
649
|
+
|
650
|
+
/*-----------------------------------------------*/
|
651
|
+
static int UnityIsOneArrayNull(UNITY_INTERNAL_PTR expected,
|
652
|
+
UNITY_INTERNAL_PTR actual,
|
653
|
+
const UNITY_LINE_TYPE lineNumber,
|
654
|
+
const char* msg)
|
655
|
+
{
|
656
|
+
/* Both are NULL or same pointer */
|
657
|
+
if (expected == actual) { return 0; }
|
658
|
+
|
659
|
+
/* print and return true if just expected is NULL */
|
660
|
+
if (expected == NULL)
|
661
|
+
{
|
662
|
+
UnityTestResultsFailBegin(lineNumber);
|
663
|
+
UnityPrint(UnityStrNullPointerForExpected);
|
664
|
+
UnityAddMsgIfSpecified(msg);
|
665
|
+
return 1;
|
666
|
+
}
|
667
|
+
|
668
|
+
/* print and return true if just actual is NULL */
|
669
|
+
if (actual == NULL)
|
670
|
+
{
|
671
|
+
UnityTestResultsFailBegin(lineNumber);
|
672
|
+
UnityPrint(UnityStrNullPointerForActual);
|
673
|
+
UnityAddMsgIfSpecified(msg);
|
674
|
+
return 1;
|
675
|
+
}
|
676
|
+
|
677
|
+
return 0; /* return false if neither is NULL */
|
678
|
+
}
|
679
|
+
|
680
|
+
/*-----------------------------------------------
|
681
|
+
* Assertion Functions
|
682
|
+
*-----------------------------------------------*/
|
683
|
+
|
684
|
+
/*-----------------------------------------------*/
|
685
|
+
void UnityAssertBits(const UNITY_INT mask,
|
686
|
+
const UNITY_INT expected,
|
687
|
+
const UNITY_INT actual,
|
688
|
+
const char* msg,
|
689
|
+
const UNITY_LINE_TYPE lineNumber)
|
690
|
+
{
|
691
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
692
|
+
|
693
|
+
if ((mask & expected) != (mask & actual))
|
694
|
+
{
|
695
|
+
UnityTestResultsFailBegin(lineNumber);
|
696
|
+
UnityPrint(UnityStrExpected);
|
697
|
+
UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)expected);
|
698
|
+
UnityPrint(UnityStrWas);
|
699
|
+
UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)actual);
|
700
|
+
UnityAddMsgIfSpecified(msg);
|
701
|
+
UNITY_FAIL_AND_BAIL;
|
702
|
+
}
|
703
|
+
}
|
704
|
+
|
705
|
+
/*-----------------------------------------------*/
|
706
|
+
void UnityAssertEqualNumber(const UNITY_INT expected,
|
707
|
+
const UNITY_INT actual,
|
708
|
+
const char* msg,
|
709
|
+
const UNITY_LINE_TYPE lineNumber,
|
710
|
+
const UNITY_DISPLAY_STYLE_T style)
|
711
|
+
{
|
712
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
713
|
+
|
714
|
+
if (expected != actual)
|
715
|
+
{
|
716
|
+
UnityTestResultsFailBegin(lineNumber);
|
717
|
+
UnityPrint(UnityStrExpected);
|
718
|
+
UnityPrintNumberByStyle(expected, style);
|
719
|
+
UnityPrint(UnityStrWas);
|
720
|
+
UnityPrintNumberByStyle(actual, style);
|
721
|
+
UnityAddMsgIfSpecified(msg);
|
722
|
+
UNITY_FAIL_AND_BAIL;
|
723
|
+
}
|
724
|
+
}
|
725
|
+
|
726
|
+
/*-----------------------------------------------*/
|
727
|
+
void UnityAssertGreaterOrLessOrEqualNumber(const UNITY_INT threshold,
|
728
|
+
const UNITY_INT actual,
|
729
|
+
const UNITY_COMPARISON_T compare,
|
730
|
+
const char *msg,
|
731
|
+
const UNITY_LINE_TYPE lineNumber,
|
732
|
+
const UNITY_DISPLAY_STYLE_T style)
|
733
|
+
{
|
734
|
+
int failed = 0;
|
735
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
736
|
+
|
737
|
+
if ((threshold == actual) && (compare & UNITY_EQUAL_TO)) { return; }
|
738
|
+
if ((threshold == actual)) { failed = 1; }
|
739
|
+
|
740
|
+
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
|
741
|
+
{
|
742
|
+
if ((actual > threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
|
743
|
+
if ((actual < threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
|
744
|
+
}
|
745
|
+
else /* UINT or HEX */
|
746
|
+
{
|
747
|
+
if (((UNITY_UINT)actual > (UNITY_UINT)threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
|
748
|
+
if (((UNITY_UINT)actual < (UNITY_UINT)threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
|
749
|
+
}
|
750
|
+
|
751
|
+
if (failed)
|
752
|
+
{
|
753
|
+
UnityTestResultsFailBegin(lineNumber);
|
754
|
+
UnityPrint(UnityStrExpected);
|
755
|
+
UnityPrintNumberByStyle(actual, style);
|
756
|
+
if (compare & UNITY_GREATER_THAN) { UnityPrint(UnityStrGt); }
|
757
|
+
if (compare & UNITY_SMALLER_THAN) { UnityPrint(UnityStrLt); }
|
758
|
+
if (compare & UNITY_EQUAL_TO) { UnityPrint(UnityStrOrEqual); }
|
759
|
+
if (compare == UNITY_NOT_EQUAL) { UnityPrint(UnityStrNotEqual); }
|
760
|
+
UnityPrintNumberByStyle(threshold, style);
|
761
|
+
UnityAddMsgIfSpecified(msg);
|
762
|
+
UNITY_FAIL_AND_BAIL;
|
763
|
+
}
|
764
|
+
}
|
765
|
+
|
766
|
+
#define UnityPrintPointlessAndBail() \
|
767
|
+
{ \
|
768
|
+
UnityTestResultsFailBegin(lineNumber); \
|
769
|
+
UnityPrint(UnityStrPointless); \
|
770
|
+
UnityAddMsgIfSpecified(msg); \
|
771
|
+
UNITY_FAIL_AND_BAIL; }
|
772
|
+
|
773
|
+
/*-----------------------------------------------*/
|
774
|
+
void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
|
775
|
+
UNITY_INTERNAL_PTR actual,
|
776
|
+
const UNITY_UINT32 num_elements,
|
777
|
+
const char* msg,
|
778
|
+
const UNITY_LINE_TYPE lineNumber,
|
779
|
+
const UNITY_DISPLAY_STYLE_T style,
|
780
|
+
const UNITY_FLAGS_T flags)
|
781
|
+
{
|
782
|
+
UNITY_UINT32 elements = num_elements;
|
783
|
+
unsigned int length = style & 0xF;
|
784
|
+
unsigned int increment = 0;
|
785
|
+
|
786
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
787
|
+
|
788
|
+
if (num_elements == 0)
|
789
|
+
{
|
790
|
+
UnityPrintPointlessAndBail();
|
791
|
+
}
|
792
|
+
|
793
|
+
if (expected == actual)
|
794
|
+
{
|
795
|
+
return; /* Both are NULL or same pointer */
|
796
|
+
}
|
797
|
+
|
798
|
+
if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
|
799
|
+
{
|
800
|
+
UNITY_FAIL_AND_BAIL;
|
801
|
+
}
|
802
|
+
|
803
|
+
while ((elements > 0) && (elements--))
|
804
|
+
{
|
805
|
+
UNITY_INT expect_val;
|
806
|
+
UNITY_INT actual_val;
|
807
|
+
|
808
|
+
switch (length)
|
809
|
+
{
|
810
|
+
case 1:
|
811
|
+
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)expected;
|
812
|
+
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)actual;
|
813
|
+
increment = sizeof(UNITY_INT8);
|
814
|
+
break;
|
815
|
+
|
816
|
+
case 2:
|
817
|
+
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)expected;
|
818
|
+
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)actual;
|
819
|
+
increment = sizeof(UNITY_INT16);
|
820
|
+
break;
|
821
|
+
|
822
|
+
#ifdef UNITY_SUPPORT_64
|
823
|
+
case 8:
|
824
|
+
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)expected;
|
825
|
+
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)actual;
|
826
|
+
increment = sizeof(UNITY_INT64);
|
827
|
+
break;
|
828
|
+
#endif
|
829
|
+
|
830
|
+
default: /* default is length 4 bytes */
|
831
|
+
case 4:
|
832
|
+
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)expected;
|
833
|
+
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)actual;
|
834
|
+
increment = sizeof(UNITY_INT32);
|
835
|
+
length = 4;
|
836
|
+
break;
|
837
|
+
}
|
838
|
+
|
839
|
+
if (expect_val != actual_val)
|
840
|
+
{
|
841
|
+
if ((style & UNITY_DISPLAY_RANGE_UINT) && (length < (UNITY_INT_WIDTH / 8)))
|
842
|
+
{ /* For UINT, remove sign extension (padding 1's) from signed type casts above */
|
843
|
+
UNITY_INT mask = 1;
|
844
|
+
mask = (mask << 8 * length) - 1;
|
845
|
+
expect_val &= mask;
|
846
|
+
actual_val &= mask;
|
847
|
+
}
|
848
|
+
UnityTestResultsFailBegin(lineNumber);
|
849
|
+
UnityPrint(UnityStrElement);
|
850
|
+
UnityPrintNumberUnsigned(num_elements - elements - 1);
|
851
|
+
UnityPrint(UnityStrExpected);
|
852
|
+
UnityPrintNumberByStyle(expect_val, style);
|
853
|
+
UnityPrint(UnityStrWas);
|
854
|
+
UnityPrintNumberByStyle(actual_val, style);
|
855
|
+
UnityAddMsgIfSpecified(msg);
|
856
|
+
UNITY_FAIL_AND_BAIL;
|
857
|
+
}
|
858
|
+
/* Walk through array by incrementing the pointers */
|
859
|
+
if (flags == UNITY_ARRAY_TO_ARRAY)
|
860
|
+
{
|
861
|
+
expected = (UNITY_INTERNAL_PTR)((const char*)expected + increment);
|
862
|
+
}
|
863
|
+
actual = (UNITY_INTERNAL_PTR)((const char*)actual + increment);
|
864
|
+
}
|
865
|
+
}
|
866
|
+
|
867
|
+
/*-----------------------------------------------*/
|
868
|
+
#ifndef UNITY_EXCLUDE_FLOAT
|
869
|
+
/* Wrap this define in a function with variable types as float or double */
|
870
|
+
#define UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff) \
|
871
|
+
if (isinf(expected) && isinf(actual) && (((expected) < 0) == ((actual) < 0))) return 1; \
|
872
|
+
if (UNITY_NAN_CHECK) return 1; \
|
873
|
+
(diff) = (actual) - (expected); \
|
874
|
+
if ((diff) < 0) (diff) = -(diff); \
|
875
|
+
if ((delta) < 0) (delta) = -(delta); \
|
876
|
+
return !(isnan(diff) || isinf(diff) || ((diff) > (delta)))
|
877
|
+
/* This first part of this condition will catch any NaN or Infinite values */
|
878
|
+
#ifndef UNITY_NAN_NOT_EQUAL_NAN
|
879
|
+
#define UNITY_NAN_CHECK isnan(expected) && isnan(actual)
|
880
|
+
#else
|
881
|
+
#define UNITY_NAN_CHECK 0
|
882
|
+
#endif
|
883
|
+
|
884
|
+
#ifndef UNITY_EXCLUDE_FLOAT_PRINT
|
885
|
+
#define UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual) \
|
886
|
+
{ \
|
887
|
+
UnityPrint(UnityStrExpected); \
|
888
|
+
UnityPrintFloat(expected); \
|
889
|
+
UnityPrint(UnityStrWas); \
|
890
|
+
UnityPrintFloat(actual); }
|
891
|
+
#else
|
892
|
+
#define UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual) \
|
893
|
+
UnityPrint(UnityStrDelta)
|
894
|
+
#endif /* UNITY_EXCLUDE_FLOAT_PRINT */
|
895
|
+
|
896
|
+
/*-----------------------------------------------*/
|
897
|
+
static int UnityFloatsWithin(UNITY_FLOAT delta, UNITY_FLOAT expected, UNITY_FLOAT actual)
|
898
|
+
{
|
899
|
+
UNITY_FLOAT diff;
|
900
|
+
UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
|
901
|
+
}
|
902
|
+
|
903
|
+
/*-----------------------------------------------*/
|
904
|
+
void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* expected,
|
905
|
+
UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* actual,
|
906
|
+
const UNITY_UINT32 num_elements,
|
907
|
+
const char* msg,
|
908
|
+
const UNITY_LINE_TYPE lineNumber,
|
909
|
+
const UNITY_FLAGS_T flags)
|
910
|
+
{
|
911
|
+
UNITY_UINT32 elements = num_elements;
|
912
|
+
UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* ptr_expected = expected;
|
913
|
+
UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* ptr_actual = actual;
|
914
|
+
|
915
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
916
|
+
|
917
|
+
if (elements == 0)
|
918
|
+
{
|
919
|
+
UnityPrintPointlessAndBail();
|
920
|
+
}
|
921
|
+
|
922
|
+
if (expected == actual)
|
923
|
+
{
|
924
|
+
return; /* Both are NULL or same pointer */
|
925
|
+
}
|
926
|
+
|
927
|
+
if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
|
928
|
+
{
|
929
|
+
UNITY_FAIL_AND_BAIL;
|
930
|
+
}
|
931
|
+
|
932
|
+
while (elements--)
|
933
|
+
{
|
934
|
+
if (!UnityFloatsWithin(*ptr_expected * UNITY_FLOAT_PRECISION, *ptr_expected, *ptr_actual))
|
935
|
+
{
|
936
|
+
UnityTestResultsFailBegin(lineNumber);
|
937
|
+
UnityPrint(UnityStrElement);
|
938
|
+
UnityPrintNumberUnsigned(num_elements - elements - 1);
|
939
|
+
UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT((UNITY_DOUBLE)*ptr_expected, (UNITY_DOUBLE)*ptr_actual);
|
940
|
+
UnityAddMsgIfSpecified(msg);
|
941
|
+
UNITY_FAIL_AND_BAIL;
|
942
|
+
}
|
943
|
+
if (flags == UNITY_ARRAY_TO_ARRAY)
|
944
|
+
{
|
945
|
+
ptr_expected++;
|
946
|
+
}
|
947
|
+
ptr_actual++;
|
948
|
+
}
|
949
|
+
}
|
950
|
+
|
951
|
+
/*-----------------------------------------------*/
|
952
|
+
void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
|
953
|
+
const UNITY_FLOAT expected,
|
954
|
+
const UNITY_FLOAT actual,
|
955
|
+
const char* msg,
|
956
|
+
const UNITY_LINE_TYPE lineNumber)
|
957
|
+
{
|
958
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
959
|
+
|
960
|
+
|
961
|
+
if (!UnityFloatsWithin(delta, expected, actual))
|
962
|
+
{
|
963
|
+
UnityTestResultsFailBegin(lineNumber);
|
964
|
+
UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT((UNITY_DOUBLE)expected, (UNITY_DOUBLE)actual);
|
965
|
+
UnityAddMsgIfSpecified(msg);
|
966
|
+
UNITY_FAIL_AND_BAIL;
|
967
|
+
}
|
968
|
+
}
|
969
|
+
|
970
|
+
/*-----------------------------------------------*/
|
971
|
+
void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
|
972
|
+
const char* msg,
|
973
|
+
const UNITY_LINE_TYPE lineNumber,
|
974
|
+
const UNITY_FLOAT_TRAIT_T style)
|
975
|
+
{
|
976
|
+
const char* trait_names[] = {UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet};
|
977
|
+
UNITY_INT should_be_trait = ((UNITY_INT)style & 1);
|
978
|
+
UNITY_INT is_trait = !should_be_trait;
|
979
|
+
UNITY_INT trait_index = (UNITY_INT)(style >> 1);
|
980
|
+
|
981
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
982
|
+
|
983
|
+
switch (style)
|
984
|
+
{
|
985
|
+
case UNITY_FLOAT_IS_INF:
|
986
|
+
case UNITY_FLOAT_IS_NOT_INF:
|
987
|
+
is_trait = isinf(actual) && (actual > 0);
|
988
|
+
break;
|
989
|
+
case UNITY_FLOAT_IS_NEG_INF:
|
990
|
+
case UNITY_FLOAT_IS_NOT_NEG_INF:
|
991
|
+
is_trait = isinf(actual) && (actual < 0);
|
992
|
+
break;
|
993
|
+
|
994
|
+
case UNITY_FLOAT_IS_NAN:
|
995
|
+
case UNITY_FLOAT_IS_NOT_NAN:
|
996
|
+
is_trait = isnan(actual) ? 1 : 0;
|
997
|
+
break;
|
998
|
+
|
999
|
+
case UNITY_FLOAT_IS_DET: /* A determinate number is non infinite and not NaN. */
|
1000
|
+
case UNITY_FLOAT_IS_NOT_DET:
|
1001
|
+
is_trait = !isinf(actual) && !isnan(actual);
|
1002
|
+
break;
|
1003
|
+
|
1004
|
+
default:
|
1005
|
+
trait_index = 0;
|
1006
|
+
trait_names[0] = UnityStrInvalidFloatTrait;
|
1007
|
+
break;
|
1008
|
+
}
|
1009
|
+
|
1010
|
+
if (is_trait != should_be_trait)
|
1011
|
+
{
|
1012
|
+
UnityTestResultsFailBegin(lineNumber);
|
1013
|
+
UnityPrint(UnityStrExpected);
|
1014
|
+
if (!should_be_trait)
|
1015
|
+
{
|
1016
|
+
UnityPrint(UnityStrNot);
|
1017
|
+
}
|
1018
|
+
UnityPrint(trait_names[trait_index]);
|
1019
|
+
UnityPrint(UnityStrWas);
|
1020
|
+
#ifndef UNITY_EXCLUDE_FLOAT_PRINT
|
1021
|
+
UnityPrintFloat((UNITY_DOUBLE)actual);
|
1022
|
+
#else
|
1023
|
+
if (should_be_trait)
|
1024
|
+
{
|
1025
|
+
UnityPrint(UnityStrNot);
|
1026
|
+
}
|
1027
|
+
UnityPrint(trait_names[trait_index]);
|
1028
|
+
#endif
|
1029
|
+
UnityAddMsgIfSpecified(msg);
|
1030
|
+
UNITY_FAIL_AND_BAIL;
|
1031
|
+
}
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
#endif /* not UNITY_EXCLUDE_FLOAT */
|
1035
|
+
|
1036
|
+
/*-----------------------------------------------*/
|
1037
|
+
#ifndef UNITY_EXCLUDE_DOUBLE
|
1038
|
+
static int UnityDoublesWithin(UNITY_DOUBLE delta, UNITY_DOUBLE expected, UNITY_DOUBLE actual)
|
1039
|
+
{
|
1040
|
+
UNITY_DOUBLE diff;
|
1041
|
+
UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
/*-----------------------------------------------*/
|
1045
|
+
void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* expected,
|
1046
|
+
UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* actual,
|
1047
|
+
const UNITY_UINT32 num_elements,
|
1048
|
+
const char* msg,
|
1049
|
+
const UNITY_LINE_TYPE lineNumber,
|
1050
|
+
const UNITY_FLAGS_T flags)
|
1051
|
+
{
|
1052
|
+
UNITY_UINT32 elements = num_elements;
|
1053
|
+
UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* ptr_expected = expected;
|
1054
|
+
UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* ptr_actual = actual;
|
1055
|
+
|
1056
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1057
|
+
|
1058
|
+
if (elements == 0)
|
1059
|
+
{
|
1060
|
+
UnityPrintPointlessAndBail();
|
1061
|
+
}
|
1062
|
+
|
1063
|
+
if (expected == actual)
|
1064
|
+
{
|
1065
|
+
return; /* Both are NULL or same pointer */
|
1066
|
+
}
|
1067
|
+
|
1068
|
+
if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
|
1069
|
+
{
|
1070
|
+
UNITY_FAIL_AND_BAIL;
|
1071
|
+
}
|
1072
|
+
|
1073
|
+
while (elements--)
|
1074
|
+
{
|
1075
|
+
if (!UnityDoublesWithin(*ptr_expected * UNITY_DOUBLE_PRECISION, *ptr_expected, *ptr_actual))
|
1076
|
+
{
|
1077
|
+
UnityTestResultsFailBegin(lineNumber);
|
1078
|
+
UnityPrint(UnityStrElement);
|
1079
|
+
UnityPrintNumberUnsigned(num_elements - elements - 1);
|
1080
|
+
UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(*ptr_expected, *ptr_actual);
|
1081
|
+
UnityAddMsgIfSpecified(msg);
|
1082
|
+
UNITY_FAIL_AND_BAIL;
|
1083
|
+
}
|
1084
|
+
if (flags == UNITY_ARRAY_TO_ARRAY)
|
1085
|
+
{
|
1086
|
+
ptr_expected++;
|
1087
|
+
}
|
1088
|
+
ptr_actual++;
|
1089
|
+
}
|
1090
|
+
}
|
1091
|
+
|
1092
|
+
/*-----------------------------------------------*/
|
1093
|
+
void UnityAssertDoublesWithin(const UNITY_DOUBLE delta,
|
1094
|
+
const UNITY_DOUBLE expected,
|
1095
|
+
const UNITY_DOUBLE actual,
|
1096
|
+
const char* msg,
|
1097
|
+
const UNITY_LINE_TYPE lineNumber)
|
1098
|
+
{
|
1099
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1100
|
+
|
1101
|
+
if (!UnityDoublesWithin(delta, expected, actual))
|
1102
|
+
{
|
1103
|
+
UnityTestResultsFailBegin(lineNumber);
|
1104
|
+
UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual);
|
1105
|
+
UnityAddMsgIfSpecified(msg);
|
1106
|
+
UNITY_FAIL_AND_BAIL;
|
1107
|
+
}
|
1108
|
+
}
|
1109
|
+
|
1110
|
+
/*-----------------------------------------------*/
|
1111
|
+
void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
|
1112
|
+
const char* msg,
|
1113
|
+
const UNITY_LINE_TYPE lineNumber,
|
1114
|
+
const UNITY_FLOAT_TRAIT_T style)
|
1115
|
+
{
|
1116
|
+
const char* trait_names[] = {UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet};
|
1117
|
+
UNITY_INT should_be_trait = ((UNITY_INT)style & 1);
|
1118
|
+
UNITY_INT is_trait = !should_be_trait;
|
1119
|
+
UNITY_INT trait_index = (UNITY_INT)(style >> 1);
|
1120
|
+
|
1121
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1122
|
+
|
1123
|
+
switch (style)
|
1124
|
+
{
|
1125
|
+
case UNITY_FLOAT_IS_INF:
|
1126
|
+
case UNITY_FLOAT_IS_NOT_INF:
|
1127
|
+
is_trait = isinf(actual) && (actual > 0);
|
1128
|
+
break;
|
1129
|
+
case UNITY_FLOAT_IS_NEG_INF:
|
1130
|
+
case UNITY_FLOAT_IS_NOT_NEG_INF:
|
1131
|
+
is_trait = isinf(actual) && (actual < 0);
|
1132
|
+
break;
|
1133
|
+
|
1134
|
+
case UNITY_FLOAT_IS_NAN:
|
1135
|
+
case UNITY_FLOAT_IS_NOT_NAN:
|
1136
|
+
is_trait = isnan(actual) ? 1 : 0;
|
1137
|
+
break;
|
1138
|
+
|
1139
|
+
case UNITY_FLOAT_IS_DET: /* A determinate number is non infinite and not NaN. */
|
1140
|
+
case UNITY_FLOAT_IS_NOT_DET:
|
1141
|
+
is_trait = !isinf(actual) && !isnan(actual);
|
1142
|
+
break;
|
1143
|
+
|
1144
|
+
default:
|
1145
|
+
trait_index = 0;
|
1146
|
+
trait_names[0] = UnityStrInvalidFloatTrait;
|
1147
|
+
break;
|
1148
|
+
}
|
1149
|
+
|
1150
|
+
if (is_trait != should_be_trait)
|
1151
|
+
{
|
1152
|
+
UnityTestResultsFailBegin(lineNumber);
|
1153
|
+
UnityPrint(UnityStrExpected);
|
1154
|
+
if (!should_be_trait)
|
1155
|
+
{
|
1156
|
+
UnityPrint(UnityStrNot);
|
1157
|
+
}
|
1158
|
+
UnityPrint(trait_names[trait_index]);
|
1159
|
+
UnityPrint(UnityStrWas);
|
1160
|
+
#ifndef UNITY_EXCLUDE_FLOAT_PRINT
|
1161
|
+
UnityPrintFloat(actual);
|
1162
|
+
#else
|
1163
|
+
if (should_be_trait)
|
1164
|
+
{
|
1165
|
+
UnityPrint(UnityStrNot);
|
1166
|
+
}
|
1167
|
+
UnityPrint(trait_names[trait_index]);
|
1168
|
+
#endif
|
1169
|
+
UnityAddMsgIfSpecified(msg);
|
1170
|
+
UNITY_FAIL_AND_BAIL;
|
1171
|
+
}
|
1172
|
+
}
|
1173
|
+
|
1174
|
+
#endif /* not UNITY_EXCLUDE_DOUBLE */
|
1175
|
+
|
1176
|
+
/*-----------------------------------------------*/
|
1177
|
+
void UnityAssertNumbersWithin(const UNITY_UINT delta,
|
1178
|
+
const UNITY_INT expected,
|
1179
|
+
const UNITY_INT actual,
|
1180
|
+
const char* msg,
|
1181
|
+
const UNITY_LINE_TYPE lineNumber,
|
1182
|
+
const UNITY_DISPLAY_STYLE_T style)
|
1183
|
+
{
|
1184
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1185
|
+
|
1186
|
+
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
|
1187
|
+
{
|
1188
|
+
if (actual > expected)
|
1189
|
+
{
|
1190
|
+
Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
|
1191
|
+
}
|
1192
|
+
else
|
1193
|
+
{
|
1194
|
+
Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
|
1195
|
+
}
|
1196
|
+
}
|
1197
|
+
else
|
1198
|
+
{
|
1199
|
+
if ((UNITY_UINT)actual > (UNITY_UINT)expected)
|
1200
|
+
{
|
1201
|
+
Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
|
1202
|
+
}
|
1203
|
+
else
|
1204
|
+
{
|
1205
|
+
Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
|
1206
|
+
}
|
1207
|
+
}
|
1208
|
+
|
1209
|
+
if (Unity.CurrentTestFailed)
|
1210
|
+
{
|
1211
|
+
UnityTestResultsFailBegin(lineNumber);
|
1212
|
+
UnityPrint(UnityStrDelta);
|
1213
|
+
UnityPrintNumberByStyle((UNITY_INT)delta, style);
|
1214
|
+
UnityPrint(UnityStrExpected);
|
1215
|
+
UnityPrintNumberByStyle(expected, style);
|
1216
|
+
UnityPrint(UnityStrWas);
|
1217
|
+
UnityPrintNumberByStyle(actual, style);
|
1218
|
+
UnityAddMsgIfSpecified(msg);
|
1219
|
+
UNITY_FAIL_AND_BAIL;
|
1220
|
+
}
|
1221
|
+
}
|
1222
|
+
|
1223
|
+
/*-----------------------------------------------*/
|
1224
|
+
void UnityAssertNumbersArrayWithin(const UNITY_UINT delta,
|
1225
|
+
UNITY_INTERNAL_PTR expected,
|
1226
|
+
UNITY_INTERNAL_PTR actual,
|
1227
|
+
const UNITY_UINT32 num_elements,
|
1228
|
+
const char* msg,
|
1229
|
+
const UNITY_LINE_TYPE lineNumber,
|
1230
|
+
const UNITY_DISPLAY_STYLE_T style,
|
1231
|
+
const UNITY_FLAGS_T flags)
|
1232
|
+
{
|
1233
|
+
UNITY_UINT32 elements = num_elements;
|
1234
|
+
unsigned int length = style & 0xF;
|
1235
|
+
unsigned int increment = 0;
|
1236
|
+
|
1237
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1238
|
+
|
1239
|
+
if (num_elements == 0)
|
1240
|
+
{
|
1241
|
+
UnityPrintPointlessAndBail();
|
1242
|
+
}
|
1243
|
+
|
1244
|
+
if (expected == actual)
|
1245
|
+
{
|
1246
|
+
return; /* Both are NULL or same pointer */
|
1247
|
+
}
|
1248
|
+
|
1249
|
+
if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
|
1250
|
+
{
|
1251
|
+
UNITY_FAIL_AND_BAIL;
|
1252
|
+
}
|
1253
|
+
|
1254
|
+
while ((elements > 0) && (elements--))
|
1255
|
+
{
|
1256
|
+
UNITY_INT expect_val;
|
1257
|
+
UNITY_INT actual_val;
|
1258
|
+
|
1259
|
+
switch (length)
|
1260
|
+
{
|
1261
|
+
case 1:
|
1262
|
+
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)expected;
|
1263
|
+
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)actual;
|
1264
|
+
increment = sizeof(UNITY_INT8);
|
1265
|
+
break;
|
1266
|
+
|
1267
|
+
case 2:
|
1268
|
+
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)expected;
|
1269
|
+
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)actual;
|
1270
|
+
increment = sizeof(UNITY_INT16);
|
1271
|
+
break;
|
1272
|
+
|
1273
|
+
#ifdef UNITY_SUPPORT_64
|
1274
|
+
case 8:
|
1275
|
+
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)expected;
|
1276
|
+
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)actual;
|
1277
|
+
increment = sizeof(UNITY_INT64);
|
1278
|
+
break;
|
1279
|
+
#endif
|
1280
|
+
|
1281
|
+
default: /* default is length 4 bytes */
|
1282
|
+
case 4:
|
1283
|
+
expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)expected;
|
1284
|
+
actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)actual;
|
1285
|
+
increment = sizeof(UNITY_INT32);
|
1286
|
+
length = 4;
|
1287
|
+
break;
|
1288
|
+
}
|
1289
|
+
|
1290
|
+
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
|
1291
|
+
{
|
1292
|
+
if (actual_val > expect_val)
|
1293
|
+
{
|
1294
|
+
Unity.CurrentTestFailed = (((UNITY_UINT)actual_val - (UNITY_UINT)expect_val) > delta);
|
1295
|
+
}
|
1296
|
+
else
|
1297
|
+
{
|
1298
|
+
Unity.CurrentTestFailed = (((UNITY_UINT)expect_val - (UNITY_UINT)actual_val) > delta);
|
1299
|
+
}
|
1300
|
+
}
|
1301
|
+
else
|
1302
|
+
{
|
1303
|
+
if ((UNITY_UINT)actual_val > (UNITY_UINT)expect_val)
|
1304
|
+
{
|
1305
|
+
Unity.CurrentTestFailed = (((UNITY_UINT)actual_val - (UNITY_UINT)expect_val) > delta);
|
1306
|
+
}
|
1307
|
+
else
|
1308
|
+
{
|
1309
|
+
Unity.CurrentTestFailed = (((UNITY_UINT)expect_val - (UNITY_UINT)actual_val) > delta);
|
1310
|
+
}
|
1311
|
+
}
|
1312
|
+
|
1313
|
+
if (Unity.CurrentTestFailed)
|
1314
|
+
{
|
1315
|
+
if ((style & UNITY_DISPLAY_RANGE_UINT) && (length < (UNITY_INT_WIDTH / 8)))
|
1316
|
+
{ /* For UINT, remove sign extension (padding 1's) from signed type casts above */
|
1317
|
+
UNITY_INT mask = 1;
|
1318
|
+
mask = (mask << 8 * length) - 1;
|
1319
|
+
expect_val &= mask;
|
1320
|
+
actual_val &= mask;
|
1321
|
+
}
|
1322
|
+
UnityTestResultsFailBegin(lineNumber);
|
1323
|
+
UnityPrint(UnityStrDelta);
|
1324
|
+
UnityPrintNumberByStyle((UNITY_INT)delta, style);
|
1325
|
+
UnityPrint(UnityStrElement);
|
1326
|
+
UnityPrintNumberUnsigned(num_elements - elements - 1);
|
1327
|
+
UnityPrint(UnityStrExpected);
|
1328
|
+
UnityPrintNumberByStyle(expect_val, style);
|
1329
|
+
UnityPrint(UnityStrWas);
|
1330
|
+
UnityPrintNumberByStyle(actual_val, style);
|
1331
|
+
UnityAddMsgIfSpecified(msg);
|
1332
|
+
UNITY_FAIL_AND_BAIL;
|
1333
|
+
}
|
1334
|
+
/* Walk through array by incrementing the pointers */
|
1335
|
+
if (flags == UNITY_ARRAY_TO_ARRAY)
|
1336
|
+
{
|
1337
|
+
expected = (UNITY_INTERNAL_PTR)((const char*)expected + increment);
|
1338
|
+
}
|
1339
|
+
actual = (UNITY_INTERNAL_PTR)((const char*)actual + increment);
|
1340
|
+
}
|
1341
|
+
}
|
1342
|
+
|
1343
|
+
/*-----------------------------------------------*/
|
1344
|
+
void UnityAssertEqualString(const char* expected,
|
1345
|
+
const char* actual,
|
1346
|
+
const char* msg,
|
1347
|
+
const UNITY_LINE_TYPE lineNumber)
|
1348
|
+
{
|
1349
|
+
UNITY_UINT32 i;
|
1350
|
+
|
1351
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1352
|
+
|
1353
|
+
/* if both pointers not null compare the strings */
|
1354
|
+
if (expected && actual)
|
1355
|
+
{
|
1356
|
+
for (i = 0; expected[i] || actual[i]; i++)
|
1357
|
+
{
|
1358
|
+
if (expected[i] != actual[i])
|
1359
|
+
{
|
1360
|
+
Unity.CurrentTestFailed = 1;
|
1361
|
+
break;
|
1362
|
+
}
|
1363
|
+
}
|
1364
|
+
}
|
1365
|
+
else
|
1366
|
+
{ /* handle case of one pointers being null (if both null, test should pass) */
|
1367
|
+
if (expected != actual)
|
1368
|
+
{
|
1369
|
+
Unity.CurrentTestFailed = 1;
|
1370
|
+
}
|
1371
|
+
}
|
1372
|
+
|
1373
|
+
if (Unity.CurrentTestFailed)
|
1374
|
+
{
|
1375
|
+
UnityTestResultsFailBegin(lineNumber);
|
1376
|
+
UnityPrintExpectedAndActualStrings(expected, actual);
|
1377
|
+
UnityAddMsgIfSpecified(msg);
|
1378
|
+
UNITY_FAIL_AND_BAIL;
|
1379
|
+
}
|
1380
|
+
}
|
1381
|
+
|
1382
|
+
/*-----------------------------------------------*/
|
1383
|
+
void UnityAssertEqualStringLen(const char* expected,
|
1384
|
+
const char* actual,
|
1385
|
+
const UNITY_UINT32 length,
|
1386
|
+
const char* msg,
|
1387
|
+
const UNITY_LINE_TYPE lineNumber)
|
1388
|
+
{
|
1389
|
+
UNITY_UINT32 i;
|
1390
|
+
|
1391
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1392
|
+
|
1393
|
+
/* if both pointers not null compare the strings */
|
1394
|
+
if (expected && actual)
|
1395
|
+
{
|
1396
|
+
for (i = 0; (i < length) && (expected[i] || actual[i]); i++)
|
1397
|
+
{
|
1398
|
+
if (expected[i] != actual[i])
|
1399
|
+
{
|
1400
|
+
Unity.CurrentTestFailed = 1;
|
1401
|
+
break;
|
1402
|
+
}
|
1403
|
+
}
|
1404
|
+
}
|
1405
|
+
else
|
1406
|
+
{ /* handle case of one pointers being null (if both null, test should pass) */
|
1407
|
+
if (expected != actual)
|
1408
|
+
{
|
1409
|
+
Unity.CurrentTestFailed = 1;
|
1410
|
+
}
|
1411
|
+
}
|
1412
|
+
|
1413
|
+
if (Unity.CurrentTestFailed)
|
1414
|
+
{
|
1415
|
+
UnityTestResultsFailBegin(lineNumber);
|
1416
|
+
UnityPrintExpectedAndActualStringsLen(expected, actual, length);
|
1417
|
+
UnityAddMsgIfSpecified(msg);
|
1418
|
+
UNITY_FAIL_AND_BAIL;
|
1419
|
+
}
|
1420
|
+
}
|
1421
|
+
|
1422
|
+
/*-----------------------------------------------*/
|
1423
|
+
void UnityAssertEqualStringArray(UNITY_INTERNAL_PTR expected,
|
1424
|
+
const char** actual,
|
1425
|
+
const UNITY_UINT32 num_elements,
|
1426
|
+
const char* msg,
|
1427
|
+
const UNITY_LINE_TYPE lineNumber,
|
1428
|
+
const UNITY_FLAGS_T flags)
|
1429
|
+
{
|
1430
|
+
UNITY_UINT32 i = 0;
|
1431
|
+
UNITY_UINT32 j = 0;
|
1432
|
+
const char* expd = NULL;
|
1433
|
+
const char* act = NULL;
|
1434
|
+
|
1435
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1436
|
+
|
1437
|
+
/* if no elements, it's an error */
|
1438
|
+
if (num_elements == 0)
|
1439
|
+
{
|
1440
|
+
UnityPrintPointlessAndBail();
|
1441
|
+
}
|
1442
|
+
|
1443
|
+
if ((const void*)expected == (const void*)actual)
|
1444
|
+
{
|
1445
|
+
return; /* Both are NULL or same pointer */
|
1446
|
+
}
|
1447
|
+
|
1448
|
+
if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
|
1449
|
+
{
|
1450
|
+
UNITY_FAIL_AND_BAIL;
|
1451
|
+
}
|
1452
|
+
|
1453
|
+
if (flags != UNITY_ARRAY_TO_ARRAY)
|
1454
|
+
{
|
1455
|
+
expd = (const char*)expected;
|
1456
|
+
}
|
1457
|
+
|
1458
|
+
do
|
1459
|
+
{
|
1460
|
+
act = actual[j];
|
1461
|
+
if (flags == UNITY_ARRAY_TO_ARRAY)
|
1462
|
+
{
|
1463
|
+
expd = ((const char* const*)expected)[j];
|
1464
|
+
}
|
1465
|
+
|
1466
|
+
/* if both pointers not null compare the strings */
|
1467
|
+
if (expd && act)
|
1468
|
+
{
|
1469
|
+
for (i = 0; expd[i] || act[i]; i++)
|
1470
|
+
{
|
1471
|
+
if (expd[i] != act[i])
|
1472
|
+
{
|
1473
|
+
Unity.CurrentTestFailed = 1;
|
1474
|
+
break;
|
1475
|
+
}
|
1476
|
+
}
|
1477
|
+
}
|
1478
|
+
else
|
1479
|
+
{ /* handle case of one pointers being null (if both null, test should pass) */
|
1480
|
+
if (expd != act)
|
1481
|
+
{
|
1482
|
+
Unity.CurrentTestFailed = 1;
|
1483
|
+
}
|
1484
|
+
}
|
1485
|
+
|
1486
|
+
if (Unity.CurrentTestFailed)
|
1487
|
+
{
|
1488
|
+
UnityTestResultsFailBegin(lineNumber);
|
1489
|
+
if (num_elements > 1)
|
1490
|
+
{
|
1491
|
+
UnityPrint(UnityStrElement);
|
1492
|
+
UnityPrintNumberUnsigned(j);
|
1493
|
+
}
|
1494
|
+
UnityPrintExpectedAndActualStrings(expd, act);
|
1495
|
+
UnityAddMsgIfSpecified(msg);
|
1496
|
+
UNITY_FAIL_AND_BAIL;
|
1497
|
+
}
|
1498
|
+
} while (++j < num_elements);
|
1499
|
+
}
|
1500
|
+
|
1501
|
+
/*-----------------------------------------------*/
|
1502
|
+
void UnityAssertEqualMemory(UNITY_INTERNAL_PTR expected,
|
1503
|
+
UNITY_INTERNAL_PTR actual,
|
1504
|
+
const UNITY_UINT32 length,
|
1505
|
+
const UNITY_UINT32 num_elements,
|
1506
|
+
const char* msg,
|
1507
|
+
const UNITY_LINE_TYPE lineNumber,
|
1508
|
+
const UNITY_FLAGS_T flags)
|
1509
|
+
{
|
1510
|
+
UNITY_PTR_ATTRIBUTE const unsigned char* ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;
|
1511
|
+
UNITY_PTR_ATTRIBUTE const unsigned char* ptr_act = (UNITY_PTR_ATTRIBUTE const unsigned char*)actual;
|
1512
|
+
UNITY_UINT32 elements = num_elements;
|
1513
|
+
UNITY_UINT32 bytes;
|
1514
|
+
|
1515
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1516
|
+
|
1517
|
+
if ((elements == 0) || (length == 0))
|
1518
|
+
{
|
1519
|
+
UnityPrintPointlessAndBail();
|
1520
|
+
}
|
1521
|
+
|
1522
|
+
if (expected == actual)
|
1523
|
+
{
|
1524
|
+
return; /* Both are NULL or same pointer */
|
1525
|
+
}
|
1526
|
+
|
1527
|
+
if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
|
1528
|
+
{
|
1529
|
+
UNITY_FAIL_AND_BAIL;
|
1530
|
+
}
|
1531
|
+
|
1532
|
+
while (elements--)
|
1533
|
+
{
|
1534
|
+
bytes = length;
|
1535
|
+
while (bytes--)
|
1536
|
+
{
|
1537
|
+
if (*ptr_exp != *ptr_act)
|
1538
|
+
{
|
1539
|
+
UnityTestResultsFailBegin(lineNumber);
|
1540
|
+
UnityPrint(UnityStrMemory);
|
1541
|
+
if (num_elements > 1)
|
1542
|
+
{
|
1543
|
+
UnityPrint(UnityStrElement);
|
1544
|
+
UnityPrintNumberUnsigned(num_elements - elements - 1);
|
1545
|
+
}
|
1546
|
+
UnityPrint(UnityStrByte);
|
1547
|
+
UnityPrintNumberUnsigned(length - bytes - 1);
|
1548
|
+
UnityPrint(UnityStrExpected);
|
1549
|
+
UnityPrintNumberByStyle(*ptr_exp, UNITY_DISPLAY_STYLE_HEX8);
|
1550
|
+
UnityPrint(UnityStrWas);
|
1551
|
+
UnityPrintNumberByStyle(*ptr_act, UNITY_DISPLAY_STYLE_HEX8);
|
1552
|
+
UnityAddMsgIfSpecified(msg);
|
1553
|
+
UNITY_FAIL_AND_BAIL;
|
1554
|
+
}
|
1555
|
+
ptr_exp++;
|
1556
|
+
ptr_act++;
|
1557
|
+
}
|
1558
|
+
if (flags == UNITY_ARRAY_TO_VAL)
|
1559
|
+
{
|
1560
|
+
ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;
|
1561
|
+
}
|
1562
|
+
}
|
1563
|
+
}
|
1564
|
+
|
1565
|
+
/*-----------------------------------------------*/
|
1566
|
+
|
1567
|
+
static union
|
1568
|
+
{
|
1569
|
+
UNITY_INT8 i8;
|
1570
|
+
UNITY_INT16 i16;
|
1571
|
+
UNITY_INT32 i32;
|
1572
|
+
#ifdef UNITY_SUPPORT_64
|
1573
|
+
UNITY_INT64 i64;
|
1574
|
+
#endif
|
1575
|
+
#ifndef UNITY_EXCLUDE_FLOAT
|
1576
|
+
float f;
|
1577
|
+
#endif
|
1578
|
+
#ifndef UNITY_EXCLUDE_DOUBLE
|
1579
|
+
double d;
|
1580
|
+
#endif
|
1581
|
+
} UnityQuickCompare;
|
1582
|
+
|
1583
|
+
UNITY_INTERNAL_PTR UnityNumToPtr(const UNITY_INT num, const UNITY_UINT8 size)
|
1584
|
+
{
|
1585
|
+
switch(size)
|
1586
|
+
{
|
1587
|
+
case 1:
|
1588
|
+
UnityQuickCompare.i8 = (UNITY_INT8)num;
|
1589
|
+
return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.i8);
|
1590
|
+
|
1591
|
+
case 2:
|
1592
|
+
UnityQuickCompare.i16 = (UNITY_INT16)num;
|
1593
|
+
return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.i16);
|
1594
|
+
|
1595
|
+
#ifdef UNITY_SUPPORT_64
|
1596
|
+
case 8:
|
1597
|
+
UnityQuickCompare.i64 = (UNITY_INT64)num;
|
1598
|
+
return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.i64);
|
1599
|
+
#endif
|
1600
|
+
|
1601
|
+
default: /* 4 bytes */
|
1602
|
+
UnityQuickCompare.i32 = (UNITY_INT32)num;
|
1603
|
+
return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.i32);
|
1604
|
+
}
|
1605
|
+
}
|
1606
|
+
|
1607
|
+
#ifndef UNITY_EXCLUDE_FLOAT
|
1608
|
+
/*-----------------------------------------------*/
|
1609
|
+
UNITY_INTERNAL_PTR UnityFloatToPtr(const float num)
|
1610
|
+
{
|
1611
|
+
UnityQuickCompare.f = num;
|
1612
|
+
return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.f);
|
1613
|
+
}
|
1614
|
+
#endif
|
1615
|
+
|
1616
|
+
#ifndef UNITY_EXCLUDE_DOUBLE
|
1617
|
+
/*-----------------------------------------------*/
|
1618
|
+
UNITY_INTERNAL_PTR UnityDoubleToPtr(const double num)
|
1619
|
+
{
|
1620
|
+
UnityQuickCompare.d = num;
|
1621
|
+
return (UNITY_INTERNAL_PTR)(&UnityQuickCompare.d);
|
1622
|
+
}
|
1623
|
+
#endif
|
1624
|
+
|
1625
|
+
/*-----------------------------------------------
|
1626
|
+
* printf helper function
|
1627
|
+
*-----------------------------------------------*/
|
1628
|
+
#ifdef UNITY_INCLUDE_PRINT_FORMATTED
|
1629
|
+
static void UnityPrintFVA(const char* format, va_list va)
|
1630
|
+
{
|
1631
|
+
const char* pch = format;
|
1632
|
+
if (pch != NULL)
|
1633
|
+
{
|
1634
|
+
while (*pch)
|
1635
|
+
{
|
1636
|
+
/* format identification character */
|
1637
|
+
if (*pch == '%')
|
1638
|
+
{
|
1639
|
+
pch++;
|
1640
|
+
|
1641
|
+
if (pch != NULL)
|
1642
|
+
{
|
1643
|
+
switch (*pch)
|
1644
|
+
{
|
1645
|
+
case 'd':
|
1646
|
+
case 'i':
|
1647
|
+
{
|
1648
|
+
const int number = va_arg(va, int);
|
1649
|
+
UnityPrintNumber((UNITY_INT)number);
|
1650
|
+
break;
|
1651
|
+
}
|
1652
|
+
#ifndef UNITY_EXCLUDE_FLOAT_PRINT
|
1653
|
+
case 'f':
|
1654
|
+
case 'g':
|
1655
|
+
{
|
1656
|
+
const double number = va_arg(va, double);
|
1657
|
+
UnityPrintFloat((UNITY_DOUBLE)number);
|
1658
|
+
break;
|
1659
|
+
}
|
1660
|
+
#endif
|
1661
|
+
case 'u':
|
1662
|
+
{
|
1663
|
+
const unsigned int number = va_arg(va, unsigned int);
|
1664
|
+
UnityPrintNumberUnsigned((UNITY_UINT)number);
|
1665
|
+
break;
|
1666
|
+
}
|
1667
|
+
case 'b':
|
1668
|
+
{
|
1669
|
+
const unsigned int number = va_arg(va, unsigned int);
|
1670
|
+
const UNITY_UINT mask = (UNITY_UINT)0 - (UNITY_UINT)1;
|
1671
|
+
UNITY_OUTPUT_CHAR('0');
|
1672
|
+
UNITY_OUTPUT_CHAR('b');
|
1673
|
+
UnityPrintMask(mask, (UNITY_UINT)number);
|
1674
|
+
break;
|
1675
|
+
}
|
1676
|
+
case 'x':
|
1677
|
+
case 'X':
|
1678
|
+
case 'p':
|
1679
|
+
{
|
1680
|
+
const unsigned int number = va_arg(va, unsigned int);
|
1681
|
+
UNITY_OUTPUT_CHAR('0');
|
1682
|
+
UNITY_OUTPUT_CHAR('x');
|
1683
|
+
UnityPrintNumberHex((UNITY_UINT)number, 8);
|
1684
|
+
break;
|
1685
|
+
}
|
1686
|
+
case 'c':
|
1687
|
+
{
|
1688
|
+
const int ch = va_arg(va, int);
|
1689
|
+
UnityPrintChar((const char *)&ch);
|
1690
|
+
break;
|
1691
|
+
}
|
1692
|
+
case 's':
|
1693
|
+
{
|
1694
|
+
const char * string = va_arg(va, const char *);
|
1695
|
+
UnityPrint(string);
|
1696
|
+
break;
|
1697
|
+
}
|
1698
|
+
case '%':
|
1699
|
+
{
|
1700
|
+
UnityPrintChar(pch);
|
1701
|
+
break;
|
1702
|
+
}
|
1703
|
+
default:
|
1704
|
+
{
|
1705
|
+
/* print the unknown format character */
|
1706
|
+
UNITY_OUTPUT_CHAR('%');
|
1707
|
+
UnityPrintChar(pch);
|
1708
|
+
break;
|
1709
|
+
}
|
1710
|
+
}
|
1711
|
+
}
|
1712
|
+
}
|
1713
|
+
#ifdef UNITY_OUTPUT_COLOR
|
1714
|
+
/* print ANSI escape code */
|
1715
|
+
else if ((*pch == 27) && (*(pch + 1) == '['))
|
1716
|
+
{
|
1717
|
+
pch += UnityPrintAnsiEscapeString(pch);
|
1718
|
+
continue;
|
1719
|
+
}
|
1720
|
+
#endif
|
1721
|
+
else if (*pch == '\n')
|
1722
|
+
{
|
1723
|
+
UNITY_PRINT_EOL();
|
1724
|
+
}
|
1725
|
+
else
|
1726
|
+
{
|
1727
|
+
UnityPrintChar(pch);
|
1728
|
+
}
|
1729
|
+
|
1730
|
+
pch++;
|
1731
|
+
}
|
1732
|
+
}
|
1733
|
+
}
|
1734
|
+
|
1735
|
+
void UnityPrintF(const UNITY_LINE_TYPE line, const char* format, ...)
|
1736
|
+
{
|
1737
|
+
UnityTestResultsBegin(Unity.TestFile, line);
|
1738
|
+
UnityPrint("INFO");
|
1739
|
+
if(format != NULL)
|
1740
|
+
{
|
1741
|
+
UnityPrint(": ");
|
1742
|
+
va_list va;
|
1743
|
+
va_start(va, format);
|
1744
|
+
UnityPrintFVA(format, va);
|
1745
|
+
va_end(va);
|
1746
|
+
}
|
1747
|
+
UNITY_PRINT_EOL();
|
1748
|
+
}
|
1749
|
+
#endif /* ! UNITY_INCLUDE_PRINT_FORMATTED */
|
1750
|
+
|
1751
|
+
|
1752
|
+
/*-----------------------------------------------
|
1753
|
+
* Control Functions
|
1754
|
+
*-----------------------------------------------*/
|
1755
|
+
|
1756
|
+
/*-----------------------------------------------*/
|
1757
|
+
void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
|
1758
|
+
{
|
1759
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1760
|
+
|
1761
|
+
UnityTestResultsBegin(Unity.TestFile, line);
|
1762
|
+
UnityPrint(UnityStrFail);
|
1763
|
+
if (msg != NULL)
|
1764
|
+
{
|
1765
|
+
UNITY_OUTPUT_CHAR(':');
|
1766
|
+
|
1767
|
+
#ifdef UNITY_PRINT_TEST_CONTEXT
|
1768
|
+
UNITY_PRINT_TEST_CONTEXT();
|
1769
|
+
#endif
|
1770
|
+
#ifndef UNITY_EXCLUDE_DETAILS
|
1771
|
+
if (Unity.CurrentDetail1)
|
1772
|
+
{
|
1773
|
+
UnityPrint(UnityStrDetail1Name);
|
1774
|
+
UnityPrint(Unity.CurrentDetail1);
|
1775
|
+
if (Unity.CurrentDetail2)
|
1776
|
+
{
|
1777
|
+
UnityPrint(UnityStrDetail2Name);
|
1778
|
+
UnityPrint(Unity.CurrentDetail2);
|
1779
|
+
}
|
1780
|
+
UnityPrint(UnityStrSpacer);
|
1781
|
+
}
|
1782
|
+
#endif
|
1783
|
+
if (msg[0] != ' ')
|
1784
|
+
{
|
1785
|
+
UNITY_OUTPUT_CHAR(' ');
|
1786
|
+
}
|
1787
|
+
UnityPrint(msg);
|
1788
|
+
}
|
1789
|
+
|
1790
|
+
UNITY_FAIL_AND_BAIL;
|
1791
|
+
}
|
1792
|
+
|
1793
|
+
/*-----------------------------------------------*/
|
1794
|
+
void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line)
|
1795
|
+
{
|
1796
|
+
RETURN_IF_FAIL_OR_IGNORE;
|
1797
|
+
|
1798
|
+
UnityTestResultsBegin(Unity.TestFile, line);
|
1799
|
+
UnityPrint(UnityStrIgnore);
|
1800
|
+
if (msg != NULL)
|
1801
|
+
{
|
1802
|
+
UNITY_OUTPUT_CHAR(':');
|
1803
|
+
UNITY_OUTPUT_CHAR(' ');
|
1804
|
+
UnityPrint(msg);
|
1805
|
+
}
|
1806
|
+
UNITY_IGNORE_AND_BAIL;
|
1807
|
+
}
|
1808
|
+
|
1809
|
+
/*-----------------------------------------------*/
|
1810
|
+
void UnityMessage(const char* msg, const UNITY_LINE_TYPE line)
|
1811
|
+
{
|
1812
|
+
UnityTestResultsBegin(Unity.TestFile, line);
|
1813
|
+
UnityPrint("INFO");
|
1814
|
+
if (msg != NULL)
|
1815
|
+
{
|
1816
|
+
UNITY_OUTPUT_CHAR(':');
|
1817
|
+
UNITY_OUTPUT_CHAR(' ');
|
1818
|
+
UnityPrint(msg);
|
1819
|
+
}
|
1820
|
+
UNITY_PRINT_EOL();
|
1821
|
+
}
|
1822
|
+
|
1823
|
+
/*-----------------------------------------------*/
|
1824
|
+
/* If we have not defined our own test runner, then include our default test runner to make life easier */
|
1825
|
+
#ifndef UNITY_SKIP_DEFAULT_RUNNER
|
1826
|
+
void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum)
|
1827
|
+
{
|
1828
|
+
Unity.CurrentTestName = FuncName;
|
1829
|
+
Unity.CurrentTestLineNumber = (UNITY_LINE_TYPE)FuncLineNum;
|
1830
|
+
Unity.NumberOfTests++;
|
1831
|
+
UNITY_CLR_DETAILS();
|
1832
|
+
UNITY_EXEC_TIME_START();
|
1833
|
+
if (TEST_PROTECT())
|
1834
|
+
{
|
1835
|
+
setUp();
|
1836
|
+
Func();
|
1837
|
+
}
|
1838
|
+
if (TEST_PROTECT())
|
1839
|
+
{
|
1840
|
+
tearDown();
|
1841
|
+
}
|
1842
|
+
UNITY_EXEC_TIME_STOP();
|
1843
|
+
UnityConcludeTest();
|
1844
|
+
}
|
1845
|
+
#endif
|
1846
|
+
|
1847
|
+
/*-----------------------------------------------*/
|
1848
|
+
void UnitySetTestFile(const char* filename)
|
1849
|
+
{
|
1850
|
+
Unity.TestFile = filename;
|
1851
|
+
}
|
1852
|
+
|
1853
|
+
/*-----------------------------------------------*/
|
1854
|
+
void UnityBegin(const char* filename)
|
1855
|
+
{
|
1856
|
+
Unity.TestFile = filename;
|
1857
|
+
Unity.CurrentTestName = NULL;
|
1858
|
+
Unity.CurrentTestLineNumber = 0;
|
1859
|
+
Unity.NumberOfTests = 0;
|
1860
|
+
Unity.TestFailures = 0;
|
1861
|
+
Unity.TestIgnores = 0;
|
1862
|
+
Unity.CurrentTestFailed = 0;
|
1863
|
+
Unity.CurrentTestIgnored = 0;
|
1864
|
+
|
1865
|
+
UNITY_CLR_DETAILS();
|
1866
|
+
UNITY_OUTPUT_START();
|
1867
|
+
}
|
1868
|
+
|
1869
|
+
/*-----------------------------------------------*/
|
1870
|
+
int UnityEnd(void)
|
1871
|
+
{
|
1872
|
+
UNITY_PRINT_EOL();
|
1873
|
+
UnityPrint(UnityStrBreaker);
|
1874
|
+
UNITY_PRINT_EOL();
|
1875
|
+
UnityPrintNumber((UNITY_INT)(Unity.NumberOfTests));
|
1876
|
+
UnityPrint(UnityStrResultsTests);
|
1877
|
+
UnityPrintNumber((UNITY_INT)(Unity.TestFailures));
|
1878
|
+
UnityPrint(UnityStrResultsFailures);
|
1879
|
+
UnityPrintNumber((UNITY_INT)(Unity.TestIgnores));
|
1880
|
+
UnityPrint(UnityStrResultsIgnored);
|
1881
|
+
UNITY_PRINT_EOL();
|
1882
|
+
if (Unity.TestFailures == 0U)
|
1883
|
+
{
|
1884
|
+
UnityPrint(UnityStrOk);
|
1885
|
+
}
|
1886
|
+
else
|
1887
|
+
{
|
1888
|
+
UnityPrint(UnityStrFail);
|
1889
|
+
#ifdef UNITY_DIFFERENTIATE_FINAL_FAIL
|
1890
|
+
UNITY_OUTPUT_CHAR('E'); UNITY_OUTPUT_CHAR('D');
|
1891
|
+
#endif
|
1892
|
+
}
|
1893
|
+
UNITY_PRINT_EOL();
|
1894
|
+
UNITY_FLUSH_CALL();
|
1895
|
+
UNITY_OUTPUT_COMPLETE();
|
1896
|
+
return (int)(Unity.TestFailures);
|
1897
|
+
}
|
1898
|
+
|
1899
|
+
/*-----------------------------------------------
|
1900
|
+
* Command Line Argument Support
|
1901
|
+
*-----------------------------------------------*/
|
1902
|
+
#ifdef UNITY_USE_COMMAND_LINE_ARGS
|
1903
|
+
|
1904
|
+
char* UnityOptionIncludeNamed = NULL;
|
1905
|
+
char* UnityOptionExcludeNamed = NULL;
|
1906
|
+
int UnityVerbosity = 1;
|
1907
|
+
|
1908
|
+
/*-----------------------------------------------*/
|
1909
|
+
int UnityParseOptions(int argc, char** argv)
|
1910
|
+
{
|
1911
|
+
int i;
|
1912
|
+
UnityOptionIncludeNamed = NULL;
|
1913
|
+
UnityOptionExcludeNamed = NULL;
|
1914
|
+
|
1915
|
+
for (i = 1; i < argc; i++)
|
1916
|
+
{
|
1917
|
+
if (argv[i][0] == '-')
|
1918
|
+
{
|
1919
|
+
switch (argv[i][1])
|
1920
|
+
{
|
1921
|
+
case 'l': /* list tests */
|
1922
|
+
return -1;
|
1923
|
+
case 'n': /* include tests with name including this string */
|
1924
|
+
case 'f': /* an alias for -n */
|
1925
|
+
if (argv[i][2] == '=')
|
1926
|
+
{
|
1927
|
+
UnityOptionIncludeNamed = &argv[i][3];
|
1928
|
+
}
|
1929
|
+
else if (++i < argc)
|
1930
|
+
{
|
1931
|
+
UnityOptionIncludeNamed = argv[i];
|
1932
|
+
}
|
1933
|
+
else
|
1934
|
+
{
|
1935
|
+
UnityPrint("ERROR: No Test String to Include Matches For");
|
1936
|
+
UNITY_PRINT_EOL();
|
1937
|
+
return 1;
|
1938
|
+
}
|
1939
|
+
break;
|
1940
|
+
case 'q': /* quiet */
|
1941
|
+
UnityVerbosity = 0;
|
1942
|
+
break;
|
1943
|
+
case 'v': /* verbose */
|
1944
|
+
UnityVerbosity = 2;
|
1945
|
+
break;
|
1946
|
+
case 'x': /* exclude tests with name including this string */
|
1947
|
+
if (argv[i][2] == '=')
|
1948
|
+
{
|
1949
|
+
UnityOptionExcludeNamed = &argv[i][3];
|
1950
|
+
}
|
1951
|
+
else if (++i < argc)
|
1952
|
+
{
|
1953
|
+
UnityOptionExcludeNamed = argv[i];
|
1954
|
+
}
|
1955
|
+
else
|
1956
|
+
{
|
1957
|
+
UnityPrint("ERROR: No Test String to Exclude Matches For");
|
1958
|
+
UNITY_PRINT_EOL();
|
1959
|
+
return 1;
|
1960
|
+
}
|
1961
|
+
break;
|
1962
|
+
default:
|
1963
|
+
UnityPrint("ERROR: Unknown Option ");
|
1964
|
+
UNITY_OUTPUT_CHAR(argv[i][1]);
|
1965
|
+
UNITY_PRINT_EOL();
|
1966
|
+
return 1;
|
1967
|
+
}
|
1968
|
+
}
|
1969
|
+
}
|
1970
|
+
|
1971
|
+
return 0;
|
1972
|
+
}
|
1973
|
+
|
1974
|
+
/*-----------------------------------------------*/
|
1975
|
+
int IsStringInBiggerString(const char* longstring, const char* shortstring)
|
1976
|
+
{
|
1977
|
+
const char* lptr = longstring;
|
1978
|
+
const char* sptr = shortstring;
|
1979
|
+
const char* lnext = lptr;
|
1980
|
+
|
1981
|
+
if (*sptr == '*')
|
1982
|
+
{
|
1983
|
+
return 1;
|
1984
|
+
}
|
1985
|
+
|
1986
|
+
while (*lptr)
|
1987
|
+
{
|
1988
|
+
lnext = lptr + 1;
|
1989
|
+
|
1990
|
+
/* If they current bytes match, go on to the next bytes */
|
1991
|
+
while (*lptr && *sptr && (*lptr == *sptr))
|
1992
|
+
{
|
1993
|
+
lptr++;
|
1994
|
+
sptr++;
|
1995
|
+
|
1996
|
+
/* We're done if we match the entire string or up to a wildcard */
|
1997
|
+
if (*sptr == '*')
|
1998
|
+
return 1;
|
1999
|
+
if (*sptr == ',')
|
2000
|
+
return 1;
|
2001
|
+
if (*sptr == '"')
|
2002
|
+
return 1;
|
2003
|
+
if (*sptr == '\'')
|
2004
|
+
return 1;
|
2005
|
+
if (*sptr == ':')
|
2006
|
+
return 2;
|
2007
|
+
if (*sptr == 0)
|
2008
|
+
return 1;
|
2009
|
+
}
|
2010
|
+
|
2011
|
+
/* Otherwise we start in the long pointer 1 character further and try again */
|
2012
|
+
lptr = lnext;
|
2013
|
+
sptr = shortstring;
|
2014
|
+
}
|
2015
|
+
|
2016
|
+
return 0;
|
2017
|
+
}
|
2018
|
+
|
2019
|
+
/*-----------------------------------------------*/
|
2020
|
+
int UnityStringArgumentMatches(const char* str)
|
2021
|
+
{
|
2022
|
+
int retval;
|
2023
|
+
const char* ptr1;
|
2024
|
+
const char* ptr2;
|
2025
|
+
const char* ptrf;
|
2026
|
+
|
2027
|
+
/* Go through the options and get the substrings for matching one at a time */
|
2028
|
+
ptr1 = str;
|
2029
|
+
while (ptr1[0] != 0)
|
2030
|
+
{
|
2031
|
+
if ((ptr1[0] == '"') || (ptr1[0] == '\''))
|
2032
|
+
{
|
2033
|
+
ptr1++;
|
2034
|
+
}
|
2035
|
+
|
2036
|
+
/* look for the start of the next partial */
|
2037
|
+
ptr2 = ptr1;
|
2038
|
+
ptrf = 0;
|
2039
|
+
do
|
2040
|
+
{
|
2041
|
+
ptr2++;
|
2042
|
+
if ((ptr2[0] == ':') && (ptr2[1] != 0) && (ptr2[0] != '\'') && (ptr2[0] != '"') && (ptr2[0] != ','))
|
2043
|
+
{
|
2044
|
+
ptrf = &ptr2[1];
|
2045
|
+
}
|
2046
|
+
} while ((ptr2[0] != 0) && (ptr2[0] != '\'') && (ptr2[0] != '"') && (ptr2[0] != ','));
|
2047
|
+
|
2048
|
+
while ((ptr2[0] != 0) && ((ptr2[0] == ':') || (ptr2[0] == '\'') || (ptr2[0] == '"') || (ptr2[0] == ',')))
|
2049
|
+
{
|
2050
|
+
ptr2++;
|
2051
|
+
}
|
2052
|
+
|
2053
|
+
/* done if complete filename match */
|
2054
|
+
retval = IsStringInBiggerString(Unity.TestFile, ptr1);
|
2055
|
+
if (retval == 1)
|
2056
|
+
{
|
2057
|
+
return retval;
|
2058
|
+
}
|
2059
|
+
|
2060
|
+
/* done if testname match after filename partial match */
|
2061
|
+
if ((retval == 2) && (ptrf != 0))
|
2062
|
+
{
|
2063
|
+
if (IsStringInBiggerString(Unity.CurrentTestName, ptrf))
|
2064
|
+
{
|
2065
|
+
return 1;
|
2066
|
+
}
|
2067
|
+
}
|
2068
|
+
|
2069
|
+
/* done if complete testname match */
|
2070
|
+
if (IsStringInBiggerString(Unity.CurrentTestName, ptr1) == 1)
|
2071
|
+
{
|
2072
|
+
return 1;
|
2073
|
+
}
|
2074
|
+
|
2075
|
+
ptr1 = ptr2;
|
2076
|
+
}
|
2077
|
+
|
2078
|
+
/* we couldn't find a match for any substrings */
|
2079
|
+
return 0;
|
2080
|
+
}
|
2081
|
+
|
2082
|
+
/*-----------------------------------------------*/
|
2083
|
+
int UnityTestMatches(void)
|
2084
|
+
{
|
2085
|
+
/* Check if this test name matches the included test pattern */
|
2086
|
+
int retval;
|
2087
|
+
if (UnityOptionIncludeNamed)
|
2088
|
+
{
|
2089
|
+
retval = UnityStringArgumentMatches(UnityOptionIncludeNamed);
|
2090
|
+
}
|
2091
|
+
else
|
2092
|
+
{
|
2093
|
+
retval = 1;
|
2094
|
+
}
|
2095
|
+
|
2096
|
+
/* Check if this test name matches the excluded test pattern */
|
2097
|
+
if (UnityOptionExcludeNamed)
|
2098
|
+
{
|
2099
|
+
if (UnityStringArgumentMatches(UnityOptionExcludeNamed))
|
2100
|
+
{
|
2101
|
+
retval = 0;
|
2102
|
+
}
|
2103
|
+
}
|
2104
|
+
|
2105
|
+
return retval;
|
2106
|
+
}
|
2107
|
+
|
2108
|
+
#endif /* UNITY_USE_COMMAND_LINE_ARGS */
|
2109
|
+
/*-----------------------------------------------*/
|