ceedling 0.20.3 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/Gemfile.lock +1 -0
- data/Rakefile +1 -0
- data/bin/ceedling +79 -26
- data/lib/ceedling/configurator_plugins.rb +0 -18
- data/lib/ceedling/rules_cmock.rake +1 -1
- data/lib/ceedling/tasks_base.rake +5 -1
- data/lib/ceedling/tasks_tests.rake +12 -9
- data/lib/ceedling/version.rb +1 -1
- data/lib/ceedling/version.rb.erb +1 -1
- data/plugins/fake_function_framework/README.md +250 -0
- data/plugins/fake_function_framework/Rakefile +19 -0
- data/plugins/fake_function_framework/examples/fff_example/project.yml +71 -0
- data/plugins/fake_function_framework/examples/fff_example/rakefile.rb +7 -0
- data/plugins/fake_function_framework/examples/fff_example/src/bar.c +1 -0
- data/plugins/fake_function_framework/examples/fff_example/src/bar.h +13 -0
- data/plugins/fake_function_framework/examples/fff_example/src/custom_types.h +6 -0
- data/plugins/fake_function_framework/examples/fff_example/src/display.c +7 -0
- data/plugins/fake_function_framework/examples/fff_example/src/display.h +16 -0
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +92 -0
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.h +11 -0
- data/plugins/fake_function_framework/examples/fff_example/src/foo.c +16 -0
- data/plugins/fake_function_framework/examples/fff_example/src/foo.h +8 -0
- data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.c +1 -0
- data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.h +6 -0
- data/plugins/fake_function_framework/examples/fff_example/test/test_event_processor.c +155 -0
- data/plugins/fake_function_framework/examples/fff_example/test/test_foo.c +47 -0
- data/plugins/fake_function_framework/lib/fake_function_framework.rb +87 -0
- data/plugins/fake_function_framework/lib/fff_mock_generator.rb +159 -0
- data/plugins/fake_function_framework/spec/fff_mock_generator_spec.rb +464 -0
- data/plugins/fake_function_framework/spec/spec_helper.rb +96 -0
- data/plugins/fake_function_framework/src/fff_unity_helper.h +33 -0
- data/plugins/fake_function_framework/vendor/fff/LICENSE +25 -0
- data/plugins/fake_function_framework/vendor/fff/Makefile +10 -0
- data/plugins/fake_function_framework/vendor/fff/README.md +454 -0
- data/plugins/fake_function_framework/vendor/fff/buildandtest +15 -0
- data/plugins/fake_function_framework/vendor/fff/examples/Makefile +7 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/Makefile +64 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.c +24 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.h +11 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.test.cpp +50 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/driver.test.fff.cpp +62 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/hardware_abstraction.h +15 -0
- data/plugins/fake_function_framework/vendor/fff/examples/driver_testing/registers.h +13 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/DISPLAY.h +17 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/Kata.txt +25 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/Makefile +67 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/SYSTEM.h +21 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI.c +48 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI.h +12 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI_test_ansic.c +183 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/UI_test_cpp.cpp +136 -0
- data/plugins/fake_function_framework/vendor/fff/examples/embedded_ui/test_suite_template.c +34 -0
- data/plugins/fake_function_framework/vendor/fff/fakegen.rb +420 -0
- data/plugins/fake_function_framework/vendor/fff/fff.h +5112 -0
- data/plugins/fake_function_framework/vendor/fff/gtest/Makefile +22 -0
- data/plugins/fake_function_framework/vendor/fff/gtest/gtest-all.cc +9118 -0
- data/plugins/fake_function_framework/vendor/fff/gtest/gtest-main.cc +6 -0
- data/plugins/fake_function_framework/vendor/fff/gtest/gtest.h +19537 -0
- data/plugins/fake_function_framework/vendor/fff/test/Makefile +81 -0
- data/plugins/fake_function_framework/vendor/fff/test/c_test_framework.h +15 -0
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_c.c +108 -0
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_cpp.cpp +45 -0
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_global_c.c +76 -0
- data/plugins/fake_function_framework/vendor/fff/test/fff_test_global_cpp.cpp +23 -0
- data/plugins/fake_function_framework/vendor/fff/test/global_fakes.c +13 -0
- data/plugins/fake_function_framework/vendor/fff/test/global_fakes.h +37 -0
- data/plugins/fake_function_framework/vendor/fff/test/test_cases.include +276 -0
- data/plugins/gcov/README.md +9 -0
- data/plugins/gcov/{template.erb → assets/template.erb} +1 -1
- data/plugins/gcov/{defaults.yml → config/defaults.yml} +10 -1
- data/plugins/gcov/gcov.rake +20 -8
- data/plugins/gcov/{gcov.rb → lib/gcov.rb} +13 -24
- data/plugins/module_generator/module_generator.rake +3 -3
- data/plugins/warnings_report/lib/warnings_report.rb +69 -0
- data/plugins/xml_tests_report/lib/xml_tests_report.rb +108 -0
- data/spec/spec_system_helper.rb +1 -1
- data/vendor/c_exception/lib/CException.h +1 -1
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +16 -16
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +61 -21
- data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +5 -1
- data/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/makefile +1 -1
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
- data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
- data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
- data/vendor/c_exception/vendor/unity/examples/unity_config.h +257 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +9 -8
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +1 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +28 -8
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +57 -17
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +3 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +2 -3
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
- data/vendor/c_exception/vendor/unity/release/version.info +1 -1
- data/vendor/c_exception/vendor/unity/src/unity.c +336 -191
- data/vendor/c_exception/vendor/unity/src/unity.h +73 -69
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -90
- data/vendor/c_exception/vendor/unity/test/Makefile +51 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -7
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +5 -5
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -7
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
- data/vendor/c_exception/vendor/unity/test/rakefile +5 -0
- data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +9 -7
- data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +3 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
- data/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
- data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
- data/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +1 -1
- data/vendor/c_exception/vendor/unity/test/tests/testunity.c +127 -5
- data/vendor/cmock/docs/CMock_Summary.md +1 -1
- data/vendor/cmock/lib/cmock_generator.rb +7 -2
- data/vendor/cmock/lib/cmock_header_parser.rb +29 -9
- data/vendor/cmock/scripts/create_mock.rb +1 -1
- data/vendor/cmock/test/system/test_compilation/const.h +15 -0
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +4 -4
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +136 -73
- data/vendor/cmock/vendor/c_exception/lib/CException.h +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +16 -16
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +61 -21
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +5 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +257 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +9 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +28 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +57 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +3 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +2 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/release/version.info +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +336 -191
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +73 -69
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -90
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +51 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +7 -7
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +7 -7
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +5 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +9 -7
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +3 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testunity.c +127 -5
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +16 -16
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +61 -21
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +5 -1
- data/vendor/cmock/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
- data/vendor/cmock/vendor/unity/examples/example_1/makefile +1 -1
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
- data/vendor/cmock/vendor/unity/examples/unity_config.h +257 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +3 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +5 -2
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +1 -2
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
- data/vendor/cmock/vendor/unity/src/unity.c +329 -186
- data/vendor/cmock/vendor/unity/src/unity.h +73 -69
- data/vendor/cmock/vendor/unity/src/unity_internals.h +119 -94
- data/vendor/cmock/vendor/unity/test/Makefile +4 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +7 -7
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +5 -5
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +7 -7
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
- data/vendor/cmock/vendor/unity/test/rakefile +5 -0
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +9 -7
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +3 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_msp430.yml +1 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
- data/vendor/cmock/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/cmock/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/cmock/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/cmock/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
- data/vendor/cmock/vendor/unity/test/tests/testparameterized.c +1 -1
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +104 -7
- data/vendor/deep_merge/README +94 -94
- data/vendor/deep_merge/Rakefile +28 -28
- data/vendor/deep_merge/lib/deep_merge.rb +211 -211
- data/vendor/deep_merge/test/test_deep_merge.rb +553 -553
- data/vendor/unity/auto/generate_module.rb +16 -16
- data/vendor/unity/auto/generate_test_runner.rb +61 -21
- data/vendor/unity/auto/stylize_as_junit.rb +5 -1
- data/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/unity/docs/UnityAssertionsReference.pdf +0 -0
- data/vendor/unity/docs/UnityConfigurationGuide.pdf +0 -0
- data/vendor/unity/docs/UnityGettingStartedGuide.pdf +0 -0
- data/vendor/unity/docs/UnityHelperScriptsGuide.pdf +0 -0
- data/vendor/unity/examples/example_1/makefile +1 -1
- data/vendor/unity/examples/example_1/src/ProductionCode.c +7 -7
- data/vendor/unity/examples/example_1/src/ProductionCode2.c +2 -2
- data/vendor/unity/examples/example_1/test/TestProductionCode.c +14 -14
- data/vendor/unity/examples/example_1/test/TestProductionCode2.c +2 -2
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +5 -5
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +5 -5
- data/vendor/unity/examples/unity_config.h +257 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.c +3 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +5 -2
- data/vendor/unity/extras/fixture/test/unity_output_Spy.c +1 -2
- data/vendor/unity/extras/fixture/test/unity_output_Spy.h +1 -1
- data/vendor/unity/src/unity.c +329 -186
- data/vendor/unity/src/unity.h +73 -69
- data/vendor/unity/src/unity_internals.h +119 -94
- data/vendor/unity/test/Makefile +4 -5
- data/vendor/unity/test/expectdata/testsample_cmd.c +5 -5
- data/vendor/unity/test/expectdata/testsample_def.c +5 -5
- data/vendor/unity/test/expectdata/testsample_head1.c +5 -5
- data/vendor/unity/test/expectdata/testsample_mock_cmd.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_def.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_head1.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_new1.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_new2.c +8 -8
- data/vendor/unity/test/expectdata/testsample_mock_param.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_run1.c +6 -6
- data/vendor/unity/test/expectdata/testsample_mock_run2.c +8 -8
- data/vendor/unity/test/expectdata/testsample_mock_yaml.c +7 -7
- data/vendor/unity/test/expectdata/testsample_new1.c +5 -5
- data/vendor/unity/test/expectdata/testsample_new2.c +7 -7
- data/vendor/unity/test/expectdata/testsample_param.c +5 -5
- data/vendor/unity/test/expectdata/testsample_run1.c +5 -5
- data/vendor/unity/test/expectdata/testsample_run2.c +7 -7
- data/vendor/unity/test/expectdata/testsample_yaml.c +6 -6
- data/vendor/unity/test/rakefile +5 -0
- data/vendor/unity/test/rakefile_helper.rb +9 -7
- data/vendor/unity/test/targets/clang_file.yml +1 -0
- data/vendor/unity/test/targets/clang_strict.yml +3 -0
- data/vendor/unity/test/targets/gcc_32.yml +1 -0
- data/vendor/unity/test/targets/gcc_64.yml +1 -0
- data/vendor/unity/test/targets/gcc_auto_limits.yml +1 -0
- data/vendor/unity/test/targets/gcc_auto_sizeof.yml +1 -0
- data/vendor/unity/test/targets/gcc_auto_stdint.yml +1 -0
- data/vendor/unity/test/targets/gcc_manual_math.yml +1 -0
- data/vendor/unity/test/targets/iar_arm_v4.yml +1 -0
- data/vendor/unity/test/targets/iar_arm_v5.yml +1 -0
- data/vendor/unity/test/targets/iar_arm_v5_3.yml +1 -0
- data/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +1 -0
- data/vendor/unity/test/targets/iar_cortexm3_v5.yml +1 -0
- data/vendor/unity/test/targets/iar_msp430.yml +1 -0
- data/vendor/unity/test/targets/iar_sh2a_v6.yml +1 -0
- data/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
- data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +65 -0
- data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
- data/vendor/unity/test/tests/test_generate_test_runner.rb +1221 -71
- data/vendor/unity/test/tests/testparameterized.c +1 -1
- data/vendor/unity/test/tests/testunity.c +104 -7
- metadata +124 -32
- data/plugins/gcov/readme.txt +0 -0
- data/plugins/warnings_report/warnings_report.rb +0 -71
- data/plugins/xml_tests_report/xml_tests_report.rb +0 -110
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -224
- data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +0 -51
- data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +0 -9
- data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +0 -68
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -224
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +0 -51
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/sample.yml +0 -9
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testsample.c +0 -68
- data/vendor/cmock/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/cmock/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/Unity Summary.txt +0 -224
- data/vendor/cmock/vendor/unity/test/testdata/mocksample.c +0 -51
- data/vendor/cmock/vendor/unity/test/testdata/sample.yml +0 -9
- data/vendor/cmock/vendor/unity/test/testdata/testsample.c +0 -68
- data/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/unity/docs/Unity Summary.txt +0 -224
- data/vendor/unity/test/testdata/mocksample.c +0 -51
- data/vendor/unity/test/testdata/sample.yml +0 -9
- data/vendor/unity/test/testdata/testsample.c +0 -68
data/vendor/unity/src/unity.h
CHANGED
|
@@ -18,50 +18,54 @@ extern "C"
|
|
|
18
18
|
void setUp(void);
|
|
19
19
|
void tearDown(void);
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
21
|
+
/*-------------------------------------------------------
|
|
22
|
+
* Configuration Options
|
|
23
|
+
*-------------------------------------------------------
|
|
24
|
+
* All options described below should be passed as a compiler flag to all files using Unity. If you must add #defines, place them BEFORE the #include above.
|
|
25
|
+
|
|
26
|
+
* Integers/longs/pointers
|
|
27
|
+
* - Unity attempts to automatically discover your integer sizes
|
|
28
|
+
* - define UNITY_EXCLUDE_STDINT_H to stop attempting to look in <stdint.h>
|
|
29
|
+
* - define UNITY_EXCLUDE_LIMITS_H to stop attempting to look in <limits.h>
|
|
30
|
+
* - define UNITY_EXCLUDE_SIZEOF to stop attempting to use sizeof in macros
|
|
31
|
+
* - If you cannot use the automatic methods above, you can force Unity by using these options:
|
|
32
|
+
* - define UNITY_SUPPORT_64
|
|
33
|
+
* - define UNITY_INT_WIDTH
|
|
34
|
+
* - UNITY_LONG_WIDTH
|
|
35
|
+
* - UNITY_POINTER_WIDTH
|
|
36
|
+
|
|
37
|
+
* Floats
|
|
38
|
+
* - define UNITY_EXCLUDE_FLOAT to disallow floating point comparisons
|
|
39
|
+
* - define UNITY_FLOAT_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_FLOAT
|
|
40
|
+
* - define UNITY_FLOAT_TYPE to specify doubles instead of single precision floats
|
|
41
|
+
* - define UNITY_FLOAT_VERBOSE to print floating point values in errors (uses sprintf)
|
|
42
|
+
* - define UNITY_INCLUDE_DOUBLE to allow double floating point comparisons
|
|
43
|
+
* - define UNITY_EXCLUDE_DOUBLE to disallow double floating point comparisons (default)
|
|
44
|
+
* - define UNITY_DOUBLE_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_DOUBLE
|
|
45
|
+
* - define UNITY_DOUBLE_TYPE to specify something other than double
|
|
46
|
+
* - define UNITY_DOUBLE_VERBOSE to print floating point values in errors (uses sprintf)
|
|
47
|
+
* - define UNITY_VERBOSE_NUMBER_MAX_LENGTH to change maximum length of printed numbers (used by sprintf)
|
|
48
|
+
|
|
49
|
+
* Output
|
|
50
|
+
* - by default, Unity prints to standard out with putchar. define UNITY_OUTPUT_CHAR(a) with a different function if desired
|
|
51
|
+
* - define UNITY_DIFFERENTIATE_FINAL_FAIL to print FAILED (vs. FAIL) at test end summary - for automated search for failure
|
|
52
|
+
|
|
53
|
+
* Optimization
|
|
54
|
+
* - by default, line numbers are stored in unsigned shorts. Define UNITY_LINE_TYPE with a different type if your files are huge
|
|
55
|
+
* - by default, test and failure counters are unsigned shorts. Define UNITY_COUNTER_TYPE with a different type if you want to save space or have more than 65535 Tests.
|
|
56
|
+
|
|
57
|
+
* Test Cases
|
|
58
|
+
* - define UNITY_SUPPORT_TEST_CASES to include the TEST_CASE macro, though really it's mostly about the runner generator script
|
|
59
|
+
|
|
60
|
+
* Parameterized Tests
|
|
61
|
+
* - you'll want to create a define of TEST_CASE(...) which basically evaluates to nothing
|
|
62
|
+
|
|
63
|
+
* Tests with Arguments
|
|
64
|
+
* - you'll want to define UNITY_USE_COMMAND_LINE_ARGS if you have the test runner passing arguments to Unity
|
|
65
|
+
|
|
66
|
+
*-------------------------------------------------------
|
|
67
|
+
* Basic Fail and Ignore
|
|
68
|
+
*-------------------------------------------------------*/
|
|
65
69
|
|
|
66
70
|
#define TEST_FAIL_MESSAGE(message) UNITY_TEST_FAIL(__LINE__, (message))
|
|
67
71
|
#define TEST_FAIL() UNITY_TEST_FAIL(__LINE__, NULL)
|
|
@@ -69,15 +73,15 @@ void tearDown(void);
|
|
|
69
73
|
#define TEST_IGNORE() UNITY_TEST_IGNORE(__LINE__, NULL)
|
|
70
74
|
#define TEST_ONLY()
|
|
71
75
|
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
/* It is not necessary for you to call PASS. A PASS condition is assumed if nothing fails.
|
|
77
|
+
* This method allows you to abort a test immediately with a PASS state, ignoring the remainder of the test. */
|
|
74
78
|
#define TEST_PASS() longjmp(Unity.AbortFrame, 1)
|
|
75
79
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
/*-------------------------------------------------------
|
|
81
|
+
* Test Asserts (simple)
|
|
82
|
+
*-------------------------------------------------------*/
|
|
79
83
|
|
|
80
|
-
|
|
84
|
+
/* Boolean */
|
|
81
85
|
#define TEST_ASSERT(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expression Evaluated To FALSE")
|
|
82
86
|
#define TEST_ASSERT_TRUE(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expected TRUE Was FALSE")
|
|
83
87
|
#define TEST_ASSERT_UNLESS(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expression Evaluated To TRUE")
|
|
@@ -85,7 +89,7 @@ void tearDown(void);
|
|
|
85
89
|
#define TEST_ASSERT_NULL(pointer) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, " Expected NULL")
|
|
86
90
|
#define TEST_ASSERT_NOT_NULL(pointer) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, " Expected Non-NULL")
|
|
87
91
|
|
|
88
|
-
|
|
92
|
+
/* Integers (of all sizes) */
|
|
89
93
|
#define TEST_ASSERT_EQUAL_INT(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
|
|
90
94
|
#define TEST_ASSERT_EQUAL_INT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, NULL)
|
|
91
95
|
#define TEST_ASSERT_EQUAL_INT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, NULL)
|
|
@@ -109,7 +113,7 @@ void tearDown(void);
|
|
|
109
113
|
#define TEST_ASSERT_BIT_HIGH(bit, actual) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(-1), (actual), __LINE__, NULL)
|
|
110
114
|
#define TEST_ASSERT_BIT_LOW(bit, actual) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(0), (actual), __LINE__, NULL)
|
|
111
115
|
|
|
112
|
-
|
|
116
|
+
/* Integer Ranges (of all sizes) */
|
|
113
117
|
#define TEST_ASSERT_INT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
|
114
118
|
#define TEST_ASSERT_INT8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
|
115
119
|
#define TEST_ASSERT_INT16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
|
@@ -126,13 +130,13 @@ void tearDown(void);
|
|
|
126
130
|
#define TEST_ASSERT_HEX32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
|
127
131
|
#define TEST_ASSERT_HEX64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
|
128
132
|
|
|
129
|
-
|
|
133
|
+
/* Structs and Strings */
|
|
130
134
|
#define TEST_ASSERT_EQUAL_PTR(expected, actual) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, NULL)
|
|
131
135
|
#define TEST_ASSERT_EQUAL_STRING(expected, actual) UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, NULL)
|
|
132
136
|
#define TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, NULL)
|
|
133
137
|
#define TEST_ASSERT_EQUAL_MEMORY(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, NULL)
|
|
134
138
|
|
|
135
|
-
|
|
139
|
+
/* Arrays */
|
|
136
140
|
#define TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
|
137
141
|
#define TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
|
138
142
|
#define TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
|
@@ -152,7 +156,7 @@ void tearDown(void);
|
|
|
152
156
|
#define TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
|
153
157
|
#define TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), (num_elements), __LINE__, NULL)
|
|
154
158
|
|
|
155
|
-
|
|
159
|
+
/* Floating Point (If Enabled) */
|
|
156
160
|
#define TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
|
157
161
|
#define TEST_ASSERT_EQUAL_FLOAT(expected, actual) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, NULL)
|
|
158
162
|
#define TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
|
@@ -165,7 +169,7 @@ void tearDown(void);
|
|
|
165
169
|
#define TEST_ASSERT_FLOAT_IS_NOT_NAN(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, NULL)
|
|
166
170
|
#define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, NULL)
|
|
167
171
|
|
|
168
|
-
|
|
172
|
+
/* Double (If Enabled) */
|
|
169
173
|
#define TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, NULL)
|
|
170
174
|
#define TEST_ASSERT_EQUAL_DOUBLE(expected, actual) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, NULL)
|
|
171
175
|
#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
|
|
@@ -178,11 +182,11 @@ void tearDown(void);
|
|
|
178
182
|
#define TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, NULL)
|
|
179
183
|
#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, NULL)
|
|
180
184
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
185
|
+
/*-------------------------------------------------------
|
|
186
|
+
* Test Asserts (with additional messages)
|
|
187
|
+
*-------------------------------------------------------*/
|
|
184
188
|
|
|
185
|
-
|
|
189
|
+
/* Boolean */
|
|
186
190
|
#define TEST_ASSERT_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, (message))
|
|
187
191
|
#define TEST_ASSERT_TRUE_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, (message))
|
|
188
192
|
#define TEST_ASSERT_UNLESS_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, (message))
|
|
@@ -190,7 +194,7 @@ void tearDown(void);
|
|
|
190
194
|
#define TEST_ASSERT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, (message))
|
|
191
195
|
#define TEST_ASSERT_NOT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, (message))
|
|
192
196
|
|
|
193
|
-
|
|
197
|
+
/* Integers (of all sizes) */
|
|
194
198
|
#define TEST_ASSERT_EQUAL_INT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, (message))
|
|
195
199
|
#define TEST_ASSERT_EQUAL_INT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, (message))
|
|
196
200
|
#define TEST_ASSERT_EQUAL_INT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, (message))
|
|
@@ -214,7 +218,7 @@ void tearDown(void);
|
|
|
214
218
|
#define TEST_ASSERT_BIT_HIGH_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(-1), (actual), __LINE__, (message))
|
|
215
219
|
#define TEST_ASSERT_BIT_LOW_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(0), (actual), __LINE__, (message))
|
|
216
220
|
|
|
217
|
-
|
|
221
|
+
/* Integer Ranges (of all sizes) */
|
|
218
222
|
#define TEST_ASSERT_INT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
|
219
223
|
#define TEST_ASSERT_INT8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
|
220
224
|
#define TEST_ASSERT_INT16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
|
@@ -231,13 +235,13 @@ void tearDown(void);
|
|
|
231
235
|
#define TEST_ASSERT_HEX32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
|
232
236
|
#define TEST_ASSERT_HEX64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
|
233
237
|
|
|
234
|
-
|
|
238
|
+
/* Structs and Strings */
|
|
235
239
|
#define TEST_ASSERT_EQUAL_PTR_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, (message))
|
|
236
240
|
#define TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, (message))
|
|
237
|
-
#define TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message)
|
|
238
|
-
#define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message)
|
|
241
|
+
#define TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, (message))
|
|
242
|
+
#define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, (message))
|
|
239
243
|
|
|
240
|
-
|
|
244
|
+
/* Arrays */
|
|
241
245
|
#define TEST_ASSERT_EQUAL_INT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
|
242
246
|
#define TEST_ASSERT_EQUAL_INT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
|
243
247
|
#define TEST_ASSERT_EQUAL_INT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
|
@@ -257,7 +261,7 @@ void tearDown(void);
|
|
|
257
261
|
#define TEST_ASSERT_EQUAL_STRING_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
|
258
262
|
#define TEST_ASSERT_EQUAL_MEMORY_ARRAY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), (num_elements), __LINE__, (message))
|
|
259
263
|
|
|
260
|
-
|
|
264
|
+
/* Floating Point (If Enabled) */
|
|
261
265
|
#define TEST_ASSERT_FLOAT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
|
262
266
|
#define TEST_ASSERT_EQUAL_FLOAT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, (message))
|
|
263
267
|
#define TEST_ASSERT_EQUAL_FLOAT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
|
@@ -270,7 +274,7 @@ void tearDown(void);
|
|
|
270
274
|
#define TEST_ASSERT_FLOAT_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, (message))
|
|
271
275
|
#define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, (message))
|
|
272
276
|
|
|
273
|
-
|
|
277
|
+
/* Double (If Enabled) */
|
|
274
278
|
#define TEST_ASSERT_DOUBLE_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, (message))
|
|
275
279
|
#define TEST_ASSERT_EQUAL_DOUBLE_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, (message))
|
|
276
280
|
#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
|
|
@@ -283,7 +287,7 @@ void tearDown(void);
|
|
|
283
287
|
#define TEST_ASSERT_DOUBLE_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, (message))
|
|
284
288
|
#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, (message))
|
|
285
289
|
|
|
286
|
-
|
|
290
|
+
/* end of UNITY_FRAMEWORK_H */
|
|
287
291
|
#ifdef __cplusplus
|
|
288
292
|
}
|
|
289
293
|
#endif
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
|
|
14
14
|
#include <setjmp.h>
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
/* Unity Attempts to Auto-Detect Integer Types
|
|
17
|
+
* Attempt 1: UINT_MAX, ULONG_MAX, etc in <stdint.h>
|
|
18
|
+
* Attempt 2: UINT_MAX, ULONG_MAX, etc in <limits.h>
|
|
19
|
+
* Attempt 3: Deduced from sizeof() macros */
|
|
20
20
|
#ifndef UNITY_EXCLUDE_STDINT_H
|
|
21
21
|
#include <stdint.h>
|
|
22
22
|
#endif
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
#define ULONG_MAX (sizeof(unsigned long) * 256 - 1)
|
|
34
34
|
#endif
|
|
35
35
|
#ifndef UINTPTR_MAX
|
|
36
|
-
|
|
36
|
+
/* apparently this is not a constant expression: (sizeof(unsigned int *) * 256 - 1) so we have to just let this fall through */
|
|
37
37
|
#endif
|
|
38
38
|
#endif
|
|
39
39
|
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
#include <math.h>
|
|
42
42
|
#endif
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
/*-------------------------------------------------------
|
|
45
|
+
* Guess Widths If Not Specified
|
|
46
|
+
*-------------------------------------------------------*/
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
/* Determine the size of an int, if not already specificied.
|
|
49
|
+
* We cannot use sizeof(int), because it is not yet defined
|
|
50
|
+
* at this stage in the trnslation of the C program.
|
|
51
|
+
* Therefore, infer it from UINT_MAX if possible. */
|
|
52
52
|
#ifndef UNITY_INT_WIDTH
|
|
53
53
|
#ifdef UINT_MAX
|
|
54
54
|
#if (UINT_MAX == 0xFFFF)
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
#define UNITY_INT_WIDTH (32)
|
|
65
65
|
#endif
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
/* Determine the size of a long, if not already specified,
|
|
68
|
+
* by following the process used above to define
|
|
69
|
+
* UNITY_INT_WIDTH. */
|
|
70
70
|
#ifndef UNITY_LONG_WIDTH
|
|
71
71
|
#ifdef ULONG_MAX
|
|
72
72
|
#if (ULONG_MAX == 0xFFFF)
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
#define UNITY_LONG_WIDTH (32)
|
|
83
83
|
#endif
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
/* Determine the size of a pointer, if not already specified,
|
|
86
|
+
* by following the process used above to define
|
|
87
|
+
* UNITY_INT_WIDTH. */
|
|
88
88
|
#ifndef UNITY_POINTER_WIDTH
|
|
89
89
|
#ifdef UINTPTR_MAX
|
|
90
90
|
#if (UINTPTR_MAX+0 <= 0xFFFF)
|
|
@@ -111,9 +111,9 @@
|
|
|
111
111
|
#define UNITY_POINTER_WIDTH UNITY_LONG_WIDTH
|
|
112
112
|
#endif
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
/*-------------------------------------------------------
|
|
115
|
+
* Int Support (Define types based on detected sizes)
|
|
116
|
+
*-------------------------------------------------------*/
|
|
117
117
|
|
|
118
118
|
#if (UNITY_INT_WIDTH == 32)
|
|
119
119
|
typedef unsigned char _UU8;
|
|
@@ -133,9 +133,9 @@
|
|
|
133
133
|
#error Invalid UNITY_INT_WIDTH specified! (16 or 32 are supported)
|
|
134
134
|
#endif
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
/*-------------------------------------------------------
|
|
137
|
+
* 64-bit Support
|
|
138
|
+
*-------------------------------------------------------*/
|
|
139
139
|
|
|
140
140
|
#ifndef UNITY_SUPPORT_64
|
|
141
141
|
#if UNITY_LONG_WIDTH > 32
|
|
@@ -150,13 +150,13 @@
|
|
|
150
150
|
|
|
151
151
|
#ifndef UNITY_SUPPORT_64
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
/* No 64-bit Support */
|
|
154
154
|
typedef _UU32 _U_UINT;
|
|
155
155
|
typedef _US32 _U_SINT;
|
|
156
156
|
|
|
157
157
|
#else
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
/* 64-bit Support */
|
|
160
160
|
#if (UNITY_LONG_WIDTH == 32)
|
|
161
161
|
typedef unsigned long long _UU64;
|
|
162
162
|
typedef signed long long _US64;
|
|
@@ -171,9 +171,9 @@ typedef _US64 _U_SINT;
|
|
|
171
171
|
|
|
172
172
|
#endif
|
|
173
173
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
/*-------------------------------------------------------
|
|
175
|
+
* Pointer Support
|
|
176
|
+
*-------------------------------------------------------*/
|
|
177
177
|
|
|
178
178
|
#if (UNITY_POINTER_WIDTH == 32)
|
|
179
179
|
typedef _UU32 _UP;
|
|
@@ -194,16 +194,16 @@ typedef _US64 _U_SINT;
|
|
|
194
194
|
|
|
195
195
|
#ifndef UNITY_INTERNAL_PTR
|
|
196
196
|
#define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const void*
|
|
197
|
-
|
|
197
|
+
/* #define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const _UU8* */
|
|
198
198
|
#endif
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
/*-------------------------------------------------------
|
|
201
|
+
* Float Support
|
|
202
|
+
*-------------------------------------------------------*/
|
|
203
203
|
|
|
204
204
|
#ifdef UNITY_EXCLUDE_FLOAT
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
/* No Floating Point Support */
|
|
207
207
|
#undef UNITY_INCLUDE_FLOAT
|
|
208
208
|
#undef UNITY_FLOAT_PRECISION
|
|
209
209
|
#undef UNITY_FLOAT_TYPE
|
|
@@ -215,7 +215,7 @@ typedef _US64 _U_SINT;
|
|
|
215
215
|
#define UNITY_INCLUDE_FLOAT
|
|
216
216
|
#endif
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
/* Floating Point Support */
|
|
219
219
|
#ifndef UNITY_FLOAT_PRECISION
|
|
220
220
|
#define UNITY_FLOAT_PRECISION (0.00001f)
|
|
221
221
|
#endif
|
|
@@ -243,11 +243,11 @@ typedef UNITY_FLOAT_TYPE _UF;
|
|
|
243
243
|
|
|
244
244
|
#endif
|
|
245
245
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
246
|
+
/*-------------------------------------------------------
|
|
247
|
+
* Double Float Support
|
|
248
|
+
*-------------------------------------------------------*/
|
|
249
249
|
|
|
250
|
-
|
|
250
|
+
/* unlike FLOAT, we DON'T include by default */
|
|
251
251
|
#ifndef UNITY_EXCLUDE_DOUBLE
|
|
252
252
|
#ifndef UNITY_INCLUDE_DOUBLE
|
|
253
253
|
#define UNITY_EXCLUDE_DOUBLE
|
|
@@ -256,7 +256,7 @@ typedef UNITY_FLOAT_TYPE _UF;
|
|
|
256
256
|
|
|
257
257
|
#ifdef UNITY_EXCLUDE_DOUBLE
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
/* No Floating Point Support */
|
|
260
260
|
#undef UNITY_DOUBLE_PRECISION
|
|
261
261
|
#undef UNITY_DOUBLE_TYPE
|
|
262
262
|
#undef UNITY_DOUBLE_VERBOSE
|
|
@@ -267,7 +267,7 @@ typedef UNITY_FLOAT_TYPE _UF;
|
|
|
267
267
|
|
|
268
268
|
#else
|
|
269
269
|
|
|
270
|
-
|
|
270
|
+
/* Double Floating Point Support */
|
|
271
271
|
#ifndef UNITY_DOUBLE_PRECISION
|
|
272
272
|
#define UNITY_DOUBLE_PRECISION (1e-12f)
|
|
273
273
|
#endif
|
|
@@ -284,19 +284,35 @@ typedef UNITY_DOUBLE_TYPE _UD;
|
|
|
284
284
|
#endif
|
|
285
285
|
#endif
|
|
286
286
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
/*-------------------------------------------------------
|
|
288
|
+
* Output Method: stdout (DEFAULT)
|
|
289
|
+
*-------------------------------------------------------*/
|
|
290
290
|
#ifndef UNITY_OUTPUT_CHAR
|
|
291
|
-
|
|
291
|
+
/* Default to using putchar, which is defined in stdio.h */
|
|
292
292
|
#include <stdio.h>
|
|
293
|
-
#define UNITY_OUTPUT_CHAR(a) putchar(a)
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
#
|
|
293
|
+
#define UNITY_OUTPUT_CHAR(a) (void)putchar(a)
|
|
294
|
+
#else
|
|
295
|
+
/* If defined as something else, make sure we declare it here so it's ready for use */
|
|
296
|
+
#ifndef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
|
|
297
|
+
extern void UNITY_OUTPUT_CHAR(int);
|
|
298
|
+
#endif
|
|
299
|
+
#endif
|
|
300
|
+
|
|
301
|
+
#ifndef UNITY_OUTPUT_FLUSH
|
|
302
|
+
/* Default to using fflush, which is defined in stdio.h */
|
|
303
|
+
#include <stdio.h>
|
|
304
|
+
#define UNITY_OUTPUT_FLUSH (void)fflush(stdout)
|
|
305
|
+
#else
|
|
306
|
+
/* If defined as something else, make sure we declare it here so it's ready for use */
|
|
307
|
+
#ifndef UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION
|
|
308
|
+
extern void UNITY_OUTPUT_FLUSH(void);
|
|
309
|
+
#endif
|
|
310
|
+
#endif
|
|
311
|
+
|
|
312
|
+
#ifndef UNITY_OUTPUT_FLUSH
|
|
313
|
+
#define UNITY_FLUSH_CALL()
|
|
314
|
+
#else
|
|
315
|
+
#define UNITY_FLUSH_CALL() UNITY_OUTPUT_FLUSH
|
|
300
316
|
#endif
|
|
301
317
|
|
|
302
318
|
#ifndef UNITY_PRINT_EOL
|
|
@@ -311,9 +327,9 @@ typedef UNITY_DOUBLE_TYPE _UD;
|
|
|
311
327
|
#define UNITY_OUTPUT_COMPLETE()
|
|
312
328
|
#endif
|
|
313
329
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
330
|
+
/*-------------------------------------------------------
|
|
331
|
+
* Footprint
|
|
332
|
+
*-------------------------------------------------------*/
|
|
317
333
|
|
|
318
334
|
#ifndef UNITY_LINE_TYPE
|
|
319
335
|
#define UNITY_LINE_TYPE _U_UINT
|
|
@@ -323,12 +339,12 @@ typedef UNITY_DOUBLE_TYPE _UD;
|
|
|
323
339
|
#define UNITY_COUNTER_TYPE _U_UINT
|
|
324
340
|
#endif
|
|
325
341
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
342
|
+
/*-------------------------------------------------------
|
|
343
|
+
* Language Features Available
|
|
344
|
+
*-------------------------------------------------------*/
|
|
329
345
|
#if !defined(UNITY_WEAK_ATTRIBUTE) && !defined(UNITY_WEAK_PRAGMA)
|
|
330
|
-
# ifdef __GNUC__
|
|
331
|
-
# if !(defined(__WIN32__) && defined(__clang__))
|
|
346
|
+
# ifdef __GNUC__ /* includes clang */
|
|
347
|
+
# if !(defined(__WIN32__) && defined(__clang__)) && !defined(__TMS470__)
|
|
332
348
|
# define UNITY_WEAK_ATTRIBUTE __attribute__((weak))
|
|
333
349
|
# endif
|
|
334
350
|
# endif
|
|
@@ -340,9 +356,9 @@ typedef UNITY_DOUBLE_TYPE _UD;
|
|
|
340
356
|
#endif
|
|
341
357
|
|
|
342
358
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
359
|
+
/*-------------------------------------------------------
|
|
360
|
+
* Internal Structs Needed
|
|
361
|
+
*-------------------------------------------------------*/
|
|
346
362
|
|
|
347
363
|
typedef void (*UnityTestFunction)(void);
|
|
348
364
|
|
|
@@ -423,18 +439,18 @@ struct _Unity
|
|
|
423
439
|
|
|
424
440
|
extern struct _Unity Unity;
|
|
425
441
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
442
|
+
/*-------------------------------------------------------
|
|
443
|
+
* Test Suite Management
|
|
444
|
+
*-------------------------------------------------------*/
|
|
429
445
|
|
|
430
446
|
void UnityBegin(const char* filename);
|
|
431
447
|
int UnityEnd(void);
|
|
432
448
|
void UnityConcludeTest(void);
|
|
433
449
|
void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum);
|
|
434
450
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
451
|
+
/*-------------------------------------------------------
|
|
452
|
+
* Details Support
|
|
453
|
+
*-------------------------------------------------------*/
|
|
438
454
|
|
|
439
455
|
#ifdef UNITY_EXCLUDE_DETAILS
|
|
440
456
|
#define UNITY_CLR_DETAILS()
|
|
@@ -454,9 +470,9 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
|
|
|
454
470
|
#endif
|
|
455
471
|
#endif
|
|
456
472
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
473
|
+
/*-------------------------------------------------------
|
|
474
|
+
* Test Output
|
|
475
|
+
*-------------------------------------------------------*/
|
|
460
476
|
|
|
461
477
|
void UnityPrint(const char* string);
|
|
462
478
|
void UnityPrintMask(const _U_UINT mask, const _U_UINT number);
|
|
@@ -469,13 +485,13 @@ void UnityPrintNumberHex(const _U_UINT number, const char nibbles);
|
|
|
469
485
|
void UnityPrintFloat(const _UF number);
|
|
470
486
|
#endif
|
|
471
487
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
488
|
+
/*-------------------------------------------------------
|
|
489
|
+
* Test Assertion Fuctions
|
|
490
|
+
*-------------------------------------------------------
|
|
491
|
+
* Use the macros below this section instead of calling
|
|
492
|
+
* these directly. The macros have a consistent naming
|
|
493
|
+
* convention and will pull in file and line information
|
|
494
|
+
* for you. */
|
|
479
495
|
|
|
480
496
|
void UnityAssertEqualNumber(const _U_SINT expected,
|
|
481
497
|
const _U_SINT actual,
|
|
@@ -569,23 +585,23 @@ void UnityAssertDoubleSpecial(const _UD actual,
|
|
|
569
585
|
const UNITY_FLOAT_TRAIT_T style);
|
|
570
586
|
#endif
|
|
571
587
|
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
588
|
+
/*-------------------------------------------------------
|
|
589
|
+
* Error Strings We Might Need
|
|
590
|
+
*-------------------------------------------------------*/
|
|
575
591
|
|
|
576
592
|
extern const char UnityStrErrFloat[];
|
|
577
593
|
extern const char UnityStrErrDouble[];
|
|
578
594
|
extern const char UnityStrErr64[];
|
|
579
595
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
596
|
+
/*-------------------------------------------------------
|
|
597
|
+
* Test Running Macros
|
|
598
|
+
*-------------------------------------------------------*/
|
|
583
599
|
|
|
584
600
|
#define TEST_PROTECT() (setjmp(Unity.AbortFrame) == 0)
|
|
585
601
|
|
|
586
602
|
#define TEST_ABORT() {longjmp(Unity.AbortFrame, 1);}
|
|
587
603
|
|
|
588
|
-
|
|
604
|
+
/* This tricky series of macros gives us an optional line argument to treat it as RUN_TEST(func, num=__LINE__) */
|
|
589
605
|
#ifndef RUN_TEST
|
|
590
606
|
#ifdef __STDC_VERSION__
|
|
591
607
|
#if __STDC_VERSION__ >= 199901L
|
|
@@ -598,7 +614,7 @@ extern const char UnityStrErr64[];
|
|
|
598
614
|
#endif
|
|
599
615
|
#endif
|
|
600
616
|
|
|
601
|
-
|
|
617
|
+
/* If we can't do the tricky version, we'll just have to require them to always include the line number */
|
|
602
618
|
#ifndef RUN_TEST
|
|
603
619
|
#ifdef CMOCK
|
|
604
620
|
#define RUN_TEST(func, num) UnityDefaultTestRun(func, #func, num)
|
|
@@ -624,16 +640,25 @@ extern const char UnityStrErr64[];
|
|
|
624
640
|
|
|
625
641
|
#define UNITY_UNUSED(x) (void)(sizeof(x))
|
|
626
642
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
643
|
+
/*-----------------------------------------------
|
|
644
|
+
* Command Line Argument Support
|
|
645
|
+
*-----------------------------------------------*/
|
|
646
|
+
|
|
647
|
+
#ifdef UNITY_USE_COMMAND_LINE_ARGS
|
|
648
|
+
int UnityParseOptions(int argc, char** argv);
|
|
649
|
+
int UnityTestMatches(void);
|
|
650
|
+
#endif
|
|
651
|
+
|
|
652
|
+
/*-------------------------------------------------------
|
|
653
|
+
* Basic Fail and Ignore
|
|
654
|
+
*-------------------------------------------------------*/
|
|
630
655
|
|
|
631
656
|
#define UNITY_TEST_FAIL(line, message) UnityFail( (message), (UNITY_LINE_TYPE)(line))
|
|
632
657
|
#define UNITY_TEST_IGNORE(line, message) UnityIgnore( (message), (UNITY_LINE_TYPE)(line))
|
|
633
658
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
659
|
+
/*-------------------------------------------------------
|
|
660
|
+
* Test Asserts
|
|
661
|
+
*-------------------------------------------------------*/
|
|
637
662
|
|
|
638
663
|
#define UNITY_TEST_ASSERT(condition, line, message) if (condition) {} else {UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), (message));}
|
|
639
664
|
#define UNITY_TEST_ASSERT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) == NULL), (UNITY_LINE_TYPE)(line), (message))
|
|
@@ -758,5 +783,5 @@ extern const char UnityStrErr64[];
|
|
|
758
783
|
#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET)
|
|
759
784
|
#endif
|
|
760
785
|
|
|
761
|
-
|
|
786
|
+
/* End of UNITY_INTERNALS_H */
|
|
762
787
|
#endif
|