ceedling 0.9.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/GIT_COMMIT_SHA +1 -0
- data/Gemfile +23 -2
- data/Gemfile.lock +50 -0
- data/README.md +728 -42
- data/Rakefile +21 -75
- data/assets/ceedling +9 -0
- data/assets/ceedling.cmd +1 -0
- data/assets/default_gitignore +7 -0
- data/assets/example_file.c +16 -0
- data/assets/example_file.h +15 -0
- data/assets/example_file_call.c +13 -0
- data/assets/example_file_call.h +13 -0
- data/assets/project.yml +402 -0
- data/assets/test_example_file.c +20 -0
- data/assets/test_example_file_boom.c +20 -0
- data/assets/test_example_file_crash.c +25 -0
- data/assets/test_example_file_success.c +21 -0
- data/assets/test_example_file_unity_printf.c +19 -0
- data/assets/test_example_file_verbose.c +19 -0
- data/assets/test_example_file_with_mock.c +20 -0
- data/assets/test_example_with_parameterized_tests.c +28 -0
- data/assets/tests_with_defines/src/adc_hardware.c +18 -0
- data/assets/tests_with_defines/src/adc_hardware.h +13 -0
- data/assets/tests_with_defines/src/adc_hardware_configurator.c +18 -0
- data/assets/tests_with_defines/src/adc_hardware_configurator.h +17 -0
- data/assets/tests_with_defines/test/test_adc_hardware.c +28 -0
- data/assets/tests_with_defines/test/test_adc_hardware_special.c +28 -0
- data/assets/tests_with_preprocessing/src/adc_hardwareA.c +17 -0
- data/assets/tests_with_preprocessing/src/adc_hardwareA.h +13 -0
- data/assets/tests_with_preprocessing/src/adc_hardwareB.c +14 -0
- data/assets/tests_with_preprocessing/src/adc_hardwareB.h +13 -0
- data/assets/tests_with_preprocessing/src/adc_hardwareC.c +14 -0
- data/assets/tests_with_preprocessing/src/adc_hardwareC.h +13 -0
- data/assets/tests_with_preprocessing/src/adc_hardware_configuratorA.h +13 -0
- data/assets/tests_with_preprocessing/src/adc_hardware_configuratorB.h +15 -0
- data/assets/tests_with_preprocessing/src/adc_hardware_configuratorC.h +15 -0
- data/assets/tests_with_preprocessing/test/test_adc_hardwareA.c +41 -0
- data/assets/tests_with_preprocessing/test/test_adc_hardwareB.c +25 -0
- data/assets/tests_with_preprocessing/test/test_adc_hardwareC.c +29 -0
- data/assets/uncovered_example_file.c +12 -0
- data/bin/actions_wrapper.rb +50 -0
- data/bin/app_cfg.rb +134 -0
- data/bin/ceedling +146 -57
- data/bin/cli.rb +542 -0
- data/bin/cli_handler.rb +480 -0
- data/bin/cli_helper.rb +512 -0
- data/bin/configinator.rb +111 -0
- data/bin/mixinator.rb +136 -0
- data/bin/mixins.rb +12 -0
- data/bin/objects.yml +80 -0
- data/bin/path_validator.rb +54 -0
- data/bin/projectinator.rb +244 -0
- data/bin/versionator.rb +81 -0
- data/ceedling.gemspec +54 -14
- data/config/test_environment.rb +14 -0
- data/docs/BreakingChanges.md +260 -0
- data/docs/CODE_OF_CONDUCT.md +138 -0
- data/docs/CONTRIBUTING.md +240 -0
- data/docs/Ceedling Basic Porting.pdf +0 -0
- data/docs/Ceedling Managing Release Code.pdf +0 -0
- data/docs/Ceedling Working with IDEs.pdf +0 -0
- data/docs/CeedlingPacket.md +5651 -0
- data/docs/CeedlingPullRequestChecklist.md +24 -0
- data/docs/CeedlingUpgrade.md +83 -0
- data/docs/Changelog.md +493 -0
- data/docs/PluginDevelopmentGuide.md +764 -0
- data/docs/ReleaseNotes.md +353 -0
- data/docs/SECURITY.md +41 -0
- data/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/examples/temp_sensor/README.md +18 -0
- data/examples/temp_sensor/mixin/add_gcov.yml +51 -0
- data/examples/temp_sensor/mixin/add_unity_helper.yml +26 -0
- data/examples/temp_sensor/project.yml +355 -70
- data/examples/temp_sensor/src/AdcConductor.c +49 -42
- data/examples/temp_sensor/src/AdcConductor.h +20 -11
- data/examples/temp_sensor/src/AdcHardware.c +34 -27
- data/examples/temp_sensor/src/AdcHardware.h +18 -11
- data/examples/temp_sensor/src/AdcHardwareConfigurator.c +25 -18
- data/examples/temp_sensor/src/AdcHardwareConfigurator.h +17 -10
- data/examples/temp_sensor/src/AdcModel.c +40 -33
- data/examples/temp_sensor/src/AdcModel.h +20 -13
- data/examples/temp_sensor/src/AdcTemperatureSensor.c +58 -51
- data/examples/temp_sensor/src/AdcTemperatureSensor.h +17 -10
- data/examples/temp_sensor/src/Executor.c +32 -25
- data/examples/temp_sensor/src/Executor.h +16 -9
- data/examples/temp_sensor/src/IntrinsicsWrapper.c +25 -18
- data/examples/temp_sensor/src/IntrinsicsWrapper.h +14 -7
- data/examples/temp_sensor/src/Main.c +53 -46
- data/examples/temp_sensor/src/Main.h +14 -7
- data/examples/temp_sensor/src/Model.c +17 -10
- data/examples/temp_sensor/src/Model.h +15 -8
- data/examples/temp_sensor/src/ModelConfig.h +14 -7
- data/examples/temp_sensor/src/TaskScheduler.c +79 -72
- data/examples/temp_sensor/src/TaskScheduler.h +18 -11
- data/examples/temp_sensor/src/TemperatureCalculator.c +38 -27
- data/examples/temp_sensor/src/TemperatureCalculator.h +15 -6
- data/examples/temp_sensor/src/TemperatureFilter.c +45 -39
- data/examples/temp_sensor/src/TemperatureFilter.h +17 -10
- data/examples/temp_sensor/src/TimerConductor.c +22 -15
- data/examples/temp_sensor/src/TimerConductor.h +16 -9
- data/examples/temp_sensor/src/TimerConfigurator.c +58 -51
- data/examples/temp_sensor/src/TimerConfigurator.h +22 -15
- data/examples/temp_sensor/src/TimerHardware.c +22 -15
- data/examples/temp_sensor/src/TimerHardware.h +15 -8
- data/examples/temp_sensor/src/TimerInterruptConfigurator.c +62 -55
- data/examples/temp_sensor/src/TimerInterruptConfigurator.h +20 -13
- data/examples/temp_sensor/src/TimerInterruptHandler.c +32 -25
- data/examples/temp_sensor/src/TimerInterruptHandler.h +17 -10
- data/examples/temp_sensor/src/TimerModel.c +16 -9
- data/examples/temp_sensor/src/TimerModel.h +15 -8
- data/examples/temp_sensor/src/Types.h +97 -103
- data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +25 -18
- data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +15 -6
- data/examples/temp_sensor/src/UsartConductor.c +28 -21
- data/examples/temp_sensor/src/UsartConductor.h +14 -7
- data/examples/temp_sensor/src/UsartConfigurator.c +46 -39
- data/examples/temp_sensor/src/UsartConfigurator.h +20 -13
- data/examples/temp_sensor/src/UsartHardware.c +29 -34
- data/examples/temp_sensor/src/UsartHardware.h +16 -10
- data/examples/temp_sensor/src/UsartModel.c +41 -34
- data/examples/temp_sensor/src/UsartModel.h +17 -10
- data/examples/temp_sensor/src/UsartPutChar.c +23 -16
- data/examples/temp_sensor/src/UsartPutChar.h +15 -8
- data/examples/temp_sensor/src/UsartTransmitBufferStatus.c +14 -7
- data/examples/temp_sensor/src/UsartTransmitBufferStatus.h +15 -8
- data/examples/temp_sensor/test/TestExecutor.c +43 -0
- data/examples/temp_sensor/test/TestMain.c +31 -0
- data/examples/temp_sensor/test/TestModel.c +27 -0
- data/examples/temp_sensor/test/TestTaskScheduler.c +111 -0
- data/examples/temp_sensor/test/TestTemperatureCalculator.c +43 -0
- data/examples/temp_sensor/test/TestTemperatureFilter.c +86 -0
- data/examples/temp_sensor/test/TestTimerConductor.c +39 -0
- data/examples/temp_sensor/test/TestTimerHardware.c +33 -0
- data/examples/temp_sensor/test/TestTimerIntegrated.c +53 -0
- data/examples/temp_sensor/test/TestTimerModel.c +25 -0
- data/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +28 -0
- data/examples/temp_sensor/test/TestUsartConductor.c +47 -0
- data/examples/temp_sensor/test/TestUsartHardware.c +43 -0
- data/examples/temp_sensor/test/TestUsartIntegrated.c +63 -0
- data/examples/temp_sensor/test/TestUsartModel.c +47 -0
- data/examples/temp_sensor/test/adc/TestAdcConductor.c +128 -0
- data/examples/temp_sensor/test/adc/TestAdcHardware.c +51 -0
- data/examples/temp_sensor/test/adc/TestAdcModel.c +40 -0
- data/examples/temp_sensor/test/support/UnityHelper.c +19 -10
- data/examples/temp_sensor/test/support/UnityHelper.h +17 -12
- data/lib/ceedling/application.rb +26 -0
- data/lib/ceedling/backtrace.gdb +5 -0
- data/lib/ceedling/build_batchinator.rb +113 -0
- data/lib/ceedling/cacheinator.rb +53 -0
- data/lib/ceedling/cacheinator_helper.rb +41 -0
- data/lib/ceedling/config_matchinator.rb +192 -0
- data/lib/ceedling/config_walkinator.rb +35 -0
- data/lib/ceedling/configurator.rb +735 -0
- data/lib/ceedling/configurator_builder.rb +558 -0
- data/lib/ceedling/configurator_plugins.rb +165 -0
- data/lib/ceedling/configurator_setup.rb +799 -0
- data/lib/ceedling/configurator_validator.rb +203 -0
- data/lib/ceedling/constants.rb +160 -0
- data/lib/ceedling/defaults.rb +477 -0
- data/lib/ceedling/defineinator.rb +90 -0
- data/lib/ceedling/dependinator.rb +31 -0
- data/lib/ceedling/encodinator.rb +26 -0
- data/lib/ceedling/erb_wrapper.rb +16 -0
- data/lib/ceedling/exceptions.rb +47 -0
- data/lib/ceedling/file_finder.rb +183 -0
- data/lib/ceedling/file_finder_helper.rb +116 -0
- data/lib/ceedling/file_path_collection_utils.rb +137 -0
- data/lib/ceedling/file_path_utils.rb +190 -0
- data/lib/ceedling/file_system_wrapper.rb +16 -0
- data/lib/ceedling/file_wrapper.rb +122 -0
- data/lib/ceedling/flaginator.rb +65 -0
- data/lib/ceedling/generator.rb +365 -0
- data/lib/ceedling/generator_helper.rb +78 -0
- data/lib/ceedling/generator_mocks.rb +41 -0
- data/lib/ceedling/generator_test_results.rb +270 -0
- data/lib/ceedling/generator_test_results_backtrace.rb +215 -0
- data/lib/ceedling/generator_test_results_sanity_checker.rb +70 -0
- data/lib/ceedling/generator_test_runner.rb +84 -0
- data/lib/ceedling/include_pathinator.rb +83 -0
- data/lib/ceedling/loginator.rb +326 -0
- data/lib/ceedling/makefile.rb +52 -0
- data/lib/ceedling/objects.yml +352 -0
- data/lib/ceedling/parsing_parcels.rb +77 -0
- data/lib/ceedling/plugin.rb +30 -0
- data/lib/ceedling/plugin_manager.rb +133 -0
- data/lib/ceedling/plugin_manager_helper.rb +25 -0
- data/lib/ceedling/plugin_reportinator.rb +139 -0
- data/lib/ceedling/plugin_reportinator_helper.rb +84 -0
- data/lib/ceedling/preprocessinator.rb +239 -0
- data/lib/ceedling/preprocessinator_extractor.rb +257 -0
- data/lib/ceedling/preprocessinator_file_handler.rb +229 -0
- data/lib/ceedling/preprocessinator_includes_handler.rb +382 -0
- data/lib/ceedling/rake_utils.rb +23 -0
- data/lib/ceedling/rake_wrapper.rb +40 -0
- data/lib/ceedling/rakefile.rb +145 -0
- data/lib/ceedling/release_invoker.rb +68 -0
- data/lib/ceedling/release_invoker_helper.rb +12 -0
- data/lib/ceedling/reportinator.rb +124 -0
- data/lib/ceedling/rules_release.rake +107 -0
- data/lib/ceedling/rules_tests.rake +62 -0
- data/lib/ceedling/setupinator.rb +199 -0
- data/lib/ceedling/stream_wrapper.rb +51 -0
- data/lib/ceedling/system_utils.rb +43 -0
- data/lib/ceedling/system_wrapper.rb +150 -0
- data/lib/ceedling/task_invoker.rb +70 -0
- data/lib/ceedling/tasks_base.rake +39 -0
- data/lib/ceedling/tasks_filesystem.rake +99 -0
- data/lib/ceedling/tasks_release.rake +43 -0
- data/lib/ceedling/tasks_tests.rake +71 -0
- data/lib/ceedling/test_context_extractor.rb +379 -0
- data/lib/ceedling/test_invoker.rb +506 -0
- data/lib/ceedling/test_invoker_helper.rb +347 -0
- data/lib/ceedling/test_runner_manager.rb +47 -0
- data/lib/ceedling/tool_executor.rb +233 -0
- data/lib/ceedling/tool_executor_helper.rb +107 -0
- data/lib/ceedling/tool_validator.rb +149 -0
- data/lib/ceedling/verbosinator.rb +22 -0
- data/lib/ceedling/yaml_wrapper.rb +37 -0
- data/lib/ceedling.rb +12 -4
- data/lib/version.rb +24 -0
- data/license.txt +24 -0
- data/plugins/beep/README.md +133 -0
- data/plugins/beep/config/defaults.yml +12 -0
- data/plugins/beep/config/defaults_beep.rb +67 -0
- data/plugins/beep/lib/beep.rb +85 -0
- data/plugins/bullseye/README.md +81 -0
- data/plugins/bullseye/bullseye.rake +180 -0
- data/plugins/bullseye/config/defaults.yml +66 -0
- data/plugins/bullseye/lib/bullseye.rb +203 -0
- data/plugins/command_hooks/README.md +241 -0
- data/plugins/command_hooks/lib/command_hooks.rb +231 -0
- data/plugins/compile_commands_json_db/README.md +40 -0
- data/plugins/compile_commands_json_db/lib/compile_commands_json_db.rb +51 -0
- data/plugins/dependencies/README.md +321 -0
- data/plugins/dependencies/Rakefile +188 -0
- data/plugins/dependencies/config/defaults.yml +78 -0
- data/plugins/dependencies/dependencies.rake +157 -0
- data/plugins/dependencies/example/boss/project.yml +231 -0
- data/plugins/dependencies/example/boss/src/boss.c +80 -0
- data/plugins/dependencies/example/boss/src/boss.h +16 -0
- data/plugins/dependencies/example/boss/src/main.c +45 -0
- data/plugins/dependencies/example/boss/test/test_boss.c +118 -0
- data/plugins/dependencies/example/supervisor/project.yml +165 -0
- data/plugins/dependencies/example/supervisor/src/supervisor.c +45 -0
- data/plugins/dependencies/example/supervisor/src/supervisor.h +14 -0
- data/plugins/dependencies/example/supervisor/test/test_supervisor.c +58 -0
- data/plugins/dependencies/example/version.tar.gzip +0 -0
- data/plugins/dependencies/example/workerbees.zip +0 -0
- data/plugins/dependencies/lib/dependencies.rb +531 -0
- data/plugins/fff/README.md +242 -0
- data/plugins/fff/Rakefile +26 -0
- data/plugins/fff/config/fff.yml +13 -0
- data/plugins/fff/examples/fff_example/project.yml +145 -0
- data/plugins/fff/examples/fff_example/src/bar.c +8 -0
- data/plugins/fff/examples/fff_example/src/bar.h +21 -0
- data/plugins/fff/examples/fff_example/src/custom_types.h +13 -0
- data/plugins/fff/examples/fff_example/src/display.c +14 -0
- data/plugins/fff/examples/fff_example/src/display.h +23 -0
- data/plugins/fff/examples/fff_example/src/event_processor.c +100 -0
- data/plugins/fff/examples/fff_example/src/event_processor.h +18 -0
- data/plugins/fff/examples/fff_example/src/foo.c +23 -0
- data/plugins/fff/examples/fff_example/src/foo.h +15 -0
- data/plugins/fff/examples/fff_example/src/subfolder/zzz.c +8 -0
- data/plugins/fff/examples/fff_example/src/subfolder/zzz.h +13 -0
- data/plugins/fff/examples/fff_example/test/test_event_processor.c +160 -0
- data/plugins/fff/examples/fff_example/test/test_foo.c +54 -0
- data/plugins/fff/lib/fff.rb +90 -0
- data/plugins/fff/lib/fff_mock_generator.rb +172 -0
- data/plugins/fff/spec/fff_mock_header_generator_spec.rb +311 -0
- data/plugins/fff/spec/fff_mock_source_generator_spec.rb +156 -0
- data/plugins/fff/spec/header_generator.rb +58 -0
- data/plugins/fff/spec/spec_helper.rb +103 -0
- data/plugins/fff/src/fff_unity_helper.h +40 -0
- data/plugins/fff/vendor/fff/LICENSE +25 -0
- data/plugins/fff/vendor/fff/Makefile +10 -0
- data/plugins/fff/vendor/fff/README.md +454 -0
- data/plugins/fff/vendor/fff/buildandtest +15 -0
- data/plugins/fff/vendor/fff/examples/Makefile +7 -0
- data/plugins/fff/vendor/fff/examples/driver_testing/Makefile +64 -0
- data/plugins/fff/vendor/fff/examples/driver_testing/driver.c +32 -0
- data/plugins/fff/vendor/fff/examples/driver_testing/driver.h +21 -0
- data/plugins/fff/vendor/fff/examples/driver_testing/driver.test.cpp +58 -0
- data/plugins/fff/vendor/fff/examples/driver_testing/driver.test.fff.cpp +70 -0
- data/plugins/fff/vendor/fff/examples/driver_testing/hardware_abstraction.h +25 -0
- data/plugins/fff/vendor/fff/examples/driver_testing/registers.h +23 -0
- data/plugins/fff/vendor/fff/examples/embedded_ui/DISPLAY.h +27 -0
- data/plugins/fff/vendor/fff/examples/embedded_ui/Kata.txt +25 -0
- data/plugins/fff/vendor/fff/examples/embedded_ui/Makefile +67 -0
- data/plugins/fff/vendor/fff/examples/embedded_ui/SYSTEM.h +31 -0
- data/plugins/fff/vendor/fff/examples/embedded_ui/UI.c +56 -0
- data/plugins/fff/vendor/fff/examples/embedded_ui/UI.h +22 -0
- data/plugins/fff/vendor/fff/examples/embedded_ui/UI_test_ansic.c +191 -0
- data/plugins/fff/vendor/fff/examples/embedded_ui/UI_test_cpp.cpp +144 -0
- data/plugins/fff/vendor/fff/examples/embedded_ui/test_suite_template.c +42 -0
- data/plugins/fff/vendor/fff/fakegen.rb +428 -0
- data/plugins/fff/vendor/fff/fff.h +5122 -0
- data/plugins/fff/vendor/fff/gtest/Makefile +22 -0
- data/plugins/fff/vendor/fff/gtest/gtest-all.cc +9118 -0
- data/plugins/fff/vendor/fff/gtest/gtest-main.cc +6 -0
- data/plugins/fff/vendor/fff/gtest/gtest.h +19547 -0
- data/plugins/fff/vendor/fff/test/Makefile +81 -0
- data/plugins/fff/vendor/fff/test/c_test_framework.h +25 -0
- data/plugins/fff/vendor/fff/test/fff_test_c.c +116 -0
- data/plugins/fff/vendor/fff/test/fff_test_cpp.cpp +53 -0
- data/plugins/fff/vendor/fff/test/fff_test_global_c.c +84 -0
- data/plugins/fff/vendor/fff/test/fff_test_global_cpp.cpp +31 -0
- data/plugins/fff/vendor/fff/test/global_fakes.c +21 -0
- data/plugins/fff/vendor/fff/test/global_fakes.h +47 -0
- data/plugins/fff/vendor/fff/test/test_cases.include +276 -0
- data/plugins/gcov/README.md +893 -0
- data/plugins/gcov/config/defaults.yml +30 -0
- data/plugins/gcov/config/defaults_gcov.rb +109 -0
- data/plugins/gcov/gcov.rake +100 -0
- data/plugins/gcov/lib/gcov.rb +282 -0
- data/plugins/gcov/lib/gcov_constants.rb +63 -0
- data/plugins/gcov/lib/gcovr_reportinator.rb +425 -0
- data/plugins/gcov/lib/reportgenerator_reportinator.rb +220 -0
- data/plugins/gcov/lib/reportinator_helper.rb +30 -0
- data/plugins/module_generator/README.md +267 -0
- data/plugins/module_generator/Rakefile +232 -0
- data/plugins/module_generator/assets/stubby1.h +13 -0
- data/plugins/module_generator/assets/stubby2.h +15 -0
- data/plugins/module_generator/config/module_generator.yml +13 -0
- data/plugins/module_generator/example/project.yml +174 -0
- data/plugins/module_generator/lib/module_generator.rb +122 -0
- data/plugins/module_generator/module_generator.rake +69 -0
- data/plugins/report_build_warnings_log/README.md +40 -0
- data/plugins/report_build_warnings_log/config/defaults.yml +12 -0
- data/plugins/report_build_warnings_log/lib/report_build_warnings_log.rb +143 -0
- data/plugins/report_tests_gtestlike_stdout/README.md +96 -0
- data/plugins/report_tests_gtestlike_stdout/assets/template.erb +83 -0
- data/plugins/report_tests_gtestlike_stdout/config/report_tests_gtestlike_stdout.yml +11 -0
- data/plugins/report_tests_gtestlike_stdout/lib/report_tests_gtestlike_stdout.rb +69 -0
- data/plugins/report_tests_ide_stdout/README.md +62 -0
- data/plugins/report_tests_ide_stdout/config/report_tests_ide_stdout.yml +11 -0
- data/plugins/report_tests_ide_stdout/lib/report_tests_ide_stdout.rb +72 -0
- data/plugins/report_tests_log_factory/README.md +446 -0
- data/plugins/report_tests_log_factory/config/defaults.yml +11 -0
- data/plugins/report_tests_log_factory/lib/cppunit_tests_reporter.rb +100 -0
- data/plugins/report_tests_log_factory/lib/html_tests_reporter.rb +181 -0
- data/plugins/report_tests_log_factory/lib/json_tests_reporter.rb +72 -0
- data/plugins/report_tests_log_factory/lib/junit_tests_reporter.rb +197 -0
- data/plugins/report_tests_log_factory/lib/report_tests_log_factory.rb +135 -0
- data/plugins/report_tests_log_factory/lib/tests_reporter.rb +70 -0
- data/plugins/report_tests_log_factory/sample_html_report.png +0 -0
- data/plugins/report_tests_pretty_stdout/README.md +54 -0
- data/plugins/report_tests_pretty_stdout/assets/template.erb +63 -0
- data/plugins/report_tests_pretty_stdout/config/report_tests_pretty_stdout.yml +11 -0
- data/plugins/report_tests_pretty_stdout/lib/report_tests_pretty_stdout.rb +73 -0
- data/plugins/report_tests_raw_output_log/README.md +50 -0
- data/plugins/report_tests_raw_output_log/lib/report_tests_raw_output_log.rb +129 -0
- data/plugins/report_tests_teamcity_stdout/README.md +94 -0
- data/plugins/report_tests_teamcity_stdout/config/defaults.yml +12 -0
- data/plugins/report_tests_teamcity_stdout/config/report_tests_teamcity_stdout.yml +11 -0
- data/plugins/report_tests_teamcity_stdout/lib/report_tests_teamcity_stdout.rb +163 -0
- data/spec/config_walkinator_spec.rb +62 -0
- data/spec/configurator_builder_spec.rb +16 -0
- data/spec/configurator_helper_spec.rb +12 -0
- data/spec/configurator_spec.rb +18 -0
- data/spec/file_finder_helper_spec.rb +73 -0
- data/spec/gcov/gcov_deployment_spec.rb +135 -0
- data/spec/gcov/gcov_test_cases_spec.rb +344 -0
- data/spec/generator_test_results_sanity_checker_spec.rb +104 -0
- data/spec/generator_test_results_spec.rb +131 -0
- data/spec/manual/stress_test.rb +31 -0
- data/spec/parsing_parcels_spec.rb +66 -0
- data/spec/preprocessinator_extractor_spec.rb +408 -0
- data/spec/preprocessinator_includes_handler_spec.rb +289 -0
- data/spec/reportinator_spec.rb +26 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/spec_system_helper.rb +994 -0
- data/spec/support/other_target.yml +7 -0
- data/spec/support/target.yml +7 -0
- data/spec/support/test_example.fail +25 -0
- data/spec/support/test_example.pass +25 -0
- data/spec/support/test_example_empty.pass +15 -0
- data/spec/support/test_example_ignore.pass +25 -0
- data/spec/support/test_example_mangled.pass +22 -0
- data/spec/support/test_example_with_time.pass +25 -0
- data/spec/system/deployment_as_gem_spec.rb +76 -0
- data/spec/system/deployment_as_vendor_spec.rb +123 -0
- data/spec/system/example_temp_sensor_spec.rb +264 -0
- data/spec/system/upgrade_as_vendor_spec.rb +68 -0
- data/spec/system_utils_spec.rb +65 -0
- data/spec/test_context_extractor_spec.rb +328 -0
- data/spec/tool_executor_helper_spec.rb +219 -0
- data/spec/uncategorized_specs_spec.rb +15 -0
- data/vendor/c_exception/README.md +236 -0
- data/vendor/c_exception/docs/CException.md +289 -0
- data/vendor/c_exception/docs/CODE_OF_CONDUCT.md +138 -0
- data/vendor/c_exception/docs/CONTRIBUTING.md +238 -0
- data/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/c_exception/lib/CException.c +59 -0
- data/vendor/c_exception/lib/CException.h +122 -0
- data/vendor/c_exception/lib/meson.build +11 -0
- data/vendor/c_exception/license.txt +22 -0
- data/vendor/c_exception/meson.build +14 -0
- data/vendor/c_exception/project.yml +263 -0
- data/vendor/c_exception/test/TestException.c +398 -0
- data/vendor/c_exception/test/support/CExceptionConfig.h +53 -0
- data/vendor/cmock/Gemfile +1 -0
- data/vendor/cmock/LICENSE.txt +21 -0
- data/vendor/cmock/README.md +55 -0
- data/vendor/cmock/cmock.gemspec +34 -0
- data/vendor/cmock/config/production_environment.rb +13 -0
- data/vendor/cmock/config/test_environment.rb +17 -0
- data/vendor/cmock/docs/CMockChangeLog.md +166 -0
- data/vendor/cmock/docs/CMockKnownIssues.md +13 -0
- data/vendor/cmock/docs/CMock_ArgumentValidation.md +274 -0
- data/vendor/cmock/docs/CMock_Summary.md +866 -0
- data/vendor/cmock/docs/CODE_OF_CONDUCT.md +138 -0
- data/vendor/cmock/docs/CONTRIBUTING.md +238 -0
- data/vendor/cmock/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/examples/make_example/Makefile +30 -0
- data/vendor/cmock/examples/make_example/src/foo.c +12 -0
- data/vendor/cmock/examples/make_example/src/foo.h +12 -0
- data/vendor/cmock/examples/make_example/src/main.c +22 -0
- data/vendor/cmock/examples/make_example/test/test_foo.c +24 -0
- data/vendor/cmock/examples/make_example/test/test_main.c +22 -0
- data/vendor/cmock/examples/temp_sensor/rakefile.rb +49 -0
- data/vendor/cmock/examples/temp_sensor/rakefile_helper.rb +280 -0
- data/vendor/cmock/examples/temp_sensor/src/AT91SAM7X256.h +2564 -0
- data/vendor/cmock/examples/temp_sensor/src/AdcConductor.c +49 -0
- data/vendor/cmock/examples/temp_sensor/src/AdcConductor.h +18 -0
- data/vendor/cmock/examples/temp_sensor/src/AdcHardware.c +34 -0
- data/vendor/cmock/examples/temp_sensor/src/AdcHardware.h +16 -0
- data/vendor/cmock/examples/temp_sensor/src/AdcHardwareConfigurator.c +25 -0
- data/vendor/cmock/examples/temp_sensor/src/AdcHardwareConfigurator.h +17 -0
- data/vendor/cmock/examples/temp_sensor/src/AdcModel.c +40 -0
- data/vendor/cmock/examples/temp_sensor/src/AdcModel.h +20 -0
- data/vendor/cmock/examples/temp_sensor/src/AdcTemperatureSensor.c +58 -0
- data/vendor/cmock/examples/temp_sensor/src/AdcTemperatureSensor.h +17 -0
- data/vendor/cmock/examples/temp_sensor/src/Executor.c +32 -0
- data/vendor/cmock/examples/temp_sensor/src/Executor.h +16 -0
- data/vendor/cmock/examples/temp_sensor/src/IntrinsicsWrapper.c +25 -0
- data/vendor/cmock/examples/temp_sensor/src/IntrinsicsWrapper.h +14 -0
- data/vendor/cmock/examples/temp_sensor/src/Main.c +53 -0
- data/vendor/cmock/examples/temp_sensor/src/Main.h +14 -0
- data/vendor/cmock/examples/temp_sensor/src/Model.c +17 -0
- data/vendor/cmock/examples/temp_sensor/src/Model.h +15 -0
- data/vendor/cmock/examples/temp_sensor/src/ModelConfig.h +14 -0
- data/vendor/cmock/examples/temp_sensor/src/TaskScheduler.c +79 -0
- data/vendor/cmock/examples/temp_sensor/src/TaskScheduler.h +18 -0
- data/vendor/cmock/examples/temp_sensor/src/TemperatureCalculator.c +34 -0
- data/vendor/cmock/examples/temp_sensor/src/TemperatureCalculator.h +13 -0
- data/vendor/cmock/examples/temp_sensor/src/TemperatureFilter.c +49 -0
- data/vendor/cmock/examples/temp_sensor/src/TemperatureFilter.h +17 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerConductor.c +22 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerConductor.h +16 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerConfigurator.c +58 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerConfigurator.h +22 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerHardware.c +22 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerHardware.h +15 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptConfigurator.c +62 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptConfigurator.h +20 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptHandler.c +32 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptHandler.h +17 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerModel.c +16 -0
- data/vendor/cmock/examples/temp_sensor/src/TimerModel.h +15 -0
- data/vendor/cmock/examples/temp_sensor/src/Types.h +110 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +25 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +13 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartConductor.c +28 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartConductor.h +14 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartConfigurator.c +46 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartConfigurator.h +20 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartHardware.c +29 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartHardware.h +16 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartModel.c +41 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartModel.h +17 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartPutChar.c +23 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartPutChar.h +15 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartTransmitBufferStatus.c +14 -0
- data/vendor/cmock/examples/temp_sensor/src/UsartTransmitBufferStatus.h +15 -0
- data/vendor/cmock/examples/temp_sensor/targets/gcc.yml +97 -0
- data/vendor/cmock/examples/temp_sensor/targets/iar_v4.yml +143 -0
- data/vendor/cmock/examples/temp_sensor/targets/iar_v5.yml +132 -0
- data/vendor/cmock/examples/temp_sensor/test/TestAdcConductor.c +128 -0
- data/vendor/cmock/examples/temp_sensor/test/TestAdcHardware.c +51 -0
- data/vendor/cmock/examples/temp_sensor/test/TestAdcHardwareConfigurator.c +50 -0
- data/vendor/cmock/examples/temp_sensor/test/TestAdcModel.c +40 -0
- data/vendor/cmock/examples/temp_sensor/test/TestAdcTemperatureSensor.c +54 -0
- data/vendor/cmock/examples/temp_sensor/test/TestExecutor.c +43 -0
- data/vendor/cmock/examples/temp_sensor/test/TestMain.c +31 -0
- data/vendor/cmock/examples/temp_sensor/test/TestModel.c +27 -0
- data/vendor/cmock/examples/temp_sensor/test/TestTaskScheduler.c +111 -0
- data/vendor/cmock/examples/temp_sensor/test/TestTemperatureCalculator.c +40 -0
- data/vendor/cmock/examples/temp_sensor/test/TestTemperatureFilter.c +76 -0
- data/vendor/cmock/examples/temp_sensor/test/TestTimerConductor.c +39 -0
- data/vendor/cmock/examples/temp_sensor/test/TestTimerConfigurator.c +119 -0
- data/vendor/cmock/examples/temp_sensor/test/TestTimerHardware.c +33 -0
- data/vendor/cmock/examples/temp_sensor/test/TestTimerInterruptConfigurator.c +85 -0
- data/vendor/cmock/examples/temp_sensor/test/TestTimerInterruptHandler.c +73 -0
- data/vendor/cmock/examples/temp_sensor/test/TestTimerModel.c +25 -0
- data/vendor/cmock/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +28 -0
- data/vendor/cmock/examples/temp_sensor/test/TestUsartConductor.c +47 -0
- data/vendor/cmock/examples/temp_sensor/test/TestUsartConfigurator.c +84 -0
- data/vendor/cmock/examples/temp_sensor/test/TestUsartHardware.c +44 -0
- data/vendor/cmock/examples/temp_sensor/test/TestUsartModel.c +47 -0
- data/vendor/cmock/examples/temp_sensor/test/TestUsartPutChar.c +50 -0
- data/vendor/cmock/examples/temp_sensor/test/TestUsartTransmitBufferStatus.c +29 -0
- data/vendor/cmock/lib/cmock.rb +127 -0
- data/vendor/cmock/lib/cmock_config.rb +184 -0
- data/vendor/cmock/lib/cmock_file_writer.rb +48 -0
- data/vendor/cmock/lib/cmock_generator.rb +379 -0
- data/vendor/cmock/lib/cmock_generator_plugin_array.rb +68 -0
- data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +88 -0
- data/vendor/cmock/lib/cmock_generator_plugin_cexception.rb +50 -0
- data/vendor/cmock/lib/cmock_generator_plugin_expect.rb +105 -0
- data/vendor/cmock/lib/cmock_generator_plugin_expect_any_args.rb +52 -0
- data/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +90 -0
- data/vendor/cmock/lib/cmock_generator_plugin_ignore_arg.rb +49 -0
- data/vendor/cmock/lib/cmock_generator_plugin_ignore_stateless.rb +87 -0
- data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +102 -0
- data/vendor/cmock/lib/cmock_generator_utils.rb +251 -0
- data/vendor/cmock/lib/cmock_header_parser.rb +629 -0
- data/vendor/cmock/lib/cmock_plugin_manager.rb +51 -0
- data/vendor/cmock/lib/cmock_unityhelper_parser.rb +82 -0
- data/vendor/cmock/lib/cmock_version.rb +29 -0
- data/vendor/cmock/meson.build +17 -0
- data/vendor/cmock/scripts/create_makefile.rb +210 -0
- data/vendor/cmock/scripts/create_mock.rb +15 -0
- data/vendor/cmock/scripts/create_runner.rb +25 -0
- data/vendor/cmock/scripts/test_summary.rb +25 -0
- data/vendor/cmock/src/cmock.c +238 -0
- data/vendor/cmock/src/cmock.h +54 -0
- data/vendor/cmock/src/cmock_internals.h +98 -0
- data/vendor/cmock/src/meson.build +12 -0
- data/vendor/cmock/test/c/TestCMockC.c +340 -0
- data/vendor/cmock/test/c/TestCMockC.yml +21 -0
- data/vendor/cmock/test/c/TestCMockCDynamic.c +193 -0
- data/vendor/cmock/test/c/TestCMockCDynamic.yml +19 -0
- data/vendor/cmock/test/c/TestCMockCDynamic_Runner.c +43 -0
- data/vendor/cmock/test/c/TestCMockC_Runner.c +48 -0
- data/vendor/cmock/test/iar/iar_v4/Resource/SAM7_FLASH.mac +71 -0
- data/vendor/cmock/test/iar/iar_v4/Resource/SAM7_RAM.mac +94 -0
- data/vendor/cmock/test/iar/iar_v4/Resource/SAM7_SIM.mac +67 -0
- data/vendor/cmock/test/iar/iar_v4/Resource/at91SAM7X256_FLASH.xcl +185 -0
- data/vendor/cmock/test/iar/iar_v4/Resource/at91SAM7X256_RAM.xcl +185 -0
- data/vendor/cmock/test/iar/iar_v4/Resource/ioat91sam7x256.ddf +2259 -0
- data/vendor/cmock/test/iar/iar_v4/cmock_demo.dep +3691 -0
- data/vendor/cmock/test/iar/iar_v4/cmock_demo.ewd +1696 -0
- data/vendor/cmock/test/iar/iar_v4/cmock_demo.ewp +2581 -0
- data/vendor/cmock/test/iar/iar_v4/cmock_demo.eww +10 -0
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X-EK.h +68 -0
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.inc +2314 -0
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.rdf +4704 -0
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.tcl +3407 -0
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256_inc.h +2275 -0
- data/vendor/cmock/test/iar/iar_v4/incIAR/ioat91sam7x256.h +4387 -0
- data/vendor/cmock/test/iar/iar_v4/incIAR/lib_AT91SAM7X256.h +4211 -0
- data/vendor/cmock/test/iar/iar_v4/settings/cmock_demo.cspy.bat +32 -0
- data/vendor/cmock/test/iar/iar_v4/settings/cmock_demo.dbgdt +86 -0
- data/vendor/cmock/test/iar/iar_v4/settings/cmock_demo.dni +42 -0
- data/vendor/cmock/test/iar/iar_v4/settings/cmock_demo.wsdt +76 -0
- data/vendor/cmock/test/iar/iar_v4/srcIAR/Cstartup.s79 +266 -0
- data/vendor/cmock/test/iar/iar_v4/srcIAR/Cstartup_SAM7.c +105 -0
- data/vendor/cmock/test/iar/iar_v5/Resource/SAM7_FLASH.mac +71 -0
- data/vendor/cmock/test/iar/iar_v5/Resource/SAM7_RAM.mac +94 -0
- data/vendor/cmock/test/iar/iar_v5/Resource/SAM7_SIM.mac +67 -0
- data/vendor/cmock/test/iar/iar_v5/Resource/at91SAM7X256_FLASH.icf +43 -0
- data/vendor/cmock/test/iar/iar_v5/Resource/at91SAM7X256_RAM.icf +42 -0
- data/vendor/cmock/test/iar/iar_v5/cmock_demo.dep +4204 -0
- data/vendor/cmock/test/iar/iar_v5/cmock_demo.ewd +1906 -0
- data/vendor/cmock/test/iar/iar_v5/cmock_demo.ewp +2426 -0
- data/vendor/cmock/test/iar/iar_v5/cmock_demo.eww +26 -0
- data/vendor/cmock/test/iar/iar_v5/incIAR/AT91SAM7X-EK.h +68 -0
- data/vendor/cmock/test/iar/iar_v5/incIAR/AT91SAM7X256_inc.h +2275 -0
- data/vendor/cmock/test/iar/iar_v5/incIAR/lib_AT91SAM7X256.h +4211 -0
- data/vendor/cmock/test/iar/iar_v5/incIAR/project.h +37 -0
- data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +33 -0
- data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X.dbgdt +5 -0
- data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X.dni +18 -0
- data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X.wsdt +74 -0
- data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +12 -0
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo.cspy.bat +33 -0
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo.dbgdt +85 -0
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo.dni +44 -0
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo.wsdt +73 -0
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_Binary.jlink +12 -0
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +12 -0
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_RAM_Debug.jlink +12 -0
- data/vendor/cmock/test/iar/iar_v5/srcIAR/Cstartup.s +299 -0
- data/vendor/cmock/test/iar/iar_v5/srcIAR/Cstartup_SAM7.c +105 -0
- data/vendor/cmock/test/rakefile +150 -0
- data/vendor/cmock/test/rakefile_helper.rb +417 -0
- data/vendor/cmock/test/system/systest_generator.rb +206 -0
- data/vendor/cmock/test/system/test_compilation/callingconv.h +18 -0
- data/vendor/cmock/test/system/test_compilation/config.yml +17 -0
- data/vendor/cmock/test/system/test_compilation/const.h +44 -0
- data/vendor/cmock/test/system/test_compilation/inline.h +30 -0
- data/vendor/cmock/test/system/test_compilation/osek.h +282 -0
- data/vendor/cmock/test/system/test_compilation/parsing.h +99 -0
- data/vendor/cmock/test/system/test_interactions/all_plugins_but_other_limits.yml +382 -0
- data/vendor/cmock/test/system/test_interactions/all_plugins_coexist.yml +467 -0
- data/vendor/cmock/test/system/test_interactions/array_and_pointer_handling.yml +453 -0
- data/vendor/cmock/test/system/test_interactions/basic_expect_and_return.yml +131 -0
- data/vendor/cmock/test/system/test_interactions/const_primitives_handling.yml +94 -0
- data/vendor/cmock/test/system/test_interactions/doesnt_leave_details_behind.yml +315 -0
- data/vendor/cmock/test/system/test_interactions/enforce_strict_ordering.yml +254 -0
- data/vendor/cmock/test/system/test_interactions/expect_and_return_custom_types.yml +115 -0
- data/vendor/cmock/test/system/test_interactions/expect_and_return_treat_as.yml +180 -0
- data/vendor/cmock/test/system/test_interactions/expect_and_throw.yml +177 -0
- data/vendor/cmock/test/system/test_interactions/expect_any_args.yml +245 -0
- data/vendor/cmock/test/system/test_interactions/fancy_pointer_handling.yml +217 -0
- data/vendor/cmock/test/system/test_interactions/function_pointer_handling.yml +90 -0
- data/vendor/cmock/test/system/test_interactions/ignore_and_return.yml +336 -0
- data/vendor/cmock/test/system/test_interactions/ignore_and_return_stateless.yml +332 -0
- data/vendor/cmock/test/system/test_interactions/ignore_strict_mock_calling.yml +44 -0
- data/vendor/cmock/test/system/test_interactions/newer_standards_stuff1.yml +59 -0
- data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_1.yml +98 -0
- data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml +66 -0
- data/vendor/cmock/test/system/test_interactions/out_of_memory.yml +72 -0
- data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +249 -0
- data/vendor/cmock/test/system/test_interactions/return_thru_ptr_and_expect_any_args.yml +242 -0
- data/vendor/cmock/test/system/test_interactions/return_thru_ptr_ignore_arg.yml +238 -0
- data/vendor/cmock/test/system/test_interactions/skeleton.yml +62 -0
- data/vendor/cmock/test/system/test_interactions/skeleton_update.yml +83 -0
- data/vendor/cmock/test/system/test_interactions/struct_union_enum_expect_and_return.yml +284 -0
- data/vendor/cmock/test/system/test_interactions/struct_union_enum_expect_and_return_with_plugins.yml +287 -0
- data/vendor/cmock/test/system/test_interactions/stubs_with_callbacks.yml +228 -0
- data/vendor/cmock/test/system/test_interactions/unity_64bit_support.yml +84 -0
- data/vendor/cmock/test/system/test_interactions/unity_ignores.yml +146 -0
- data/vendor/cmock/test/system/test_interactions/unity_void_pointer_compare.yml +98 -0
- data/vendor/cmock/test/system/test_interactions/wrong_expect_and_return.yml +149 -0
- data/vendor/cmock/test/targets/clang_strict.yml +97 -0
- data/vendor/cmock/test/targets/gcc.yml +65 -0
- data/vendor/cmock/test/targets/gcc_64.yml +65 -0
- data/vendor/cmock/test/targets/gcc_tiny.yml +87 -0
- data/vendor/cmock/test/targets/iar_arm_v4.yml +117 -0
- data/vendor/cmock/test/targets/iar_arm_v5.yml +102 -0
- data/vendor/cmock/test/test_helper.rb +45 -0
- data/vendor/cmock/test/unit/cmock_config_test.rb +127 -0
- data/vendor/cmock/test/unit/cmock_config_test.yml +14 -0
- data/vendor/cmock/test/unit/cmock_file_writer_test.rb +28 -0
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +706 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +145 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +282 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +109 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +189 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +71 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +205 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +117 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_stateless_test.rb +121 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +124 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +209 -0
- data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +404 -0
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +2886 -0
- data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +102 -0
- data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +224 -0
- data/vendor/cmock/vendor/behaviors/Manifest.txt +9 -0
- data/vendor/cmock/vendor/behaviors/Rakefile +19 -0
- data/vendor/cmock/vendor/behaviors/lib/behaviors/reporttask.rb +158 -0
- data/vendor/cmock/vendor/behaviors/lib/behaviors.rb +76 -0
- data/vendor/cmock/vendor/behaviors/test/behaviors_tasks_test.rb +73 -0
- data/vendor/cmock/vendor/behaviors/test/behaviors_test.rb +50 -0
- data/vendor/cmock/vendor/behaviors/test/tasks_test/Rakefile +19 -0
- data/vendor/cmock/vendor/behaviors/test/tasks_test/lib/user.rb +2 -0
- data/vendor/cmock/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -0
- data/vendor/cmock/vendor/c_exception/README.md +236 -0
- data/vendor/cmock/vendor/c_exception/docs/CException.md +289 -0
- data/vendor/cmock/vendor/c_exception/docs/CODE_OF_CONDUCT.md +138 -0
- data/vendor/cmock/vendor/c_exception/docs/CONTRIBUTING.md +238 -0
- data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/c_exception/lib/CException.c +59 -0
- data/vendor/cmock/vendor/c_exception/lib/CException.h +122 -0
- data/vendor/cmock/vendor/c_exception/lib/meson.build +11 -0
- data/vendor/cmock/vendor/c_exception/license.txt +22 -0
- data/vendor/cmock/vendor/c_exception/meson.build +14 -0
- data/vendor/cmock/vendor/c_exception/project.yml +263 -0
- data/vendor/cmock/vendor/c_exception/test/TestException.c +398 -0
- data/vendor/cmock/vendor/c_exception/test/support/CExceptionConfig.h +53 -0
- data/vendor/cmock/vendor/unity/CMakeLists.txt +172 -0
- data/vendor/cmock/vendor/unity/LICENSE.txt +21 -0
- data/vendor/cmock/vendor/unity/README.md +234 -0
- data/vendor/cmock/vendor/unity/auto/__init__.py +7 -0
- data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +120 -0
- data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +40 -0
- data/vendor/cmock/vendor/unity/auto/extract_version.py +22 -0
- data/vendor/cmock/vendor/unity/auto/generate_config.yml +43 -0
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +318 -0
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +547 -0
- data/vendor/cmock/vendor/unity/auto/parse_output.rb +390 -0
- data/vendor/cmock/vendor/unity/auto/run_test.erb +37 -0
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.py +161 -0
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +253 -0
- data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +28 -0
- data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +13 -0
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +140 -0
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +140 -0
- data/vendor/cmock/vendor/unity/auto/yaml_helper.rb +23 -0
- data/vendor/cmock/vendor/unity/docs/CODE_OF_CONDUCT.md +138 -0
- data/vendor/cmock/vendor/unity/docs/CONTRIBUTING.md +238 -0
- data/vendor/cmock/vendor/unity/docs/MesonGeneratorRunner.md +18 -0
- data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +187 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +860 -0
- data/vendor/cmock/vendor/unity/docs/UnityChangeLog.md +110 -0
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +654 -0
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +242 -0
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +533 -0
- data/vendor/cmock/vendor/unity/docs/UnityKnownIssues.md +13 -0
- data/vendor/cmock/vendor/unity/examples/example_1/makefile +73 -0
- data/vendor/cmock/vendor/unity/examples/example_1/meson.build +48 -0
- data/vendor/cmock/vendor/unity/examples/example_1/readme.txt +12 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.c +30 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.h +9 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.c +17 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.h +8 -0
- data/vendor/cmock/vendor/unity/examples/example_1/subprojects/unity.wrap +3 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode.c +68 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode2.c +37 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -0
- data/vendor/cmock/vendor/unity/examples/example_2/makefile +72 -0
- data/vendor/cmock/vendor/unity/examples/example_2/readme.txt +5 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.c +30 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.h +9 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.c +17 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.h +8 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode.c +71 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode2.c +40 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +16 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +18 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/all_tests.c +19 -0
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.c +17 -0
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.h +19 -0
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +45 -0
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +255 -0
- data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +13 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.c +30 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.h +9 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.c +17 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.h +8 -0
- data/vendor/cmock/vendor/unity/examples/example_3/target_gcc_32.yml +54 -0
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode.c +68 -0
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode2.c +37 -0
- data/vendor/cmock/vendor/unity/examples/example_4/meson.build +12 -0
- data/vendor/cmock/vendor/unity/examples/example_4/readme.txt +15 -0
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode.c +30 -0
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode.h +9 -0
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode2.c +17 -0
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode2.h +8 -0
- data/vendor/cmock/vendor/unity/examples/example_4/src/meson.build +16 -0
- data/vendor/cmock/vendor/unity/examples/example_4/subprojects/unity.wrap +6 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/TestProductionCode.c +69 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/TestProductionCode2.c +41 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/meson.build +7 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +53 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +57 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/meson.build +13 -0
- data/vendor/cmock/vendor/unity/examples/unity_config.h +251 -0
- data/vendor/cmock/vendor/unity/extras/bdd/readme.md +40 -0
- data/vendor/cmock/vendor/unity/extras/bdd/src/unity_bdd.h +44 -0
- data/vendor/cmock/vendor/unity/extras/bdd/test/meson.build +9 -0
- data/vendor/cmock/vendor/unity/extras/bdd/test/test_bdd.c +129 -0
- data/vendor/cmock/vendor/unity/extras/eclipse/error_parsers.txt +26 -0
- data/vendor/cmock/vendor/unity/extras/fixture/readme.md +26 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/meson.build +10 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +310 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +94 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +50 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +72 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +20 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +245 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +32 -0
- data/vendor/cmock/vendor/unity/extras/memory/readme.md +42 -0
- data/vendor/cmock/vendor/unity/extras/memory/src/meson.build +9 -0
- data/vendor/cmock/vendor/unity/extras/memory/src/unity_memory.c +203 -0
- data/vendor/cmock/vendor/unity/extras/memory/src/unity_memory.h +61 -0
- data/vendor/cmock/vendor/unity/extras/memory/test/Makefile +85 -0
- data/vendor/cmock/vendor/unity/extras/memory/test/unity_memory_Test.c +326 -0
- data/vendor/cmock/vendor/unity/extras/memory/test/unity_memory_TestRunner.c +50 -0
- data/vendor/cmock/vendor/unity/extras/memory/test/unity_output_Spy.c +57 -0
- data/vendor/cmock/vendor/unity/extras/memory/test/unity_output_Spy.h +17 -0
- data/vendor/cmock/vendor/unity/library.json +25 -0
- data/vendor/cmock/vendor/unity/meson.build +80 -0
- data/vendor/cmock/vendor/unity/meson_options.txt +3 -0
- data/vendor/cmock/vendor/unity/platformio-build.py +24 -0
- data/vendor/cmock/vendor/unity/src/meson.build +17 -0
- data/vendor/cmock/vendor/unity/src/unity.c +2501 -0
- data/vendor/cmock/vendor/unity/src/unity.h +698 -0
- data/vendor/cmock/vendor/unity/src/unity_internals.h +1183 -0
- data/vendor/cmock/vendor/unity/test/Makefile +167 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +61 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +57 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +55 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +15 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +76 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +77 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +67 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +70 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +58 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +67 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +70 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +71 -0
- data/vendor/cmock/vendor/unity/test/rakefile +164 -0
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +316 -0
- data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +164 -0
- data/vendor/cmock/vendor/unity/test/targets/ansi.yml +51 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +79 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +79 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +52 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +53 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +50 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +62 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +50 -0
- data/vendor/cmock/vendor/unity/test/targets/hitech_picc18.yml +98 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v4.yml +105 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5.yml +99 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5_3.yml +99 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +97 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_cortexm3_v5.yml +101 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_msp430.yml +119 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_sh2a_v6.yml +106 -0
- data/vendor/cmock/vendor/unity/test/testdata/CException.h +18 -0
- data/vendor/cmock/vendor/unity/test/testdata/Defs.h +16 -0
- data/vendor/cmock/vendor/unity/test/testdata/cmock.h +21 -0
- data/vendor/cmock/vendor/unity/test/testdata/mockMock.h +20 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c +204 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +73 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +200 -0
- data/vendor/cmock/vendor/unity/test/tests/self_assessment_utils.h +151 -0
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +1341 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_arrays.c +2941 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_core.c +375 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_doubles.c +1285 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_floats.c +1395 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_integers.c +2863 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_integers_64.c +783 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_memory.c +82 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_parameterized.c +309 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_parameterizedDemo.c +28 -0
- data/vendor/cmock/vendor/unity/test/tests/test_unity_strings.c +330 -0
- data/vendor/cmock/vendor/unity/test/tests/types_for_test.h +21 -0
- data/vendor/cmock/vendor/unity/unityConfig.cmake +1 -0
- data/vendor/diy/History.txt +28 -0
- data/vendor/diy/LICENSE.txt +7 -0
- data/vendor/diy/README.rdoc +215 -0
- data/vendor/diy/Rakefile +33 -0
- data/vendor/diy/TODO.txt +9 -0
- data/vendor/diy/diy.gemspec +131 -0
- data/vendor/diy/lib/diy/factory.rb +44 -0
- data/vendor/diy/lib/diy.rb +411 -0
- data/vendor/diy/sample_code/car.rb +15 -0
- data/vendor/diy/sample_code/chassis.rb +13 -0
- data/vendor/diy/sample_code/diy_example.rb +34 -0
- data/vendor/diy/sample_code/engine.rb +13 -0
- data/vendor/diy/sample_code/objects.yml +18 -0
- data/vendor/diy/test/constructor.rb +127 -0
- data/vendor/diy/test/diy_test.rb +616 -0
- data/vendor/diy/test/factory_test.rb +87 -0
- data/vendor/diy/test/files/broken_construction.yml +15 -0
- data/vendor/diy/test/files/cat/cat.rb +11 -0
- data/vendor/diy/test/files/cat/extra_conflict.yml +13 -0
- data/vendor/diy/test/files/cat/heritage.rb +10 -0
- data/vendor/diy/test/files/cat/needs_input.yml +11 -0
- data/vendor/diy/test/files/cat/the_cat_lineage.rb +9 -0
- data/vendor/diy/test/files/dog/dog_model.rb +11 -0
- data/vendor/diy/test/files/dog/dog_presenter.rb +11 -0
- data/vendor/diy/test/files/dog/dog_view.rb +10 -0
- data/vendor/diy/test/files/dog/file_resolver.rb +10 -0
- data/vendor/diy/test/files/dog/other_thing.rb +10 -0
- data/vendor/diy/test/files/dog/simple.yml +19 -0
- data/vendor/diy/test/files/donkey/foo/bar/qux.rb +15 -0
- data/vendor/diy/test/files/donkey/foo.rb +16 -0
- data/vendor/diy/test/files/factory/beef.rb +13 -0
- data/vendor/diy/test/files/factory/dog.rb +14 -0
- data/vendor/diy/test/files/factory/factory.yml +27 -0
- data/vendor/diy/test/files/factory/farm/llama.rb +15 -0
- data/vendor/diy/test/files/factory/farm/pork.rb +15 -0
- data/vendor/diy/test/files/factory/kitten.rb +21 -0
- data/vendor/diy/test/files/fud/objects.yml +21 -0
- data/vendor/diy/test/files/fud/toy.rb +22 -0
- data/vendor/diy/test/files/functions/attached_things_builder.rb +10 -0
- data/vendor/diy/test/files/functions/invalid_method.yml +13 -0
- data/vendor/diy/test/files/functions/method_extractor.rb +11 -0
- data/vendor/diy/test/files/functions/nonsingleton_objects.yml +14 -0
- data/vendor/diy/test/files/functions/objects.yml +30 -0
- data/vendor/diy/test/files/functions/thing.rb +11 -0
- data/vendor/diy/test/files/functions/thing_builder.rb +33 -0
- data/vendor/diy/test/files/functions/things_builder.rb +11 -0
- data/vendor/diy/test/files/gnu/objects.yml +22 -0
- data/vendor/diy/test/files/gnu/thinger.rb +15 -0
- data/vendor/diy/test/files/goat/base.rb +16 -0
- data/vendor/diy/test/files/goat/can.rb +14 -0
- data/vendor/diy/test/files/goat/goat.rb +14 -0
- data/vendor/diy/test/files/goat/objects.yml +20 -0
- data/vendor/diy/test/files/goat/paper.rb +14 -0
- data/vendor/diy/test/files/goat/plane.rb +15 -0
- data/vendor/diy/test/files/goat/shirt.rb +14 -0
- data/vendor/diy/test/files/goat/wings.rb +16 -0
- data/vendor/diy/test/files/horse/holder_thing.rb +11 -0
- data/vendor/diy/test/files/horse/objects.yml +15 -0
- data/vendor/diy/test/files/namespace/animal/bird.rb +13 -0
- data/vendor/diy/test/files/namespace/animal/cat.rb +13 -0
- data/vendor/diy/test/files/namespace/animal/reptile/hardshell/turtle.rb +16 -0
- data/vendor/diy/test/files/namespace/animal/reptile/lizard.rb +15 -0
- data/vendor/diy/test/files/namespace/bad_module_specified.yml +16 -0
- data/vendor/diy/test/files/namespace/class_name_combine.yml +16 -0
- data/vendor/diy/test/files/namespace/hello.txt +1 -0
- data/vendor/diy/test/files/namespace/no_module_specified.yml +16 -0
- data/vendor/diy/test/files/namespace/objects.yml +29 -0
- data/vendor/diy/test/files/namespace/road.rb +10 -0
- data/vendor/diy/test/files/namespace/sky.rb +10 -0
- data/vendor/diy/test/files/namespace/subcontext.yml +30 -0
- data/vendor/diy/test/files/non_singleton/air.rb +10 -0
- data/vendor/diy/test/files/non_singleton/fat_cat.rb +11 -0
- data/vendor/diy/test/files/non_singleton/objects.yml +27 -0
- data/vendor/diy/test/files/non_singleton/pig.rb +11 -0
- data/vendor/diy/test/files/non_singleton/thread_spinner.rb +11 -0
- data/vendor/diy/test/files/non_singleton/tick.rb +11 -0
- data/vendor/diy/test/files/non_singleton/yard.rb +10 -0
- data/vendor/diy/test/files/yak/core_model.rb +11 -0
- data/vendor/diy/test/files/yak/core_presenter.rb +11 -0
- data/vendor/diy/test/files/yak/core_view.rb +9 -0
- data/vendor/diy/test/files/yak/data_source.rb +9 -0
- data/vendor/diy/test/files/yak/fringe_model.rb +11 -0
- data/vendor/diy/test/files/yak/fringe_presenter.rb +11 -0
- data/vendor/diy/test/files/yak/fringe_view.rb +9 -0
- data/vendor/diy/test/files/yak/giant_squid.rb +11 -0
- data/vendor/diy/test/files/yak/krill.rb +10 -0
- data/vendor/diy/test/files/yak/my_objects.yml +29 -0
- data/vendor/diy/test/files/yak/sub_sub_context_test.yml +35 -0
- data/vendor/diy/test/test_helper.rb +63 -0
- data/vendor/unity/CMakeLists.txt +172 -0
- data/vendor/unity/LICENSE.txt +21 -0
- data/vendor/unity/README.md +234 -0
- data/vendor/unity/auto/__init__.py +7 -0
- data/vendor/unity/auto/colour_prompt.rb +120 -0
- data/vendor/unity/auto/colour_reporter.rb +40 -0
- data/vendor/unity/auto/extract_version.py +22 -0
- data/vendor/unity/auto/generate_config.yml +43 -0
- data/vendor/unity/auto/generate_module.rb +318 -0
- data/vendor/unity/auto/generate_test_runner.rb +547 -0
- data/vendor/unity/auto/parse_output.rb +390 -0
- data/vendor/unity/auto/run_test.erb +37 -0
- data/vendor/unity/auto/stylize_as_junit.py +161 -0
- data/vendor/unity/auto/stylize_as_junit.rb +253 -0
- data/vendor/unity/auto/test_file_filter.rb +28 -0
- data/vendor/unity/auto/type_sanitizer.rb +13 -0
- data/vendor/unity/auto/unity_test_summary.py +140 -0
- data/vendor/unity/auto/unity_test_summary.rb +140 -0
- data/vendor/unity/auto/yaml_helper.rb +23 -0
- data/vendor/unity/docs/CODE_OF_CONDUCT.md +138 -0
- data/vendor/unity/docs/CONTRIBUTING.md +238 -0
- data/vendor/unity/docs/MesonGeneratorRunner.md +18 -0
- data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +187 -0
- data/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/unity/docs/UnityAssertionsReference.md +860 -0
- data/vendor/unity/docs/UnityChangeLog.md +110 -0
- data/vendor/unity/docs/UnityConfigurationGuide.md +654 -0
- data/vendor/unity/docs/UnityGettingStartedGuide.md +242 -0
- data/vendor/unity/docs/UnityHelperScriptsGuide.md +533 -0
- data/vendor/unity/docs/UnityKnownIssues.md +13 -0
- data/vendor/unity/examples/example_1/makefile +73 -0
- data/vendor/unity/examples/example_1/meson.build +48 -0
- data/vendor/unity/examples/example_1/readme.txt +12 -0
- data/vendor/unity/examples/example_1/src/ProductionCode.c +30 -0
- data/vendor/unity/examples/example_1/src/ProductionCode.h +9 -0
- data/vendor/unity/examples/example_1/src/ProductionCode2.c +17 -0
- data/vendor/unity/examples/example_1/src/ProductionCode2.h +8 -0
- data/vendor/unity/examples/example_1/subprojects/unity.wrap +3 -0
- data/vendor/unity/examples/example_1/test/TestProductionCode.c +68 -0
- data/vendor/unity/examples/example_1/test/TestProductionCode2.c +37 -0
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -0
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -0
- data/vendor/unity/examples/example_2/makefile +72 -0
- data/vendor/unity/examples/example_2/readme.txt +5 -0
- data/vendor/unity/examples/example_2/src/ProductionCode.c +30 -0
- data/vendor/unity/examples/example_2/src/ProductionCode.h +9 -0
- data/vendor/unity/examples/example_2/src/ProductionCode2.c +17 -0
- data/vendor/unity/examples/example_2/src/ProductionCode2.h +8 -0
- data/vendor/unity/examples/example_2/test/TestProductionCode.c +71 -0
- data/vendor/unity/examples/example_2/test/TestProductionCode2.c +40 -0
- data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +16 -0
- data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +18 -0
- data/vendor/unity/examples/example_2/test/test_runners/all_tests.c +19 -0
- data/vendor/unity/examples/example_3/helper/UnityHelper.c +17 -0
- data/vendor/unity/examples/example_3/helper/UnityHelper.h +19 -0
- data/vendor/unity/examples/example_3/rakefile.rb +45 -0
- data/vendor/unity/examples/example_3/rakefile_helper.rb +255 -0
- data/vendor/unity/examples/example_3/readme.txt +13 -0
- data/vendor/unity/examples/example_3/src/ProductionCode.c +30 -0
- data/vendor/unity/examples/example_3/src/ProductionCode.h +9 -0
- data/vendor/unity/examples/example_3/src/ProductionCode2.c +17 -0
- data/vendor/unity/examples/example_3/src/ProductionCode2.h +8 -0
- data/vendor/unity/examples/example_3/target_gcc_32.yml +54 -0
- data/vendor/unity/examples/example_3/test/TestProductionCode.c +68 -0
- data/vendor/unity/examples/example_3/test/TestProductionCode2.c +37 -0
- data/vendor/unity/examples/example_4/meson.build +12 -0
- data/vendor/unity/examples/example_4/readme.txt +15 -0
- data/vendor/unity/examples/example_4/src/ProductionCode.c +30 -0
- data/vendor/unity/examples/example_4/src/ProductionCode.h +9 -0
- data/vendor/unity/examples/example_4/src/ProductionCode2.c +17 -0
- data/vendor/unity/examples/example_4/src/ProductionCode2.h +8 -0
- data/vendor/unity/examples/example_4/src/meson.build +16 -0
- data/vendor/unity/examples/example_4/subprojects/unity.wrap +6 -0
- data/vendor/unity/examples/example_4/test/TestProductionCode.c +69 -0
- data/vendor/unity/examples/example_4/test/TestProductionCode2.c +41 -0
- data/vendor/unity/examples/example_4/test/meson.build +7 -0
- data/vendor/unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +53 -0
- data/vendor/unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +57 -0
- data/vendor/unity/examples/example_4/test/test_runners/meson.build +13 -0
- data/vendor/unity/examples/unity_config.h +251 -0
- data/vendor/unity/extras/bdd/readme.md +40 -0
- data/vendor/unity/extras/bdd/src/unity_bdd.h +44 -0
- data/vendor/unity/extras/bdd/test/meson.build +9 -0
- data/vendor/unity/extras/bdd/test/test_bdd.c +129 -0
- data/vendor/unity/extras/eclipse/error_parsers.txt +26 -0
- data/vendor/unity/extras/fixture/readme.md +26 -0
- data/vendor/unity/extras/fixture/src/meson.build +10 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.c +310 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.h +94 -0
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +50 -0
- data/vendor/unity/extras/fixture/test/Makefile +72 -0
- data/vendor/unity/extras/fixture/test/main/AllTests.c +20 -0
- data/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +245 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +32 -0
- data/vendor/unity/extras/memory/readme.md +42 -0
- data/vendor/unity/extras/memory/src/meson.build +9 -0
- data/vendor/unity/extras/memory/src/unity_memory.c +203 -0
- data/vendor/unity/extras/memory/src/unity_memory.h +61 -0
- data/vendor/unity/extras/memory/test/Makefile +85 -0
- data/vendor/unity/extras/memory/test/unity_memory_Test.c +326 -0
- data/vendor/unity/extras/memory/test/unity_memory_TestRunner.c +50 -0
- data/vendor/unity/extras/memory/test/unity_output_Spy.c +57 -0
- data/vendor/unity/extras/memory/test/unity_output_Spy.h +17 -0
- data/vendor/unity/library.json +25 -0
- data/vendor/unity/meson.build +80 -0
- data/vendor/unity/meson_options.txt +3 -0
- data/vendor/unity/platformio-build.py +24 -0
- data/vendor/unity/src/meson.build +17 -0
- data/vendor/unity/src/unity.c +2501 -0
- data/vendor/unity/src/unity.h +698 -0
- data/vendor/unity/src/unity_internals.h +1183 -0
- data/vendor/unity/test/Makefile +167 -0
- data/vendor/unity/test/expectdata/testsample_cmd.c +61 -0
- data/vendor/unity/test/expectdata/testsample_def.c +57 -0
- data/vendor/unity/test/expectdata/testsample_head1.c +55 -0
- data/vendor/unity/test/expectdata/testsample_head1.h +15 -0
- data/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -0
- data/vendor/unity/test/expectdata/testsample_mock_def.c +76 -0
- data/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
- data/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
- data/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -0
- data/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -0
- data/vendor/unity/test/expectdata/testsample_mock_param.c +77 -0
- data/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -0
- data/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -0
- data/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -0
- data/vendor/unity/test/expectdata/testsample_new1.c +67 -0
- data/vendor/unity/test/expectdata/testsample_new2.c +70 -0
- data/vendor/unity/test/expectdata/testsample_param.c +58 -0
- data/vendor/unity/test/expectdata/testsample_run1.c +67 -0
- data/vendor/unity/test/expectdata/testsample_run2.c +70 -0
- data/vendor/unity/test/expectdata/testsample_yaml.c +71 -0
- data/vendor/unity/test/rakefile +164 -0
- data/vendor/unity/test/rakefile_helper.rb +316 -0
- data/vendor/unity/test/spec/generate_module_existing_file_spec.rb +164 -0
- data/vendor/unity/test/targets/ansi.yml +51 -0
- data/vendor/unity/test/targets/clang_file.yml +79 -0
- data/vendor/unity/test/targets/clang_strict.yml +79 -0
- data/vendor/unity/test/targets/gcc_32.yml +52 -0
- data/vendor/unity/test/targets/gcc_64.yml +53 -0
- data/vendor/unity/test/targets/gcc_auto_limits.yml +50 -0
- data/vendor/unity/test/targets/gcc_auto_stdint.yml +62 -0
- data/vendor/unity/test/targets/gcc_manual_math.yml +50 -0
- data/vendor/unity/test/targets/hitech_picc18.yml +98 -0
- data/vendor/unity/test/targets/iar_arm_v4.yml +105 -0
- data/vendor/unity/test/targets/iar_arm_v5.yml +99 -0
- data/vendor/unity/test/targets/iar_arm_v5_3.yml +99 -0
- data/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +97 -0
- data/vendor/unity/test/targets/iar_cortexm3_v5.yml +101 -0
- data/vendor/unity/test/targets/iar_msp430.yml +119 -0
- data/vendor/unity/test/targets/iar_sh2a_v6.yml +106 -0
- data/vendor/unity/test/testdata/CException.h +18 -0
- data/vendor/unity/test/testdata/Defs.h +16 -0
- data/vendor/unity/test/testdata/cmock.h +21 -0
- data/vendor/unity/test/testdata/mockMock.h +20 -0
- data/vendor/unity/test/testdata/testRunnerGenerator.c +204 -0
- data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +73 -0
- data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +200 -0
- data/vendor/unity/test/tests/self_assessment_utils.h +151 -0
- data/vendor/unity/test/tests/test_generate_test_runner.rb +1341 -0
- data/vendor/unity/test/tests/test_unity_arrays.c +2941 -0
- data/vendor/unity/test/tests/test_unity_core.c +375 -0
- data/vendor/unity/test/tests/test_unity_doubles.c +1285 -0
- data/vendor/unity/test/tests/test_unity_floats.c +1395 -0
- data/vendor/unity/test/tests/test_unity_integers.c +2863 -0
- data/vendor/unity/test/tests/test_unity_integers_64.c +783 -0
- data/vendor/unity/test/tests/test_unity_memory.c +82 -0
- data/vendor/unity/test/tests/test_unity_parameterized.c +309 -0
- data/vendor/unity/test/tests/test_unity_parameterizedDemo.c +28 -0
- data/vendor/unity/test/tests/test_unity_strings.c +330 -0
- data/vendor/unity/test/tests/types_for_test.h +21 -0
- data/vendor/unity/unityConfig.cmake +1 -0
- metadata +1211 -251
- data/.gitignore +0 -14
- data/.vim +0 -1
- data/.yardopts +0 -1
- data/LICENSE +0 -19
- data/ceedling-gem.sublime-project +0 -575
- data/examples/temp_sensor/rakefile.rb +0 -4
- data/examples/temp_sensor/src/AT91SAM7X256.h +0 -2556
- data/examples/temp_sensor/src/UsartGetChar.c +0 -6
- data/examples/temp_sensor/src/UsartGetChar.h +0 -8
- data/examples/temp_sensor/test/test_AdcConductor.c +0 -121
- data/examples/temp_sensor/test/test_AdcHardware.c +0 -44
- data/examples/temp_sensor/test/test_AdcHardwareConfigurator.c +0 -43
- data/examples/temp_sensor/test/test_AdcModel.c +0 -33
- data/examples/temp_sensor/test/test_AdcTemperatureSensor.c +0 -47
- data/examples/temp_sensor/test/test_Executor.c +0 -36
- data/examples/temp_sensor/test/test_Main.c +0 -24
- data/examples/temp_sensor/test/test_Model.c +0 -20
- data/examples/temp_sensor/test/test_TaskScheduler.c +0 -104
- data/examples/temp_sensor/test/test_TemperatureCalculator.c +0 -33
- data/examples/temp_sensor/test/test_TemperatureFilter.c +0 -71
- data/examples/temp_sensor/test/test_TimerConductor.c +0 -32
- data/examples/temp_sensor/test/test_TimerConfigurator.c +0 -112
- data/examples/temp_sensor/test/test_TimerHardware.c +0 -26
- data/examples/temp_sensor/test/test_TimerInterruptConfigurator.c +0 -78
- data/examples/temp_sensor/test/test_TimerInterruptHandler.c +0 -66
- data/examples/temp_sensor/test/test_TimerModel.c +0 -18
- data/examples/temp_sensor/test/test_UsartBaudRateRegisterCalculator.c +0 -21
- data/examples/temp_sensor/test/test_UsartConductor.c +0 -40
- data/examples/temp_sensor/test/test_UsartConfigurator.c +0 -77
- data/examples/temp_sensor/test/test_UsartGetChar.c +0 -17
- data/examples/temp_sensor/test/test_UsartHardware.c +0 -56
- data/examples/temp_sensor/test/test_UsartModel.c +0 -40
- data/examples/temp_sensor/test/test_UsartPutChar.c +0 -43
- data/examples/temp_sensor/test/test_UsartTransmitBufferStatus.c +0 -22
- data/lib/ceedling/version.rb +0 -16
- data/lib/ceedling/version.rb.erb +0 -16
- data/new_project_template/build/.gitkeep +0 -0
- data/new_project_template/project.yml +0 -65
- data/new_project_template/rakefile.rb +0 -4
- data/new_project_template/src/.gitkeep +0 -0
- data/new_project_template/test/.gitkeep +0 -0
- data/new_project_template/test/support/.gitkeep +0 -0
- data/new_project_template/vendor/ceedling/docs/CExceptionSummary.pdf +0 -0
- data/new_project_template/vendor/ceedling/docs/CMock Summary.pdf +0 -0
- data/new_project_template/vendor/ceedling/docs/Ceedling Packet.pdf +0 -0
- data/new_project_template/vendor/ceedling/docs/Unity Summary.pdf +0 -0
- data/new_project_template/vendor/ceedling/lib/build_invoker_utils.rb +0 -27
- data/new_project_template/vendor/ceedling/lib/cacheinator.rb +0 -42
- data/new_project_template/vendor/ceedling/lib/cacheinator_helper.rb +0 -12
- data/new_project_template/vendor/ceedling/lib/cmock_builder.rb +0 -15
- data/new_project_template/vendor/ceedling/lib/configurator.rb +0 -329
- data/new_project_template/vendor/ceedling/lib/configurator_builder.rb +0 -419
- data/new_project_template/vendor/ceedling/lib/configurator_plugins.rb +0 -93
- data/new_project_template/vendor/ceedling/lib/configurator_setup.rb +0 -123
- data/new_project_template/vendor/ceedling/lib/configurator_validator.rb +0 -184
- data/new_project_template/vendor/ceedling/lib/constants.rb +0 -91
- data/new_project_template/vendor/ceedling/lib/defaults.rb +0 -378
- data/new_project_template/vendor/ceedling/lib/dependinator.rb +0 -92
- data/new_project_template/vendor/ceedling/lib/file_finder.rb +0 -132
- data/new_project_template/vendor/ceedling/lib/file_finder_helper.rb +0 -54
- data/new_project_template/vendor/ceedling/lib/file_path_utils.rb +0 -189
- data/new_project_template/vendor/ceedling/lib/file_system_utils.rb +0 -69
- data/new_project_template/vendor/ceedling/lib/file_wrapper.rb +0 -74
- data/new_project_template/vendor/ceedling/lib/flaginator.rb +0 -54
- data/new_project_template/vendor/ceedling/lib/generator.rb +0 -162
- data/new_project_template/vendor/ceedling/lib/generator_helper.rb +0 -40
- data/new_project_template/vendor/ceedling/lib/generator_test_results.rb +0 -89
- data/new_project_template/vendor/ceedling/lib/generator_test_results_sanity_checker.rb +0 -62
- data/new_project_template/vendor/ceedling/lib/generator_test_runner.rb +0 -63
- data/new_project_template/vendor/ceedling/lib/loginator.rb +0 -31
- data/new_project_template/vendor/ceedling/lib/makefile.rb +0 -46
- data/new_project_template/vendor/ceedling/lib/objects.yml +0 -301
- data/new_project_template/vendor/ceedling/lib/plugin.rb +0 -79
- data/new_project_template/vendor/ceedling/lib/plugin_manager.rb +0 -95
- data/new_project_template/vendor/ceedling/lib/plugin_manager_helper.rb +0 -19
- data/new_project_template/vendor/ceedling/lib/plugin_reportinator.rb +0 -75
- data/new_project_template/vendor/ceedling/lib/plugin_reportinator_helper.rb +0 -52
- data/new_project_template/vendor/ceedling/lib/preprocessinator.rb +0 -43
- data/new_project_template/vendor/ceedling/lib/preprocessinator_extractor.rb +0 -36
- data/new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb +0 -21
- data/new_project_template/vendor/ceedling/lib/preprocessinator_helper.rb +0 -46
- data/new_project_template/vendor/ceedling/lib/preprocessinator_includes_handler.rb +0 -55
- data/new_project_template/vendor/ceedling/lib/project_config_manager.rb +0 -38
- data/new_project_template/vendor/ceedling/lib/project_file_loader.rb +0 -64
- data/new_project_template/vendor/ceedling/lib/rake_utils.rb +0 -17
- data/new_project_template/vendor/ceedling/lib/rake_wrapper.rb +0 -31
- data/new_project_template/vendor/ceedling/lib/rakefile.rb +0 -61
- data/new_project_template/vendor/ceedling/lib/release_invoker.rb +0 -58
- data/new_project_template/vendor/ceedling/lib/release_invoker_helper.rb +0 -16
- data/new_project_template/vendor/ceedling/lib/reportinator.rb +0 -9
- data/new_project_template/vendor/ceedling/lib/rules_cmock.rake +0 -9
- data/new_project_template/vendor/ceedling/lib/rules_preprocess.rake +0 -26
- data/new_project_template/vendor/ceedling/lib/rules_release.rake +0 -79
- data/new_project_template/vendor/ceedling/lib/rules_release_deep_dependencies.rake +0 -15
- data/new_project_template/vendor/ceedling/lib/rules_tests.rake +0 -59
- data/new_project_template/vendor/ceedling/lib/rules_tests_deep_dependencies.rake +0 -15
- data/new_project_template/vendor/ceedling/lib/setupinator.rb +0 -51
- data/new_project_template/vendor/ceedling/lib/stream_wrapper.rb +0 -20
- data/new_project_template/vendor/ceedling/lib/streaminator.rb +0 -41
- data/new_project_template/vendor/ceedling/lib/streaminator_helper.rb +0 -15
- data/new_project_template/vendor/ceedling/lib/system_utils.rb +0 -32
- data/new_project_template/vendor/ceedling/lib/system_wrapper.rb +0 -75
- data/new_project_template/vendor/ceedling/lib/task_invoker.rb +0 -85
- data/new_project_template/vendor/ceedling/lib/tasks_base.rake +0 -104
- data/new_project_template/vendor/ceedling/lib/tasks_filesystem.rake +0 -91
- data/new_project_template/vendor/ceedling/lib/tasks_release.rake +0 -28
- data/new_project_template/vendor/ceedling/lib/tasks_release_deep_dependencies.rake +0 -9
- data/new_project_template/vendor/ceedling/lib/tasks_tests.rake +0 -52
- data/new_project_template/vendor/ceedling/lib/tasks_tests_deep_dependencies.rake +0 -9
- data/new_project_template/vendor/ceedling/lib/tasks_vendor.rake +0 -36
- data/new_project_template/vendor/ceedling/lib/test_includes_extractor.rb +0 -81
- data/new_project_template/vendor/ceedling/lib/test_invoker.rb +0 -97
- data/new_project_template/vendor/ceedling/lib/test_invoker_helper.rb +0 -28
- data/new_project_template/vendor/ceedling/lib/tool_executor.rb +0 -212
- data/new_project_template/vendor/ceedling/lib/tool_executor_helper.rb +0 -115
- data/new_project_template/vendor/ceedling/lib/verbosinator.rb +0 -10
- data/new_project_template/vendor/ceedling/lib/yaml_wrapper.rb +0 -16
- data/new_project_template/vendor/ceedling/plugins/bullseye/bullseye.rake +0 -162
- data/new_project_template/vendor/ceedling/plugins/bullseye/bullseye.rb +0 -173
- data/new_project_template/vendor/ceedling/plugins/bullseye/defaults.yml +0 -53
- data/new_project_template/vendor/ceedling/plugins/bullseye/readme.txt +0 -0
- data/new_project_template/vendor/ceedling/plugins/gcov/defaults.yml +0 -34
- data/new_project_template/vendor/ceedling/plugins/gcov/gcov.rake +0 -152
- data/new_project_template/vendor/ceedling/plugins/gcov/gcov.rb +0 -128
- data/new_project_template/vendor/ceedling/plugins/gcov/readme.txt +0 -0
- data/new_project_template/vendor/ceedling/plugins/gcov/template.erb +0 -15
- data/new_project_template/vendor/ceedling/plugins/module_generator/module_generator.rake +0 -14
- data/new_project_template/vendor/ceedling/plugins/module_generator/module_generator.rb +0 -218
- data/new_project_template/vendor/ceedling/plugins/module_generator/module_generator.yml +0 -4
- data/new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/stdout_ide_tests_report.rb +0 -44
- data/new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/stdout_ide_tests_report.yml +0 -4
- data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb +0 -48
- data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.yml +0 -4
- data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/template.erb +0 -59
- data/new_project_template/vendor/ceedling/plugins/warnings_report/warnings_report.rb +0 -71
- data/new_project_template/vendor/ceedling/plugins/xml_tests_report/xml_tests_report.rb +0 -110
- data/new_project_template/vendor/ceedling/release/build.info +0 -1
- data/new_project_template/vendor/ceedling/release/version.info +0 -1
- data/new_project_template/vendor/ceedling/vendor/c_exception/lib/CException.c +0 -39
- data/new_project_template/vendor/ceedling/vendor/c_exception/lib/CException.h +0 -70
- data/new_project_template/vendor/ceedling/vendor/c_exception/release/build.info +0 -1
- data/new_project_template/vendor/ceedling/vendor/c_exception/release/version.info +0 -2
- data/new_project_template/vendor/ceedling/vendor/cmock/config/production_environment.rb +0 -14
- data/new_project_template/vendor/ceedling/vendor/cmock/config/test_environment.rb +0 -16
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock.rb +0 -65
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_config.rb +0 -129
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_file_writer.rb +0 -33
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_generator.rb +0 -194
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_array.rb +0 -57
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_callback.rb +0 -78
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_cexception.rb +0 -51
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_expect.rb +0 -86
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +0 -85
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_generator_utils.rb +0 -177
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_header_parser.rb +0 -273
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_plugin_manager.rb +0 -40
- data/new_project_template/vendor/ceedling/vendor/cmock/lib/cmock_unityhelper_parser.rb +0 -74
- data/new_project_template/vendor/ceedling/vendor/cmock/release/build.info +0 -1
- data/new_project_template/vendor/ceedling/vendor/cmock/release/version.info +0 -2
- data/new_project_template/vendor/ceedling/vendor/cmock/src/cmock.c +0 -186
- data/new_project_template/vendor/ceedling/vendor/cmock/src/cmock.h +0 -30
- data/new_project_template/vendor/ceedling/vendor/constructor/lib/constructor.rb +0 -127
- data/new_project_template/vendor/ceedling/vendor/constructor/lib/constructor_struct.rb +0 -33
- data/new_project_template/vendor/ceedling/vendor/deep_merge/lib/deep_merge.rb +0 -211
- data/new_project_template/vendor/ceedling/vendor/diy/lib/diy/factory.rb +0 -36
- data/new_project_template/vendor/ceedling/vendor/diy/lib/diy.rb +0 -403
- data/new_project_template/vendor/ceedling/vendor/unity/auto/generate_test_runner.rb +0 -308
- data/new_project_template/vendor/ceedling/vendor/unity/release/build.info +0 -1
- data/new_project_template/vendor/ceedling/vendor/unity/release/version.info +0 -2
- data/new_project_template/vendor/ceedling/vendor/unity/src/unity.c +0 -960
- data/new_project_template/vendor/ceedling/vendor/unity/src/unity.h +0 -232
- data/new_project_template/vendor/ceedling/vendor/unity/src/unity_internals.h +0 -414
- /data/{new_project_template/vendor/ceedling/plugins/bullseye → plugins/bullseye/assets}/template.erb +0 -0
@@ -0,0 +1,860 @@
|
|
1
|
+
# Unity Assertions Reference
|
2
|
+
|
3
|
+
## Background and Overview
|
4
|
+
|
5
|
+
### Super Condensed Version
|
6
|
+
|
7
|
+
- An assertion establishes truth (i.e. boolean True) for a single condition.
|
8
|
+
Upon boolean False, an assertion stops execution and reports the failure.
|
9
|
+
- Unity is mainly a rich collection of assertions and the support to gather up
|
10
|
+
and easily execute those assertions.
|
11
|
+
- The structure of Unity allows you to easily separate test assertions from
|
12
|
+
source code in, well, test code.
|
13
|
+
- Unity’s assertions:
|
14
|
+
- Come in many, many flavors to handle different C types and assertion cases.
|
15
|
+
- Use context to provide detailed and helpful failure messages.
|
16
|
+
- Document types, expected values, and basic behavior in your source code for
|
17
|
+
free.
|
18
|
+
|
19
|
+
### Unity Is Several Things But Mainly It’s Assertions
|
20
|
+
|
21
|
+
One way to think of Unity is simply as a rich collection of assertions you can
|
22
|
+
use to establish whether your source code behaves the way you think it does.
|
23
|
+
Unity provides a framework to easily organize and execute those assertions in
|
24
|
+
test code separate from your source code.
|
25
|
+
|
26
|
+
### What’s an Assertion?
|
27
|
+
|
28
|
+
At their core, assertions are an establishment of truth - boolean truth. Was this
|
29
|
+
thing equal to that thing? Does that code doohickey have such-and-such property
|
30
|
+
or not? You get the idea. Assertions are executable code. Static analysis is a
|
31
|
+
valuable approach to improving code quality, but it is not executing your code
|
32
|
+
in the way an assertion can. A failing assertion stops execution and reports an
|
33
|
+
error through some appropriate I/O channel (e.g. stdout, GUI, output file,
|
34
|
+
blinky light).
|
35
|
+
|
36
|
+
Fundamentally, for dynamic verification all you need is a single assertion
|
37
|
+
mechanism. In fact, that’s what the [assert() macro][] in C’s standard library
|
38
|
+
is for. So why not just use it? Well, we can do far better in the reporting
|
39
|
+
department. C’s `assert()` is pretty dumb as-is and is particularly poor for
|
40
|
+
handling common data types like arrays, structs, etc. And, without some other
|
41
|
+
support, it’s far too tempting to litter source code with C’s `assert()`’s. It’s
|
42
|
+
generally much cleaner, manageable, and more useful to separate test and source
|
43
|
+
code in the way Unity facilitates.
|
44
|
+
|
45
|
+
### Unity’s Assertions: Helpful Messages _and_ Free Source Code Documentation
|
46
|
+
|
47
|
+
Asserting a simple truth condition is valuable, but using the context of the
|
48
|
+
assertion is even more valuable. For instance, if you know you’re comparing bit
|
49
|
+
flags and not just integers, then why not use that context to give explicit,
|
50
|
+
readable, bit-level feedback when an assertion fails?
|
51
|
+
|
52
|
+
That’s what Unity’s collection of assertions do - capture context to give you
|
53
|
+
helpful, meaningful assertion failure messages. In fact, the assertions
|
54
|
+
themselves also serve as executable documentation about types and values in your
|
55
|
+
source code. So long as your tests remain current with your source and all those
|
56
|
+
tests pass, you have a detailed, up-to-date view of the intent and mechanisms in
|
57
|
+
your source code. And due to a wondrous mystery, well-tested code usually tends
|
58
|
+
to be well designed code.
|
59
|
+
|
60
|
+
## Assertion Conventions and Configurations
|
61
|
+
|
62
|
+
### Naming and Parameter Conventions
|
63
|
+
|
64
|
+
The convention of assertion parameters generally follows this order:
|
65
|
+
|
66
|
+
```c
|
67
|
+
TEST_ASSERT_X( {modifiers}, {expected}, actual, {size/count} )
|
68
|
+
```
|
69
|
+
|
70
|
+
The very simplest assertion possible uses only a single `actual` parameter (e.g.
|
71
|
+
a simple null check).
|
72
|
+
|
73
|
+
- `Actual` is the value being tested and unlike the other parameters in an
|
74
|
+
assertion construction is the only parameter present in all assertion variants.
|
75
|
+
- `Modifiers` are masks, ranges, bit flag specifiers, floating point deltas.
|
76
|
+
- `Expected` is your expected value (duh) to compare to an `actual` value; it’s
|
77
|
+
marked as an optional parameter because some assertions only need a single
|
78
|
+
`actual` parameter (e.g. null check).
|
79
|
+
- `Size/count` refers to string lengths, number of array elements, etc.
|
80
|
+
|
81
|
+
Many of Unity’s assertions are clear duplications in that the same data type
|
82
|
+
is handled by several assertions. The differences among these are in how failure
|
83
|
+
messages are presented. For instance, a `_HEX` variant of an assertion prints
|
84
|
+
the expected and actual values of that assertion formatted as hexadecimal.
|
85
|
+
|
86
|
+
#### TEST_ASSERT_X_MESSAGE Variants
|
87
|
+
|
88
|
+
_All_ assertions are complemented with a variant that includes a simple string
|
89
|
+
message as a final parameter. The string you specify is appended to an assertion
|
90
|
+
failure message in Unity output.
|
91
|
+
|
92
|
+
For brevity, the assertion variants with a message parameter are not listed
|
93
|
+
below. Just tack on `_MESSAGE` as the final component to any assertion name in
|
94
|
+
the reference list below and add a string as the final parameter.
|
95
|
+
|
96
|
+
_Example:_
|
97
|
+
|
98
|
+
```c
|
99
|
+
TEST_ASSERT_X( {modifiers}, {expected}, actual, {size/count} )
|
100
|
+
```
|
101
|
+
|
102
|
+
becomes messageified like thus…
|
103
|
+
|
104
|
+
```c
|
105
|
+
TEST_ASSERT_X_MESSAGE( {modifiers}, {expected}, actual, {size/count}, message )
|
106
|
+
```
|
107
|
+
|
108
|
+
Notes:
|
109
|
+
|
110
|
+
- The `_MESSAGE` variants intentionally do not support `printf` style formatting
|
111
|
+
since many embedded projects don’t support or avoid `printf` for various reasons.
|
112
|
+
It is possible to use `sprintf` before the assertion to assemble a complex fail
|
113
|
+
message, if necessary.
|
114
|
+
- If you want to output a counter value within an assertion fail message (e.g. from
|
115
|
+
a loop) , building up an array of results and then using one of the `_ARRAY`
|
116
|
+
assertions (see below) might be a handy alternative to `sprintf`.
|
117
|
+
|
118
|
+
#### TEST_ASSERT_X_ARRAY Variants
|
119
|
+
|
120
|
+
Unity provides a collection of assertions for arrays containing a variety of
|
121
|
+
types. These are documented in the Array section below. These are almost on par
|
122
|
+
with the `_MESSAGE`variants of Unity’s Asserts in that for pretty much any Unity
|
123
|
+
type assertion you can tack on `_ARRAY` and run assertions on an entire block of
|
124
|
+
memory.
|
125
|
+
|
126
|
+
```c
|
127
|
+
TEST_ASSERT_EQUAL_TYPEX_ARRAY( expected, actual, {size/count} )
|
128
|
+
```
|
129
|
+
|
130
|
+
- `Expected` is an array itself.
|
131
|
+
- `Size/count` is one or two parameters necessary to establish the number of array
|
132
|
+
elements and perhaps the length of elements within the array.
|
133
|
+
|
134
|
+
Notes:
|
135
|
+
|
136
|
+
- The `_MESSAGE` variant convention still applies here to array assertions. The
|
137
|
+
`_MESSAGE` variants of the `_ARRAY` assertions have names ending with
|
138
|
+
`_ARRAY_MESSAGE`.
|
139
|
+
- Assertions for handling arrays of floating point values are grouped with float
|
140
|
+
and double assertions (see immediately following section).
|
141
|
+
|
142
|
+
### TEST_ASSERT_EACH_EQUAL_X Variants
|
143
|
+
|
144
|
+
Unity provides a collection of assertions for arrays containing a variety of
|
145
|
+
types which can be compared to a single value as well. These are documented in
|
146
|
+
the Each Equal section below. these are almost on par with the `_MESSAGE`
|
147
|
+
variants of Unity’s Asserts in that for pretty much any Unity type assertion you
|
148
|
+
can inject `_EACH_EQUAL` and run assertions on an entire block of memory.
|
149
|
+
|
150
|
+
```c
|
151
|
+
TEST_ASSERT_EACH_EQUAL_TYPEX( expected, actual, {size/count} )
|
152
|
+
```
|
153
|
+
|
154
|
+
- `Expected` is a single value to compare to.
|
155
|
+
- `Actual` is an array where each element will be compared to the expected value.
|
156
|
+
- `Size/count` is one of two parameters necessary to establish the number of array
|
157
|
+
elements and perhaps the length of elements within the array.
|
158
|
+
|
159
|
+
Notes:
|
160
|
+
|
161
|
+
- The `_MESSAGE` variant convention still applies here to Each Equal assertions.
|
162
|
+
- Assertions for handling Each Equal of floating point values are grouped with
|
163
|
+
float and double assertions (see immediately following section).
|
164
|
+
|
165
|
+
### Configuration
|
166
|
+
|
167
|
+
#### Floating Point Support Is Optional
|
168
|
+
|
169
|
+
Support for floating point types is configurable. That is, by defining the
|
170
|
+
appropriate preprocessor symbols, floats and doubles can be individually enabled
|
171
|
+
or disabled in Unity code. This is useful for embedded targets with no floating
|
172
|
+
point math support (i.e. Unity compiles free of errors for fixed point only
|
173
|
+
platforms). See Unity documentation for specifics.
|
174
|
+
|
175
|
+
#### Maximum Data Type Width Is Configurable
|
176
|
+
|
177
|
+
Not all targets support 64 bit wide types or even 32 bit wide types. Define the
|
178
|
+
appropriate preprocessor symbols and Unity will omit all operations from
|
179
|
+
compilation that exceed the maximum width of your target. See Unity
|
180
|
+
documentation for specifics.
|
181
|
+
|
182
|
+
## The Assertions in All Their Blessed Glory
|
183
|
+
|
184
|
+
### Basic Fail, Pass and Ignore
|
185
|
+
|
186
|
+
#### `TEST_FAIL()`
|
187
|
+
|
188
|
+
#### `TEST_FAIL_MESSAGE("message")`
|
189
|
+
|
190
|
+
This fella is most often used in special conditions where your test code is
|
191
|
+
performing logic beyond a simple assertion. That is, in practice, `TEST_FAIL()`
|
192
|
+
will always be found inside a conditional code block.
|
193
|
+
|
194
|
+
_Examples:_
|
195
|
+
|
196
|
+
- Executing a state machine multiple times that increments a counter your test
|
197
|
+
code then verifies as a final step.
|
198
|
+
- Triggering an exception and verifying it (as in Try / Catch / Throw - see the
|
199
|
+
[CException](https://github.com/ThrowTheSwitch/CException) project).
|
200
|
+
|
201
|
+
#### `TEST_PASS()`
|
202
|
+
|
203
|
+
#### `TEST_PASS_MESSAGE("message")`
|
204
|
+
|
205
|
+
This will abort the remainder of the test, but count the test as a pass. Under
|
206
|
+
normal circumstances, it is not necessary to include this macro in your tests…
|
207
|
+
a lack of failure will automatically be counted as a `PASS`. It is occasionally
|
208
|
+
useful for tests with `#ifdef`s and such.
|
209
|
+
|
210
|
+
#### `TEST_IGNORE()`
|
211
|
+
|
212
|
+
#### `TEST_IGNORE_MESSAGE("message")`
|
213
|
+
|
214
|
+
Marks a test case (i.e. function meant to contain test assertions) as ignored.
|
215
|
+
Usually this is employed as a breadcrumb to come back and implement a test case.
|
216
|
+
An ignored test case has effects if other assertions are in the enclosing test
|
217
|
+
case (see Unity documentation for more).
|
218
|
+
|
219
|
+
#### `TEST_MESSAGE(message)`
|
220
|
+
|
221
|
+
This can be useful for outputting `INFO` messages into the Unity output stream
|
222
|
+
without actually ending the test. Like pass and fail messages, it will be output
|
223
|
+
with the filename and line number.
|
224
|
+
|
225
|
+
### Boolean
|
226
|
+
|
227
|
+
#### `TEST_ASSERT (condition)`
|
228
|
+
|
229
|
+
#### `TEST_ASSERT_TRUE (condition)`
|
230
|
+
|
231
|
+
#### `TEST_ASSERT_FALSE (condition)`
|
232
|
+
|
233
|
+
#### `TEST_ASSERT_UNLESS (condition)`
|
234
|
+
|
235
|
+
A simple wording variation on `TEST_ASSERT_FALSE`.The semantics of
|
236
|
+
`TEST_ASSERT_UNLESS` aid readability in certain test constructions or
|
237
|
+
conditional statements.
|
238
|
+
|
239
|
+
#### `TEST_ASSERT_NULL (pointer)`
|
240
|
+
|
241
|
+
#### `TEST_ASSERT_NOT_NULL (pointer)`
|
242
|
+
|
243
|
+
Verify if a pointer is or is not NULL.
|
244
|
+
|
245
|
+
#### `TEST_ASSERT_EMPTY (pointer)`
|
246
|
+
|
247
|
+
#### `TEST_ASSERT_NOT_EMPTY (pointer)`
|
248
|
+
|
249
|
+
Verify if the first element dereferenced from a pointer is or is not zero. This
|
250
|
+
is particularly useful for checking for empty (or non-empty) null-terminated
|
251
|
+
C strings, but can be just as easily used for other null-terminated arrays.
|
252
|
+
|
253
|
+
### Signed and Unsigned Integers (of all sizes)
|
254
|
+
|
255
|
+
Large integer sizes can be disabled for build targets that do not support them.
|
256
|
+
For example, if your target only supports up to 16 bit types, by defining the
|
257
|
+
appropriate symbols Unity can be configured to omit 32 and 64 bit operations
|
258
|
+
that would break compilation (see Unity documentation for more). Refer to
|
259
|
+
Advanced Asserting later in this document for advice on dealing with other word
|
260
|
+
sizes.
|
261
|
+
|
262
|
+
#### `TEST_ASSERT_EQUAL_INT (expected, actual)`
|
263
|
+
|
264
|
+
#### `TEST_ASSERT_EQUAL_INT8 (expected, actual)`
|
265
|
+
|
266
|
+
#### `TEST_ASSERT_EQUAL_INT16 (expected, actual)`
|
267
|
+
|
268
|
+
#### `TEST_ASSERT_EQUAL_INT32 (expected, actual)`
|
269
|
+
|
270
|
+
#### `TEST_ASSERT_EQUAL_INT64 (expected, actual)`
|
271
|
+
|
272
|
+
#### `TEST_ASSERT_EQUAL_UINT (expected, actual)`
|
273
|
+
|
274
|
+
#### `TEST_ASSERT_EQUAL_UINT8 (expected, actual)`
|
275
|
+
|
276
|
+
#### `TEST_ASSERT_EQUAL_UINT16 (expected, actual)`
|
277
|
+
|
278
|
+
#### `TEST_ASSERT_EQUAL_UINT32 (expected, actual)`
|
279
|
+
|
280
|
+
#### `TEST_ASSERT_EQUAL_UINT64 (expected, actual)`
|
281
|
+
|
282
|
+
### Unsigned Integers (of all sizes) in Hexadecimal
|
283
|
+
|
284
|
+
All `_HEX` assertions are identical in function to unsigned integer assertions
|
285
|
+
but produce failure messages with the `expected` and `actual` values formatted
|
286
|
+
in hexadecimal. Unity output is big endian.
|
287
|
+
|
288
|
+
#### `TEST_ASSERT_EQUAL_HEX (expected, actual)`
|
289
|
+
|
290
|
+
#### `TEST_ASSERT_EQUAL_HEX8 (expected, actual)`
|
291
|
+
|
292
|
+
#### `TEST_ASSERT_EQUAL_HEX16 (expected, actual)`
|
293
|
+
|
294
|
+
#### `TEST_ASSERT_EQUAL_HEX32 (expected, actual)`
|
295
|
+
|
296
|
+
#### `TEST_ASSERT_EQUAL_HEX64 (expected, actual)`
|
297
|
+
|
298
|
+
### Characters
|
299
|
+
|
300
|
+
While you can use the 8-bit integer assertions to compare `char`, another option is
|
301
|
+
to use this specialized assertion which will show printable characters as printables,
|
302
|
+
otherwise showing the HEX escape code for the characters.
|
303
|
+
|
304
|
+
#### `TEST_ASSERT_EQUAL_CHAR (expected, actual)`
|
305
|
+
|
306
|
+
### Masked and Bit-level Assertions
|
307
|
+
|
308
|
+
Masked and bit-level assertions produce output formatted in hexadecimal. Unity
|
309
|
+
output is big endian.
|
310
|
+
|
311
|
+
#### `TEST_ASSERT_BITS (mask, expected, actual)`
|
312
|
+
|
313
|
+
Only compares the masked (i.e. high) bits of `expected` and `actual` parameters.
|
314
|
+
|
315
|
+
#### `TEST_ASSERT_BITS_HIGH (mask, actual)`
|
316
|
+
|
317
|
+
Asserts the masked bits of the `actual` parameter are high.
|
318
|
+
|
319
|
+
#### `TEST_ASSERT_BITS_LOW (mask, actual)`
|
320
|
+
|
321
|
+
Asserts the masked bits of the `actual` parameter are low.
|
322
|
+
|
323
|
+
#### `TEST_ASSERT_BIT_HIGH (bit, actual)`
|
324
|
+
|
325
|
+
Asserts the specified bit of the `actual` parameter is high.
|
326
|
+
|
327
|
+
#### `TEST_ASSERT_BIT_LOW (bit, actual)`
|
328
|
+
|
329
|
+
Asserts the specified bit of the `actual` parameter is low.
|
330
|
+
|
331
|
+
### Integer Less Than / Greater Than
|
332
|
+
|
333
|
+
These assertions verify that the `actual` parameter is less than or greater
|
334
|
+
than `threshold` (exclusive). For example, if the threshold value is 0 for the
|
335
|
+
greater than assertion will fail if it is 0 or less. There are assertions for
|
336
|
+
all the various sizes of ints, as for the equality assertions. Some examples:
|
337
|
+
|
338
|
+
#### `TEST_ASSERT_GREATER_THAN_INT8 (threshold, actual)`
|
339
|
+
|
340
|
+
#### `TEST_ASSERT_GREATER_OR_EQUAL_INT16 (threshold, actual)`
|
341
|
+
|
342
|
+
#### `TEST_ASSERT_LESS_THAN_INT32 (threshold, actual)`
|
343
|
+
|
344
|
+
#### `TEST_ASSERT_LESS_OR_EQUAL_UINT (threshold, actual)`
|
345
|
+
|
346
|
+
#### `TEST_ASSERT_NOT_EQUAL_UINT8 (threshold, actual)`
|
347
|
+
|
348
|
+
### Integer Ranges (of all sizes)
|
349
|
+
|
350
|
+
These assertions verify that the `expected` parameter is within +/- `delta`
|
351
|
+
(inclusive) of the `actual` parameter. For example, if the expected value is 10
|
352
|
+
and the delta is 3 then the assertion will fail for any value outside the range
|
353
|
+
of 7 - 13.
|
354
|
+
|
355
|
+
#### `TEST_ASSERT_INT_WITHIN (delta, expected, actual)`
|
356
|
+
|
357
|
+
#### `TEST_ASSERT_INT8_WITHIN (delta, expected, actual)`
|
358
|
+
|
359
|
+
#### `TEST_ASSERT_INT16_WITHIN (delta, expected, actual)`
|
360
|
+
|
361
|
+
#### `TEST_ASSERT_INT32_WITHIN (delta, expected, actual)`
|
362
|
+
|
363
|
+
#### `TEST_ASSERT_INT64_WITHIN (delta, expected, actual)`
|
364
|
+
|
365
|
+
#### `TEST_ASSERT_UINT_WITHIN (delta, expected, actual)`
|
366
|
+
|
367
|
+
#### `TEST_ASSERT_UINT8_WITHIN (delta, expected, actual)`
|
368
|
+
|
369
|
+
#### `TEST_ASSERT_UINT16_WITHIN (delta, expected, actual)`
|
370
|
+
|
371
|
+
#### `TEST_ASSERT_UINT32_WITHIN (delta, expected, actual)`
|
372
|
+
|
373
|
+
#### `TEST_ASSERT_UINT64_WITHIN (delta, expected, actual)`
|
374
|
+
|
375
|
+
#### `TEST_ASSERT_HEX_WITHIN (delta, expected, actual)`
|
376
|
+
|
377
|
+
#### `TEST_ASSERT_HEX8_WITHIN (delta, expected, actual)`
|
378
|
+
|
379
|
+
#### `TEST_ASSERT_HEX16_WITHIN (delta, expected, actual)`
|
380
|
+
|
381
|
+
#### `TEST_ASSERT_HEX32_WITHIN (delta, expected, actual)`
|
382
|
+
|
383
|
+
#### `TEST_ASSERT_HEX64_WITHIN (delta, expected, actual)`
|
384
|
+
|
385
|
+
#### `TEST_ASSERT_CHAR_WITHIN (delta, expected, actual)`
|
386
|
+
|
387
|
+
### Structs and Strings
|
388
|
+
|
389
|
+
#### `TEST_ASSERT_EQUAL_PTR (expected, actual)`
|
390
|
+
|
391
|
+
Asserts that the pointers point to the same memory location.
|
392
|
+
|
393
|
+
#### `TEST_ASSERT_EQUAL_STRING (expected, actual)`
|
394
|
+
|
395
|
+
Asserts that the null terminated (`’\0’`)strings are identical. If strings are
|
396
|
+
of different lengths or any portion of the strings before their terminators
|
397
|
+
differ, the assertion fails. Two NULL strings (i.e. zero length) are considered
|
398
|
+
equivalent.
|
399
|
+
|
400
|
+
#### `TEST_ASSERT_EQUAL_MEMORY (expected, actual, len)`
|
401
|
+
|
402
|
+
Asserts that the contents of the memory specified by the `expected` and `actual`
|
403
|
+
pointers is identical. The size of the memory blocks in bytes is specified by
|
404
|
+
the `len` parameter.
|
405
|
+
|
406
|
+
### Arrays
|
407
|
+
|
408
|
+
`expected` and `actual` parameters are both arrays. `num_elements` specifies the
|
409
|
+
number of elements in the arrays to compare.
|
410
|
+
|
411
|
+
`_HEX` assertions produce failure messages with expected and actual array
|
412
|
+
contents formatted in hexadecimal.
|
413
|
+
|
414
|
+
For array of strings comparison behavior, see comments for
|
415
|
+
`TEST_ASSERT_EQUAL_STRING` in the preceding section.
|
416
|
+
|
417
|
+
Assertions fail upon the first element in the compared arrays found not to
|
418
|
+
match. Failure messages specify the array index of the failed comparison.
|
419
|
+
|
420
|
+
#### `TEST_ASSERT_EQUAL_INT_ARRAY (expected, actual, num_elements)`
|
421
|
+
|
422
|
+
#### `TEST_ASSERT_EQUAL_INT8_ARRAY (expected, actual, num_elements)`
|
423
|
+
|
424
|
+
#### `TEST_ASSERT_EQUAL_INT16_ARRAY (expected, actual, num_elements)`
|
425
|
+
|
426
|
+
#### `TEST_ASSERT_EQUAL_INT32_ARRAY (expected, actual, num_elements)`
|
427
|
+
|
428
|
+
#### `TEST_ASSERT_EQUAL_INT64_ARRAY (expected, actual, num_elements)`
|
429
|
+
|
430
|
+
#### `TEST_ASSERT_EQUAL_UINT_ARRAY (expected, actual, num_elements)`
|
431
|
+
|
432
|
+
#### `TEST_ASSERT_EQUAL_UINT8_ARRAY (expected, actual, num_elements)`
|
433
|
+
|
434
|
+
#### `TEST_ASSERT_EQUAL_UINT16_ARRAY (expected, actual, num_elements)`
|
435
|
+
|
436
|
+
#### `TEST_ASSERT_EQUAL_UINT32_ARRAY (expected, actual, num_elements)`
|
437
|
+
|
438
|
+
#### `TEST_ASSERT_EQUAL_UINT64_ARRAY (expected, actual, num_elements)`
|
439
|
+
|
440
|
+
#### `TEST_ASSERT_EQUAL_HEX_ARRAY (expected, actual, num_elements)`
|
441
|
+
|
442
|
+
#### `TEST_ASSERT_EQUAL_HEX8_ARRAY (expected, actual, num_elements)`
|
443
|
+
|
444
|
+
#### `TEST_ASSERT_EQUAL_HEX16_ARRAY (expected, actual, num_elements)`
|
445
|
+
|
446
|
+
#### `TEST_ASSERT_EQUAL_HEX32_ARRAY (expected, actual, num_elements)`
|
447
|
+
|
448
|
+
#### `TEST_ASSERT_EQUAL_HEX64_ARRAY (expected, actual, num_elements)`
|
449
|
+
|
450
|
+
#### `TEST_ASSERT_EQUAL_CHAR_ARRAY (expected, actual, num_elements)`
|
451
|
+
|
452
|
+
#### `TEST_ASSERT_EQUAL_PTR_ARRAY (expected, actual, num_elements)`
|
453
|
+
|
454
|
+
#### `TEST_ASSERT_EQUAL_STRING_ARRAY (expected, actual, num_elements)`
|
455
|
+
|
456
|
+
#### `TEST_ASSERT_EQUAL_MEMORY_ARRAY (expected, actual, len, num_elements)`
|
457
|
+
|
458
|
+
`len` is the memory in bytes to be compared at each array element.
|
459
|
+
|
460
|
+
### Integer Array Ranges (of all sizes)
|
461
|
+
|
462
|
+
These assertions verify that the `expected` array parameter is within +/- `delta`
|
463
|
+
(inclusive) of the `actual` array parameter. For example, if the expected value is
|
464
|
+
\[10, 12\] and the delta is 3 then the assertion will fail for any value
|
465
|
+
outside the range of \[7 - 13, 9 - 15\].
|
466
|
+
|
467
|
+
#### `TEST_ASSERT_INT_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
468
|
+
|
469
|
+
#### `TEST_ASSERT_INT8_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
470
|
+
|
471
|
+
#### `TEST_ASSERT_INT16_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
472
|
+
|
473
|
+
#### `TEST_ASSERT_INT32_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
474
|
+
|
475
|
+
#### `TEST_ASSERT_INT64_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
476
|
+
|
477
|
+
#### `TEST_ASSERT_UINT_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
478
|
+
|
479
|
+
#### `TEST_ASSERT_UINT8_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
480
|
+
|
481
|
+
#### `TEST_ASSERT_UINT16_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
482
|
+
|
483
|
+
#### `TEST_ASSERT_UINT32_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
484
|
+
|
485
|
+
#### `TEST_ASSERT_UINT64_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
486
|
+
|
487
|
+
#### `TEST_ASSERT_HEX_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
488
|
+
|
489
|
+
#### `TEST_ASSERT_HEX8_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
490
|
+
|
491
|
+
#### `TEST_ASSERT_HEX16_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
492
|
+
|
493
|
+
#### `TEST_ASSERT_HEX32_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
494
|
+
|
495
|
+
#### `TEST_ASSERT_HEX64_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
496
|
+
|
497
|
+
#### `TEST_ASSERT_CHAR_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
498
|
+
|
499
|
+
### Each Equal (Arrays to Single Value)
|
500
|
+
|
501
|
+
`expected` are single values and `actual` are arrays. `num_elements` specifies
|
502
|
+
the number of elements in the arrays to compare.
|
503
|
+
|
504
|
+
`_HEX` assertions produce failure messages with expected and actual array
|
505
|
+
contents formatted in hexadecimal.
|
506
|
+
|
507
|
+
Assertions fail upon the first element in the compared arrays found not to
|
508
|
+
match. Failure messages specify the array index of the failed comparison.
|
509
|
+
|
510
|
+
#### `TEST_ASSERT_EACH_EQUAL_INT (expected, actual, num_elements)`
|
511
|
+
|
512
|
+
#### `TEST_ASSERT_EACH_EQUAL_INT8 (expected, actual, num_elements)`
|
513
|
+
|
514
|
+
#### `TEST_ASSERT_EACH_EQUAL_INT16 (expected, actual, num_elements)`
|
515
|
+
|
516
|
+
#### `TEST_ASSERT_EACH_EQUAL_INT32 (expected, actual, num_elements)`
|
517
|
+
|
518
|
+
#### `TEST_ASSERT_EACH_EQUAL_INT64 (expected, actual, num_elements)`
|
519
|
+
|
520
|
+
#### `TEST_ASSERT_EACH_EQUAL_UINT (expected, actual, num_elements)`
|
521
|
+
|
522
|
+
#### `TEST_ASSERT_EACH_EQUAL_UINT8 (expected, actual, num_elements)`
|
523
|
+
|
524
|
+
#### `TEST_ASSERT_EACH_EQUAL_UINT16 (expected, actual, num_elements)`
|
525
|
+
|
526
|
+
#### `TEST_ASSERT_EACH_EQUAL_UINT32 (expected, actual, num_elements)`
|
527
|
+
|
528
|
+
#### `TEST_ASSERT_EACH_EQUAL_UINT64 (expected, actual, num_elements)`
|
529
|
+
|
530
|
+
#### `TEST_ASSERT_EACH_EQUAL_HEX (expected, actual, num_elements)`
|
531
|
+
|
532
|
+
#### `TEST_ASSERT_EACH_EQUAL_HEX8 (expected, actual, num_elements)`
|
533
|
+
|
534
|
+
#### `TEST_ASSERT_EACH_EQUAL_HEX16 (expected, actual, num_elements)`
|
535
|
+
|
536
|
+
#### `TEST_ASSERT_EACH_EQUAL_HEX32 (expected, actual, num_elements)`
|
537
|
+
|
538
|
+
#### `TEST_ASSERT_EACH_EQUAL_HEX64 (expected, actual, num_elements)`
|
539
|
+
|
540
|
+
#### `TEST_ASSERT_EACH_EQUAL_CHAR (expected, actual, num_elements)`
|
541
|
+
|
542
|
+
#### `TEST_ASSERT_EACH_EQUAL_PTR (expected, actual, num_elements)`
|
543
|
+
|
544
|
+
#### `TEST_ASSERT_EACH_EQUAL_STRING (expected, actual, num_elements)`
|
545
|
+
|
546
|
+
#### `TEST_ASSERT_EACH_EQUAL_MEMORY (expected, actual, len, num_elements)`
|
547
|
+
|
548
|
+
`len` is the memory in bytes to be compared at each array element.
|
549
|
+
|
550
|
+
### Floating Point (If enabled)
|
551
|
+
|
552
|
+
#### `TEST_ASSERT_FLOAT_WITHIN (delta, expected, actual)`
|
553
|
+
|
554
|
+
Asserts that the `actual` value is within +/- `delta` of the `expected` value.
|
555
|
+
The nature of floating point representation is such that exact evaluations of
|
556
|
+
equality are not guaranteed.
|
557
|
+
|
558
|
+
#### `TEST_ASSERT_FLOAT_NOT_WITHIN (delta, expected, actual)`
|
559
|
+
|
560
|
+
Asserts that the `actual` value is NOT within +/- `delta` of the `expected` value.
|
561
|
+
|
562
|
+
#### `TEST_ASSERT_EQUAL_FLOAT (expected, actual)`
|
563
|
+
|
564
|
+
Asserts that the `actual` value is “close enough to be considered equal” to the
|
565
|
+
`expected` value. If you are curious about the details, refer to the Advanced
|
566
|
+
Asserting section for more details on this. Omitting a user-specified delta in a
|
567
|
+
floating point assertion is both a shorthand convenience and a requirement of
|
568
|
+
code generation conventions for CMock.
|
569
|
+
|
570
|
+
#### `TEST_ASSERT_NOT_EQUAL_FLOAT (expected, actual)`
|
571
|
+
|
572
|
+
Asserts that the `actual` value is NOT “close enough to be considered equal” to the
|
573
|
+
`expected` value.
|
574
|
+
|
575
|
+
#### `TEST_ASSERT_FLOAT_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
576
|
+
|
577
|
+
See Array assertion section for details. Note that individual array element
|
578
|
+
uses user-provided delta plus default comparison delta for checking
|
579
|
+
and is based on `TEST_ASSERT_FLOAT_WITHIN` comparison.
|
580
|
+
|
581
|
+
#### `TEST_ASSERT_EQUAL_FLOAT_ARRAY (expected, actual, num_elements)`
|
582
|
+
|
583
|
+
See Array assertion section for details. Note that individual array element
|
584
|
+
float comparisons are executed using `TEST_ASSERT_EQUAL_FLOAT`. That is, user
|
585
|
+
specified delta comparison values requires a custom-implemented floating point
|
586
|
+
array assertion.
|
587
|
+
|
588
|
+
#### `TEST_ASSERT_LESS_THAN_FLOAT (threshold, actual)`
|
589
|
+
|
590
|
+
Asserts that the `actual` parameter is less than `threshold` (exclusive).
|
591
|
+
For example, if the threshold value is 1.0f, the assertion will fail if it is
|
592
|
+
greater than 1.0f.
|
593
|
+
|
594
|
+
#### `TEST_ASSERT_GREATER_THAN_FLOAT (threshold, actual)`
|
595
|
+
|
596
|
+
Asserts that the `actual` parameter is greater than `threshold` (exclusive).
|
597
|
+
For example, if the threshold value is 1.0f, the assertion will fail if it is
|
598
|
+
less than 1.0f.
|
599
|
+
|
600
|
+
#### `TEST_ASSERT_LESS_OR_EQUAL_FLOAT (threshold, actual)`
|
601
|
+
|
602
|
+
Asserts that the `actual` parameter is less than or equal to `threshold`.
|
603
|
+
The rules for equality are the same as for `TEST_ASSERT_EQUAL_FLOAT`.
|
604
|
+
|
605
|
+
#### `TEST_ASSERT_GREATER_OR_EQUAL_FLOAT (threshold, actual)`
|
606
|
+
|
607
|
+
Asserts that the `actual` parameter is greater than `threshold`.
|
608
|
+
The rules for equality are the same as for `TEST_ASSERT_EQUAL_FLOAT`.
|
609
|
+
|
610
|
+
#### `TEST_ASSERT_FLOAT_IS_INF (actual)`
|
611
|
+
|
612
|
+
Asserts that `actual` parameter is equivalent to positive infinity floating
|
613
|
+
point representation.
|
614
|
+
|
615
|
+
#### `TEST_ASSERT_FLOAT_IS_NEG_INF (actual)`
|
616
|
+
|
617
|
+
Asserts that `actual` parameter is equivalent to negative infinity floating
|
618
|
+
point representation.
|
619
|
+
|
620
|
+
#### `TEST_ASSERT_FLOAT_IS_NAN (actual)`
|
621
|
+
|
622
|
+
Asserts that `actual` parameter is a Not A Number floating point representation.
|
623
|
+
|
624
|
+
#### `TEST_ASSERT_FLOAT_IS_DETERMINATE (actual)`
|
625
|
+
|
626
|
+
Asserts that `actual` parameter is a floating point representation usable for
|
627
|
+
mathematical operations. That is, the `actual` parameter is neither positive
|
628
|
+
infinity nor negative infinity nor Not A Number floating point representations.
|
629
|
+
|
630
|
+
#### `TEST_ASSERT_FLOAT_IS_NOT_INF (actual)`
|
631
|
+
|
632
|
+
Asserts that `actual` parameter is a value other than positive infinity floating
|
633
|
+
point representation.
|
634
|
+
|
635
|
+
#### `TEST_ASSERT_FLOAT_IS_NOT_NEG_INF (actual)`
|
636
|
+
|
637
|
+
Asserts that `actual` parameter is a value other than negative infinity floating
|
638
|
+
point representation.
|
639
|
+
|
640
|
+
#### `TEST_ASSERT_FLOAT_IS_NOT_NAN (actual)`
|
641
|
+
|
642
|
+
Asserts that `actual` parameter is a value other than Not A Number floating
|
643
|
+
point representation.
|
644
|
+
|
645
|
+
#### `TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE (actual)`
|
646
|
+
|
647
|
+
Asserts that `actual` parameter is not usable for mathematical operations. That
|
648
|
+
is, the `actual` parameter is either positive infinity or negative infinity or
|
649
|
+
Not A Number floating point representations.
|
650
|
+
|
651
|
+
### Double (If enabled)
|
652
|
+
|
653
|
+
#### `TEST_ASSERT_DOUBLE_WITHIN (delta, expected, actual)`
|
654
|
+
|
655
|
+
Asserts that the `actual` value is within +/- `delta` of the `expected` value.
|
656
|
+
The nature of floating point representation is such that exact evaluations of
|
657
|
+
equality are not guaranteed.
|
658
|
+
|
659
|
+
#### `TEST_ASSERT_DOUBLE_NOT_WITHIN (delta, expected, actual)`
|
660
|
+
|
661
|
+
Asserts that the `actual` value is NOT within +/- `delta` of the `expected` value.
|
662
|
+
|
663
|
+
#### `TEST_ASSERT_EQUAL_DOUBLE (expected, actual)`
|
664
|
+
|
665
|
+
Asserts that the `actual` value is “close enough to be considered equal” to the
|
666
|
+
`expected` value. If you are curious about the details, refer to the Advanced
|
667
|
+
Asserting section for more details. Omitting a user-specified delta in a
|
668
|
+
floating point assertion is both a shorthand convenience and a requirement of
|
669
|
+
code generation conventions for CMock.
|
670
|
+
|
671
|
+
#### `TEST_ASSERT_NOT_EQUAL_DOUBLE (expected, actual)`
|
672
|
+
|
673
|
+
Asserts that the `actual` value is NOT “close enough to be considered equal” to the
|
674
|
+
`expected` value.
|
675
|
+
|
676
|
+
#### `TEST_ASSERT_DOUBLE_ARRAY_WITHIN (delta, expected, actual, num_elements)`
|
677
|
+
|
678
|
+
See Array assertion section for details. Note that individual array element
|
679
|
+
uses user-provided delta plus default comparison delta for checking
|
680
|
+
and is based on `TEST_ASSERT_DOUBLE_WITHIN` comparison.
|
681
|
+
|
682
|
+
#### `TEST_ASSERT_EQUAL_DOUBLE_ARRAY (expected, actual, num_elements)`
|
683
|
+
|
684
|
+
See Array assertion section for details. Note that individual array element
|
685
|
+
double comparisons are executed using `TEST_ASSERT_EQUAL_DOUBLE`. That is, user
|
686
|
+
specified delta comparison values requires a custom implemented double array
|
687
|
+
assertion.
|
688
|
+
|
689
|
+
#### `TEST_ASSERT_LESS_THAN_DOUBLE (threshold, actual)`
|
690
|
+
|
691
|
+
Asserts that the `actual` parameter is less than `threshold` (exclusive).
|
692
|
+
For example, if the threshold value is 1.0, the assertion will fail if it is
|
693
|
+
greater than 1.0.
|
694
|
+
|
695
|
+
#### `TEST_ASSERT_LESS_OR_EQUAL_DOUBLE (threshold, actual)`
|
696
|
+
|
697
|
+
Asserts that the `actual` parameter is less than or equal to `threshold`.
|
698
|
+
The rules for equality are the same as for `TEST_ASSERT_EQUAL_DOUBLE`.
|
699
|
+
|
700
|
+
#### `TEST_ASSERT_GREATER_THAN_DOUBLE (threshold, actual)`
|
701
|
+
|
702
|
+
Asserts that the `actual` parameter is greater than `threshold` (exclusive).
|
703
|
+
For example, if the threshold value is 1.0, the assertion will fail if it is
|
704
|
+
less than 1.0.
|
705
|
+
|
706
|
+
#### `TEST_ASSERT_GREATER_OR_EQUAL_DOUBLE (threshold, actual)`
|
707
|
+
|
708
|
+
Asserts that the `actual` parameter is greater than or equal to `threshold`.
|
709
|
+
The rules for equality are the same as for `TEST_ASSERT_EQUAL_DOUBLE`.
|
710
|
+
|
711
|
+
#### `TEST_ASSERT_DOUBLE_IS_INF (actual)`
|
712
|
+
|
713
|
+
Asserts that `actual` parameter is equivalent to positive infinity floating
|
714
|
+
point representation.
|
715
|
+
|
716
|
+
#### `TEST_ASSERT_DOUBLE_IS_NEG_INF (actual)`
|
717
|
+
|
718
|
+
Asserts that `actual` parameter is equivalent to negative infinity floating point
|
719
|
+
representation.
|
720
|
+
|
721
|
+
#### `TEST_ASSERT_DOUBLE_IS_NAN (actual)`
|
722
|
+
|
723
|
+
Asserts that `actual` parameter is a Not A Number floating point representation.
|
724
|
+
|
725
|
+
#### `TEST_ASSERT_DOUBLE_IS_DETERMINATE (actual)`
|
726
|
+
|
727
|
+
Asserts that `actual` parameter is a floating point representation usable for
|
728
|
+
mathematical operations. That is, the `actual` parameter is neither positive
|
729
|
+
infinity nor negative infinity nor Not A Number floating point representations.
|
730
|
+
|
731
|
+
#### `TEST_ASSERT_DOUBLE_IS_NOT_INF (actual)`
|
732
|
+
|
733
|
+
Asserts that `actual` parameter is a value other than positive infinity floating
|
734
|
+
point representation.
|
735
|
+
|
736
|
+
#### `TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF (actual)`
|
737
|
+
|
738
|
+
Asserts that `actual` parameter is a value other than negative infinity floating
|
739
|
+
point representation.
|
740
|
+
|
741
|
+
#### `TEST_ASSERT_DOUBLE_IS_NOT_NAN (actual)`
|
742
|
+
|
743
|
+
Asserts that `actual` parameter is a value other than Not A Number floating
|
744
|
+
point representation.
|
745
|
+
|
746
|
+
#### `TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE (actual)`
|
747
|
+
|
748
|
+
Asserts that `actual` parameter is not usable for mathematical operations. That
|
749
|
+
is, the `actual` parameter is either positive infinity or negative infinity or
|
750
|
+
Not A Number floating point representations.
|
751
|
+
|
752
|
+
## Advanced Asserting: Details On Tricky Assertions
|
753
|
+
|
754
|
+
This section helps you understand how to deal with some of the trickier
|
755
|
+
assertion situations you may run into. It will give you a glimpse into some of
|
756
|
+
the under-the-hood details of Unity’s assertion mechanisms. If you’re one of
|
757
|
+
those people who likes to know what is going on in the background, read on. If
|
758
|
+
not, feel free to ignore the rest of this document until you need it.
|
759
|
+
|
760
|
+
### How do the EQUAL assertions work for FLOAT and DOUBLE?
|
761
|
+
|
762
|
+
As you may know, directly checking for equality between a pair of floats or a
|
763
|
+
pair of doubles is sloppy at best and an outright no-no at worst. Floating point
|
764
|
+
values can often be represented in multiple ways, particularly after a series of
|
765
|
+
operations on a value. Initializing a variable to the value of 2.0 is likely to
|
766
|
+
result in a floating point representation of 2 x 20,but a series of
|
767
|
+
mathematical operations might result in a representation of 8 x 2-2
|
768
|
+
that also evaluates to a value of 2. At some point repeated operations cause
|
769
|
+
equality checks to fail.
|
770
|
+
|
771
|
+
So Unity doesn’t do direct floating point comparisons for equality. Instead, it
|
772
|
+
checks if two floating point values are “really close.” If you leave Unity
|
773
|
+
running with defaults, “really close” means “within a significant bit or two.”
|
774
|
+
Under the hood, `TEST_ASSERT_EQUAL_FLOAT` is really `TEST_ASSERT_FLOAT_WITHIN`
|
775
|
+
with the `delta` parameter calculated on the fly. For single precision, delta is
|
776
|
+
the expected value multiplied by 0.00001, producing a very small proportional
|
777
|
+
range around the expected value.
|
778
|
+
|
779
|
+
If you are expecting a value of 20,000.0 the delta is calculated to be 0.2. So
|
780
|
+
any value between 19,999.8 and 20,000.2 will satisfy the equality check. This
|
781
|
+
works out to be roughly a single bit of range for a single-precision number, and
|
782
|
+
that’s just about as tight a tolerance as you can reasonably get from a floating
|
783
|
+
point value.
|
784
|
+
|
785
|
+
So what happens when it’s zero? Zero - even more than other floating point
|
786
|
+
values - can be represented many different ways. It doesn’t matter if you have
|
787
|
+
0x20 or 0x263. It’s still zero, right? Luckily, if you subtract these
|
788
|
+
values from each other, they will always produce a difference of zero, which
|
789
|
+
will still fall between 0 plus or minus a delta of 0. So it still works!
|
790
|
+
|
791
|
+
Double precision floating point numbers use a much smaller multiplier, again
|
792
|
+
approximating a single bit of error.
|
793
|
+
|
794
|
+
If you don’t like these ranges and you want to make your floating point equality
|
795
|
+
assertions less strict, you can change these multipliers to whatever you like by
|
796
|
+
defining UNITY_FLOAT_PRECISION and UNITY_DOUBLE_PRECISION. See Unity
|
797
|
+
documentation for more.
|
798
|
+
|
799
|
+
### How do we deal with targets with non-standard int sizes?
|
800
|
+
|
801
|
+
It’s “fun” that C is a standard where something as fundamental as an integer
|
802
|
+
varies by target. According to the C standard, an `int` is to be the target’s
|
803
|
+
natural register size, and it should be at least 16-bits and a multiple of a
|
804
|
+
byte. It also guarantees an order of sizes:
|
805
|
+
|
806
|
+
```C
|
807
|
+
char <= short <= int <= long <= long long
|
808
|
+
```
|
809
|
+
|
810
|
+
Most often, `int` is 32-bits. In many cases in the embedded world, `int` is
|
811
|
+
16-bits. There are rare microcontrollers out there that have 24-bit integers,
|
812
|
+
and this remains perfectly standard C.
|
813
|
+
|
814
|
+
To make things even more interesting, there are compilers and targets out there
|
815
|
+
that have a hard choice to make. What if their natural register size is 10-bits
|
816
|
+
or 12-bits? Clearly they can’t fulfill _both_ the requirement to be at least
|
817
|
+
16-bits AND the requirement to match the natural register size. In these
|
818
|
+
situations, they often choose the natural register size, leaving us with
|
819
|
+
something like this:
|
820
|
+
|
821
|
+
```C
|
822
|
+
char (8 bit) <= short (12 bit) <= int (12 bit) <= long (16 bit)
|
823
|
+
```
|
824
|
+
|
825
|
+
Um… yikes. It’s obviously breaking a rule or two… but they had to break SOME
|
826
|
+
rules, so they made a choice.
|
827
|
+
|
828
|
+
When the C99 standard rolled around, it introduced alternate standard-size types.
|
829
|
+
It also introduced macros for pulling in MIN/MAX values for your integer types.
|
830
|
+
It’s glorious! Unfortunately, many embedded compilers can’t be relied upon to
|
831
|
+
use the C99 types (Sometimes because they have weird register sizes as described
|
832
|
+
above. Sometimes because they don’t feel like it?).
|
833
|
+
|
834
|
+
A goal of Unity from the beginning was to support every combination of
|
835
|
+
microcontroller or microprocessor and C compiler. Over time, we’ve gotten really
|
836
|
+
close to this. There are a few tricks that you should be aware of, though, if
|
837
|
+
you’re going to do this effectively on some of these more idiosyncratic targets.
|
838
|
+
|
839
|
+
First, when setting up Unity for a new target, you’re going to want to pay
|
840
|
+
special attention to the macros for automatically detecting types
|
841
|
+
(where available) or manually configuring them yourself. You can get information
|
842
|
+
on both of these in Unity’s documentation.
|
843
|
+
|
844
|
+
What about the times where you suddenly need to deal with something odd, like a
|
845
|
+
24-bit `int`? The simplest solution is to use the next size up. If you have a
|
846
|
+
24-bit `int`, configure Unity to use 32-bit integers. If you have a 12-bit
|
847
|
+
`int`, configure Unity to use 16 bits. There are two ways this is going to
|
848
|
+
affect you:
|
849
|
+
|
850
|
+
1. When Unity displays errors for you, it’s going to pad the upper unused bits
|
851
|
+
with zeros.
|
852
|
+
2. You’re going to have to be careful of assertions that perform signed
|
853
|
+
operations, particularly `TEST_ASSERT_INT_WITHIN`. Such assertions might wrap
|
854
|
+
your `int` in the wrong place, and you could experience false failures. You can
|
855
|
+
always back down to a simple `TEST_ASSERT` and do the operations yourself.
|
856
|
+
|
857
|
+
*Find The Latest of This And More at [ThrowTheSwitch.org][]*
|
858
|
+
|
859
|
+
[assert() macro]: http://en.wikipedia.org/wiki/Assert.h
|
860
|
+
[ThrowTheSwitch.org]: https://throwtheswitch.org
|