ceedling 0.20.3 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -5,7 +5,7 @@ char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction)
|
|
5
5
|
{
|
6
6
|
(void)Poor;
|
7
7
|
(void)LittleFunction;
|
8
|
-
|
9
|
-
|
8
|
+
/* Since There Are No Tests Yet, This Function Could Be Empty For All We Know.
|
9
|
+
* Which isn't terribly useful... but at least we put in a TEST_IGNORE so we won't forget */
|
10
10
|
return (char*)0;
|
11
11
|
}
|
data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
#include "ProductionCode.h"
|
3
3
|
#include "unity.h"
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
/* sometimes you may want to get at local data in a module.
|
6
|
+
* for example: If you plan to pass by reference, this could be useful
|
7
|
+
* however, it should often be avoided */
|
8
8
|
extern int Counter;
|
9
9
|
|
10
10
|
void setUp(void)
|
11
11
|
{
|
12
|
-
|
12
|
+
/* This is run before EACH TEST */
|
13
13
|
Counter = 0x5a5a;
|
14
14
|
}
|
15
15
|
|
@@ -19,7 +19,7 @@ void tearDown(void)
|
|
19
19
|
|
20
20
|
void test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWorksEvenInOurBrokenCode(void)
|
21
21
|
{
|
22
|
-
|
22
|
+
/* All of these should pass */
|
23
23
|
TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(78));
|
24
24
|
TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(1));
|
25
25
|
TEST_ASSERT_EQUAL(0, FindFunction_WhichIsBroken(33));
|
@@ -29,34 +29,34 @@ void test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWork
|
|
29
29
|
|
30
30
|
void test_FindFunction_WhichIsBroken_ShouldReturnTheIndexForItemsInList_WhichWillFailBecauseOurFunctionUnderTestIsBroken(void)
|
31
31
|
{
|
32
|
-
|
32
|
+
/* You should see this line fail in your test summary */
|
33
33
|
TEST_ASSERT_EQUAL(1, FindFunction_WhichIsBroken(34));
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
/* Notice the rest of these didn't get a chance to run because the line above failed.
|
36
|
+
* Unit tests abort each test function on the first sign of trouble.
|
37
|
+
* Then NEXT test function runs as normal. */
|
38
38
|
TEST_ASSERT_EQUAL(8, FindFunction_WhichIsBroken(8888));
|
39
39
|
}
|
40
40
|
|
41
41
|
void test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValue(void)
|
42
42
|
{
|
43
|
-
|
43
|
+
/* This should be true because setUp set this up for us before this test */
|
44
44
|
TEST_ASSERT_EQUAL_HEX(0x5a5a, FunctionWhichReturnsLocalVariable());
|
45
45
|
|
46
|
-
|
46
|
+
/* This should be true because we can still change our answer */
|
47
47
|
Counter = 0x1234;
|
48
48
|
TEST_ASSERT_EQUAL_HEX(0x1234, FunctionWhichReturnsLocalVariable());
|
49
49
|
}
|
50
50
|
|
51
51
|
void test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValueAgain(void)
|
52
52
|
{
|
53
|
-
|
53
|
+
/* This should be true again because setup was rerun before this test (and after we changed it to 0x1234) */
|
54
54
|
TEST_ASSERT_EQUAL_HEX(0x5a5a, FunctionWhichReturnsLocalVariable());
|
55
55
|
}
|
56
56
|
|
57
57
|
void test_FunctionWhichReturnsLocalVariable_ShouldReturnCurrentCounter_ButFailsBecauseThisTestIsActuallyFlawed(void)
|
58
58
|
{
|
59
|
-
|
60
|
-
|
59
|
+
/* Sometimes you get the test wrong. When that happens, you get a failure too... and a quick look should tell
|
60
|
+
* you what actually happened...which in this case was a failure to setup the initial condition. */
|
61
61
|
TEST_ASSERT_EQUAL_HEX(0x1234, FunctionWhichReturnsLocalVariable());
|
62
62
|
}
|
data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
/* These should be ignored because they are commented out in various ways:
|
6
6
|
#include "whatever.h"
|
7
|
+
#include "somethingelse.h"
|
7
8
|
*/
|
8
|
-
//#include "somethingelse.h"
|
9
9
|
|
10
10
|
void setUp(void)
|
11
11
|
{
|
@@ -27,5 +27,5 @@ void test_AnotherIgnoredTest(void)
|
|
27
27
|
|
28
28
|
void test_ThisFunctionHasNotBeenTested_NeedsToBeImplemented(void)
|
29
29
|
{
|
30
|
-
TEST_IGNORE();
|
30
|
+
TEST_IGNORE(); /* Like This */
|
31
31
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* AUTOGENERATED FILE. DO NOT EDIT. */
|
2
2
|
|
3
|
-
|
3
|
+
/*=======Test Runner Used To Run Each Test Below=====*/
|
4
4
|
#define RUN_TEST(TestFunc, TestLineNum) \
|
5
5
|
{ \
|
6
6
|
Unity.CurrentTestName = #TestFunc; \
|
@@ -18,13 +18,13 @@
|
|
18
18
|
UnityConcludeTest(); \
|
19
19
|
}
|
20
20
|
|
21
|
-
|
21
|
+
/*=======Automagically Detected Files To Include=====*/
|
22
22
|
#include "unity.h"
|
23
23
|
#include <setjmp.h>
|
24
24
|
#include <stdio.h>
|
25
25
|
#include "ProductionCode2.h"
|
26
26
|
|
27
|
-
|
27
|
+
/*=======External Functions This Runner Calls=====*/
|
28
28
|
extern void setUp(void);
|
29
29
|
extern void tearDown(void);
|
30
30
|
extern void test_IgnoredTest(void);
|
@@ -32,7 +32,7 @@ extern void test_AnotherIgnoredTest(void);
|
|
32
32
|
extern void test_ThisFunctionHasNotBeenTested_NeedsToBeImplemented(void);
|
33
33
|
|
34
34
|
|
35
|
-
|
35
|
+
/*=======Test Reset Option=====*/
|
36
36
|
void resetTest(void);
|
37
37
|
void resetTest(void)
|
38
38
|
{
|
@@ -41,7 +41,7 @@ void resetTest(void)
|
|
41
41
|
}
|
42
42
|
|
43
43
|
|
44
|
-
|
44
|
+
/*=======MAIN=====*/
|
45
45
|
int main(void)
|
46
46
|
{
|
47
47
|
UnityBegin("test/TestProductionCode2.c");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* AUTOGENERATED FILE. DO NOT EDIT. */
|
2
2
|
|
3
|
-
|
3
|
+
/*=======Test Runner Used To Run Each Test Below=====*/
|
4
4
|
#define RUN_TEST(TestFunc, TestLineNum) \
|
5
5
|
{ \
|
6
6
|
Unity.CurrentTestName = #TestFunc; \
|
@@ -18,13 +18,13 @@
|
|
18
18
|
UnityConcludeTest(); \
|
19
19
|
}
|
20
20
|
|
21
|
-
|
21
|
+
/*=======Automagically Detected Files To Include=====*/
|
22
22
|
#include "unity.h"
|
23
23
|
#include <setjmp.h>
|
24
24
|
#include <stdio.h>
|
25
25
|
#include "ProductionCode.h"
|
26
26
|
|
27
|
-
|
27
|
+
/*=======External Functions This Runner Calls=====*/
|
28
28
|
extern void setUp(void);
|
29
29
|
extern void tearDown(void);
|
30
30
|
extern void test_FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWorksEvenInOurBrokenCode(void);
|
@@ -34,7 +34,7 @@ extern void test_FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounter
|
|
34
34
|
extern void test_FunctionWhichReturnsLocalVariable_ShouldReturnCurrentCounter_ButFailsBecauseThisTestIsActuallyFlawed(void);
|
35
35
|
|
36
36
|
|
37
|
-
|
37
|
+
/*=======Test Reset Option=====*/
|
38
38
|
void resetTest(void);
|
39
39
|
void resetTest(void)
|
40
40
|
{
|
@@ -43,7 +43,7 @@ void resetTest(void)
|
|
43
43
|
}
|
44
44
|
|
45
45
|
|
46
|
-
|
46
|
+
/*=======MAIN=====*/
|
47
47
|
int main(void)
|
48
48
|
{
|
49
49
|
UnityBegin("test/TestProductionCode.c");
|
@@ -0,0 +1,257 @@
|
|
1
|
+
/* Unity Configuration
|
2
|
+
* As of May 11th, 2016 at ThrowTheSwitch/Unity commit 837c529
|
3
|
+
* See Also: Unity/docs/UnityConfigurationGuide.pdf
|
4
|
+
*
|
5
|
+
* Unity is designed to run on almost anything that is targeted by a C compiler.
|
6
|
+
* It would be awesome if this could be done with zero configuration. While
|
7
|
+
* there are some targets that come close to this dream, it is sadly not
|
8
|
+
* universal. It is likely that you are going to need at least a couple of the
|
9
|
+
* configuration options described in this document.
|
10
|
+
*
|
11
|
+
* All of Unity's configuration options are `#defines`. Most of these are simple
|
12
|
+
* definitions. A couple are macros with arguments. They live inside the
|
13
|
+
* unity_internals.h header file. We don't necessarily recommend opening that
|
14
|
+
* file unless you really need to. That file is proof that a cross-platform
|
15
|
+
* library is challenging to build. From a more positive perspective, it is also
|
16
|
+
* proof that a great deal of complexity can be centralized primarily to one
|
17
|
+
* place in order to provide a more consistent and simple experience elsewhere.
|
18
|
+
*
|
19
|
+
* Using These Options
|
20
|
+
* It doesn't matter if you're using a target-specific compiler and a simulator
|
21
|
+
* or a native compiler. In either case, you've got a couple choices for
|
22
|
+
* configuring these options:
|
23
|
+
*
|
24
|
+
* 1. Because these options are specified via C defines, you can pass most of
|
25
|
+
* these options to your compiler through command line compiler flags. Even
|
26
|
+
* if you're using an embedded target that forces you to use their
|
27
|
+
* overbearing IDE for all configuration, there will be a place somewhere in
|
28
|
+
* your project to configure defines for your compiler.
|
29
|
+
* 2. You can create a custom `unity_config.h` configuration file (present in
|
30
|
+
* your toolchain's search paths). In this file, you will list definitions
|
31
|
+
* and macros specific to your target. All you must do is define
|
32
|
+
* `UNITY_INCLUDE_CONFIG_H` and Unity will rely on `unity_config.h` for any
|
33
|
+
* further definitions it may need.
|
34
|
+
*/
|
35
|
+
|
36
|
+
#ifndef UNITY_CONFIG_H
|
37
|
+
#define UNITY_CONFIG_H
|
38
|
+
|
39
|
+
#ifdef __cplusplus
|
40
|
+
extern "C"
|
41
|
+
{
|
42
|
+
#endif
|
43
|
+
|
44
|
+
/* ************************* AUTOMATIC INTEGER TYPES ***************************
|
45
|
+
* C's concept of an integer varies from target to target. The C Standard has
|
46
|
+
* rules about the `int` matching the register size of the target
|
47
|
+
* microprocessor. It has rules about the `int` and how its size relates to
|
48
|
+
* other integer types. An `int` on one target might be 16 bits while on another
|
49
|
+
* target it might be 64. There are more specific types in compilers compliant
|
50
|
+
* with C99 or later, but that's certainly not every compiler you are likely to
|
51
|
+
* encounter. Therefore, Unity has a number of features for helping to adjust
|
52
|
+
* itself to match your required integer sizes. It starts off by trying to do it
|
53
|
+
* automatically.
|
54
|
+
**************************************************************************** */
|
55
|
+
|
56
|
+
/* The first thing that Unity does to guess your types is check `stdint.h`. This
|
57
|
+
* file includes defines like `UINT_MAX` that Unity can make use of to learn a
|
58
|
+
* lot about your system. It's possible you don't want it to do this or it's
|
59
|
+
* possible that your system doesn't support `stdint.h`. If that's the case,
|
60
|
+
* you're going to want to define this. That way, Unity will know to skip the
|
61
|
+
* inclusion of this file and you won't be left with a compiler error.
|
62
|
+
*/
|
63
|
+
/* #define UNITY_EXCLUDE_STDINT_H */
|
64
|
+
|
65
|
+
/* The second attempt to guess your types is to check `limits.h`. Some compilers
|
66
|
+
* that don't support `stdint.h` could include `limits.h` instead. If you don't
|
67
|
+
* want Unity to check this file either, define this to make it skip the
|
68
|
+
* inclusion.
|
69
|
+
*/
|
70
|
+
/* #define UNITY_EXCLUDE_LIMITS_H */
|
71
|
+
|
72
|
+
/* The third and final attempt to guess your types is to use the `sizeof()`
|
73
|
+
* operator. Even if the first two options don't work, this one covers most
|
74
|
+
* cases. There _is_ a rare compiler or two out there that doesn't support
|
75
|
+
* `sizeof()` in the preprocessing stage, though. For these, you have the
|
76
|
+
* ability to disable this feature as well.
|
77
|
+
*/
|
78
|
+
/* #define UNITY_EXCLUDE_SIZEOF */
|
79
|
+
|
80
|
+
|
81
|
+
/* ********************** MANUAL INTEGER TYPE DEFINITION ***********************
|
82
|
+
* If you've disabled all of the automatic options above, you're going to have
|
83
|
+
* to do the configuration yourself. There are just a handful of defines that
|
84
|
+
* you are going to specify if you don't like the defaults.
|
85
|
+
**************************************************************************** */
|
86
|
+
|
87
|
+
/* Define this to be the number of bits an `int` takes up on your system. The
|
88
|
+
* default, if not auto-detected, is 32 bits.
|
89
|
+
*
|
90
|
+
* Example:
|
91
|
+
*/
|
92
|
+
/* #define UNITY_INT_WIDTH 16 */
|
93
|
+
|
94
|
+
/* Define this to be the number of bits a `long` takes up on your system. The
|
95
|
+
* default, if not autodetected, is 32 bits. This is used to figure out what
|
96
|
+
* kind of 64-bit support your system can handle. Does it need to specify a
|
97
|
+
* `long` or a `long long` to get a 64-bit value. On 16-bit systems, this option
|
98
|
+
* is going to be ignored.
|
99
|
+
*
|
100
|
+
* Example:
|
101
|
+
*/
|
102
|
+
/* #define UNITY_LONG_WIDTH 16 */
|
103
|
+
|
104
|
+
/* Define this to be the number of bits a pointer takes up on your system. The
|
105
|
+
* default, if not autodetected, is 32-bits. If you're getting ugly compiler
|
106
|
+
* warnings about casting from pointers, this is the one to look at.
|
107
|
+
*
|
108
|
+
* Example:
|
109
|
+
*/
|
110
|
+
/* #define UNITY_POINTER_WIDTH 64 */
|
111
|
+
|
112
|
+
/* Unity will automatically include 64-bit support if it auto-detects it, or if
|
113
|
+
* your `int`, `long`, or pointer widths are greater than 32-bits. Define this
|
114
|
+
* to enable 64-bit support if none of the other options already did it for you.
|
115
|
+
* There can be a significant size and speed impact to enabling 64-bit support
|
116
|
+
* on small targets, so don't define it if you don't need it.
|
117
|
+
*/
|
118
|
+
/* #define UNITY_INCLUDE_64 */
|
119
|
+
|
120
|
+
|
121
|
+
/* *************************** FLOATING POINT TYPES ****************************
|
122
|
+
* In the embedded world, it's not uncommon for targets to have no support for
|
123
|
+
* floating point operations at all or to have support that is limited to only
|
124
|
+
* single precision. We are able to guess integer sizes on the fly because
|
125
|
+
* integers are always available in at least one size. Floating point, on the
|
126
|
+
* other hand, is sometimes not available at all. Trying to include `float.h` on
|
127
|
+
* these platforms would result in an error. This leaves manual configuration as
|
128
|
+
* the only option.
|
129
|
+
**************************************************************************** */
|
130
|
+
|
131
|
+
/* By default, Unity guesses that you will want single precision floating point
|
132
|
+
* support, but not double precision. It's easy to change either of these using
|
133
|
+
* the include and exclude options here. You may include neither, either, or
|
134
|
+
* both, as suits your needs.
|
135
|
+
*/
|
136
|
+
/* #define UNITY_INCLUDE_FLOAT */
|
137
|
+
/* #define UNITY_EXCLUDE_FLOAT */
|
138
|
+
/* #define UNITY_INCLUDE_DOUBLE */
|
139
|
+
/* #define UNITY_EXCLUDE_DOUBLE */
|
140
|
+
|
141
|
+
/* For features that are enabled, the following floating point options also
|
142
|
+
* become available.
|
143
|
+
*/
|
144
|
+
|
145
|
+
/* Unity aims for as small of a footprint as possible and avoids most standard
|
146
|
+
* library calls (some embedded platforms don't have a standard library!).
|
147
|
+
* Because of this, its routines for printing integer values are minimalist and
|
148
|
+
* hand-coded. To keep Unity universal, though, we chose to _not_ develop our
|
149
|
+
* own floating point print routines. Instead, the display of floating point
|
150
|
+
* values during a failure are optional. By default, Unity will not print the
|
151
|
+
* actual results of floating point assertion failure. So a failed assertion
|
152
|
+
* will produce a message like `"Values Not Within Delta"`. If you would like
|
153
|
+
* verbose failure messages for floating point assertions, use these options to
|
154
|
+
* give more explicit failure messages (e.g. `"Expected 4.56 Was 4.68"`). Note
|
155
|
+
* that this feature requires the use of `sprintf` so might not be desirable in
|
156
|
+
* all cases.
|
157
|
+
*/
|
158
|
+
/* #define UNITY_FLOAT_VERBOSE */
|
159
|
+
/* #define UNITY_DOUBLE_VERBOSE */
|
160
|
+
|
161
|
+
/* If enabled, Unity assumes you want your `FLOAT` asserts to compare standard C
|
162
|
+
* floats. If your compiler supports a specialty floating point type, you can
|
163
|
+
* always override this behavior by using this definition.
|
164
|
+
*
|
165
|
+
* Example:
|
166
|
+
*/
|
167
|
+
/* #define UNITY_FLOAT_TYPE float16_t */
|
168
|
+
|
169
|
+
/* If enabled, Unity assumes you want your `DOUBLE` asserts to compare standard
|
170
|
+
* C doubles. If you would like to change this, you can specify something else
|
171
|
+
* by using this option. For example, defining `UNITY_DOUBLE_TYPE` to `long
|
172
|
+
* double` could enable gargantuan floating point types on your 64-bit processor
|
173
|
+
* instead of the standard `double`.
|
174
|
+
*
|
175
|
+
* Example:
|
176
|
+
*/
|
177
|
+
/* #define UNITY_DOUBLE_TYPE long double */
|
178
|
+
|
179
|
+
/* If you look up `UNITY_ASSERT_EQUAL_FLOAT` and `UNITY_ASSERT_EQUAL_DOUBLE` as
|
180
|
+
* documented in the Unity Assertion Guide, you will learn that they are not
|
181
|
+
* really asserting that two values are equal but rather that two values are
|
182
|
+
* "close enough" to equal. "Close enough" is controlled by these precision
|
183
|
+
* configuration options. If you are working with 32-bit floats and/or 64-bit
|
184
|
+
* doubles (the normal on most processors), you should have no need to change
|
185
|
+
* these options. They are both set to give you approximately 1 significant bit
|
186
|
+
* in either direction. The float precision is 0.00001 while the double is
|
187
|
+
* 10^-12. For further details on how this works, see the appendix of the Unity
|
188
|
+
* Assertion Guide.
|
189
|
+
*
|
190
|
+
* Example:
|
191
|
+
*/
|
192
|
+
/* #define UNITY_FLOAT_PRECISION 0.001f */
|
193
|
+
/* #define UNITY_DOUBLE_PRECISION 0.001f */
|
194
|
+
|
195
|
+
|
196
|
+
/* *************************** TOOLSET CUSTOMIZATION ***************************
|
197
|
+
* In addition to the options listed above, there are a number of other options
|
198
|
+
* which will come in handy to customize Unity's behavior for your specific
|
199
|
+
* toolchain. It is possible that you may not need to touch any of these but
|
200
|
+
* certain platforms, particularly those running in simulators, may need to jump
|
201
|
+
* through extra hoops to operate properly. These macros will help in those
|
202
|
+
* situations.
|
203
|
+
**************************************************************************** */
|
204
|
+
|
205
|
+
/* By default, Unity prints its results to `stdout` as it runs. This works
|
206
|
+
* perfectly fine in most situations where you are using a native compiler for
|
207
|
+
* testing. It works on some simulators as well so long as they have `stdout`
|
208
|
+
* routed back to the command line. There are times, however, where the
|
209
|
+
* simulator will lack support for dumping results or you will want to route
|
210
|
+
* results elsewhere for other reasons. In these cases, you should define the
|
211
|
+
* `UNITY_OUTPUT_CHAR` macro. This macro accepts a single character at a time
|
212
|
+
* (as an `int`, since this is the parameter type of the standard C `putchar`
|
213
|
+
* function most commonly used). You may replace this with whatever function
|
214
|
+
* call you like.
|
215
|
+
*
|
216
|
+
* Example:
|
217
|
+
* Say you are forced to run your test suite on an embedded processor with no
|
218
|
+
* `stdout` option. You decide to route your test result output to a custom
|
219
|
+
* serial `RS232_putc()` function you wrote like thus:
|
220
|
+
*/
|
221
|
+
/* #define UNITY_OUTPUT_CHAR(a) RS232_putc(a) */
|
222
|
+
/* #define UNITY_OUTPUT_FLUSH() RS232_config(115200,1,8,0) */
|
223
|
+
/* #define UNITY_OUTPUT_START() RS232_flush() */
|
224
|
+
/* #define UNITY_OUTPUT_COMPLETE() RS232_close() */
|
225
|
+
|
226
|
+
/* For some targets, Unity can make the otherwise required `setUp()` and
|
227
|
+
* `tearDown()` functions optional. This is a nice convenience for test writers
|
228
|
+
* since `setUp` and `tearDown` don't often actually _do_ anything. If you're
|
229
|
+
* using gcc or clang, this option is automatically defined for you. Other
|
230
|
+
* compilers can also support this behavior, if they support a C feature called
|
231
|
+
* weak functions. A weak function is a function that is compiled into your
|
232
|
+
* executable _unless_ a non-weak version of the same function is defined
|
233
|
+
* elsewhere. If a non-weak version is found, the weak version is ignored as if
|
234
|
+
* it never existed. If your compiler supports this feature, you can let Unity
|
235
|
+
* know by defining `UNITY_SUPPORT_WEAK` as the function attributes that would
|
236
|
+
* need to be applied to identify a function as weak. If your compiler lacks
|
237
|
+
* support for weak functions, you will always need to define `setUp` and
|
238
|
+
* `tearDown` functions (though they can be and often will be just empty). The
|
239
|
+
* most common options for this feature are:
|
240
|
+
*/
|
241
|
+
/* #define UNITY_SUPPORT_WEAK weak */
|
242
|
+
/* #define UNITY_SUPPORT_WEAK __attribute__((weak)) */
|
243
|
+
|
244
|
+
/* Some compilers require a custom attribute to be assigned to pointers, like
|
245
|
+
* `near` or `far`. In these cases, you can give Unity a safe default for these
|
246
|
+
* by defining this option with the attribute you would like.
|
247
|
+
*
|
248
|
+
* Example:
|
249
|
+
*/
|
250
|
+
/* #define UNITY_PTR_ATTRIBUTE __attribute__((far)) */
|
251
|
+
/* #define UNITY_PTR_ATTRIBUTE near */
|
252
|
+
|
253
|
+
#ifdef __cplusplus
|
254
|
+
}
|
255
|
+
#endif /* extern "C" */
|
256
|
+
|
257
|
+
#endif /* UNITY_CONFIG_H */
|
@@ -75,7 +75,6 @@ void UnityTestRunner(unityfunction* setup,
|
|
75
75
|
{
|
76
76
|
if (testSelected(name) && groupSelected(group))
|
77
77
|
{
|
78
|
-
Unity.CurrentTestFailed = 0;
|
79
78
|
Unity.TestFile = file;
|
80
79
|
Unity.CurrentTestName = printableName;
|
81
80
|
Unity.CurrentTestLineNumber = line;
|
@@ -112,12 +111,14 @@ void UnityIgnoreTest(const char* printableName, const char* group, const char* n
|
|
112
111
|
if (testSelected(name) && groupSelected(group))
|
113
112
|
{
|
114
113
|
Unity.NumberOfTests++;
|
115
|
-
Unity.
|
114
|
+
Unity.TestIgnores++;
|
116
115
|
if (!UnityFixture.Verbose)
|
117
116
|
UNITY_OUTPUT_CHAR('!');
|
118
117
|
else
|
118
|
+
{
|
119
119
|
UnityPrint(printableName);
|
120
|
-
|
120
|
+
UNITY_PRINT_EOL();
|
121
|
+
}
|
121
122
|
}
|
122
123
|
}
|
123
124
|
|
@@ -206,6 +207,9 @@ void* unity_malloc(size_t size)
|
|
206
207
|
mem = (char*)&(guard[1]);
|
207
208
|
memcpy(&mem[size], end, sizeof(end));
|
208
209
|
|
210
|
+
#ifndef UNITY_FIXTURE_MALLOC_OVERRIDES_H_
|
211
|
+
free(guard);
|
212
|
+
#endif
|
209
213
|
return (void*)mem;
|
210
214
|
}
|
211
215
|
|
@@ -403,11 +407,8 @@ void UnityConcludeFixtureTest(void)
|
|
403
407
|
{
|
404
408
|
if (Unity.CurrentTestIgnored)
|
405
409
|
{
|
406
|
-
if (UnityFixture.Verbose)
|
407
|
-
{
|
408
|
-
UNITY_PRINT_EOL();
|
409
|
-
}
|
410
410
|
Unity.TestIgnores++;
|
411
|
+
UNITY_PRINT_EOL();
|
411
412
|
}
|
412
413
|
else if (!Unity.CurrentTestFailed)
|
413
414
|
{
|
@@ -417,7 +418,7 @@ void UnityConcludeFixtureTest(void)
|
|
417
418
|
UNITY_PRINT_EOL();
|
418
419
|
}
|
419
420
|
}
|
420
|
-
else
|
421
|
+
else // Unity.CurrentTestFailed
|
421
422
|
{
|
422
423
|
Unity.TestFailures++;
|
423
424
|
UNITY_PRINT_EOL();
|