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
@@ -44,8 +44,8 @@ static const _UD d_zero = 0.0;
|
|
44
44
|
UNITY_OUTPUT_CHAR('\n'); \
|
45
45
|
}
|
46
46
|
|
47
|
-
int SetToOneToFailInTearDown;
|
48
|
-
int SetToOneMeanWeAlreadyCheckedThisGuy;
|
47
|
+
static int SetToOneToFailInTearDown;
|
48
|
+
static int SetToOneMeanWeAlreadyCheckedThisGuy;
|
49
49
|
|
50
50
|
void setUp(void)
|
51
51
|
{
|
@@ -1370,7 +1370,7 @@ void testNotEqualString4(void)
|
|
1370
1370
|
void testNotEqualStringLen4(void)
|
1371
1371
|
{
|
1372
1372
|
EXPECT_ABORT_BEGIN
|
1373
|
-
TEST_ASSERT_EQUAL_STRING_LEN("
|
1373
|
+
TEST_ASSERT_EQUAL_STRING_LEN("\r\x16", "bar\n", 4);
|
1374
1374
|
VERIFY_FAILS_END
|
1375
1375
|
}
|
1376
1376
|
|
@@ -1390,6 +1390,13 @@ void testNotEqualString_ExpectedStringIsNull(void)
|
|
1390
1390
|
VERIFY_FAILS_END
|
1391
1391
|
}
|
1392
1392
|
|
1393
|
+
void testNotEqualStringLen_ExpectedStringIsNull(void)
|
1394
|
+
{
|
1395
|
+
EXPECT_ABORT_BEGIN
|
1396
|
+
TEST_ASSERT_EQUAL_STRING_LEN(NULL, "bar", 1);
|
1397
|
+
VERIFY_FAILS_END
|
1398
|
+
}
|
1399
|
+
|
1393
1400
|
void testNotEqualString_ActualStringIsNull(void)
|
1394
1401
|
{
|
1395
1402
|
EXPECT_ABORT_BEGIN
|
@@ -1397,6 +1404,13 @@ void testNotEqualString_ActualStringIsNull(void)
|
|
1397
1404
|
VERIFY_FAILS_END
|
1398
1405
|
}
|
1399
1406
|
|
1407
|
+
void testNotEqualStringLen_ActualStringIsNull(void)
|
1408
|
+
{
|
1409
|
+
EXPECT_ABORT_BEGIN
|
1410
|
+
TEST_ASSERT_EQUAL_STRING_LEN("foo", NULL, 1);
|
1411
|
+
VERIFY_FAILS_END
|
1412
|
+
}
|
1413
|
+
|
1400
1414
|
void testEqualStringArrays(void)
|
1401
1415
|
{
|
1402
1416
|
const char *testStrings[] = { "foo", "boo", "woo", "moo" };
|
@@ -1476,6 +1490,16 @@ void testEqualStringArrayIfBothNulls(void)
|
|
1476
1490
|
TEST_ASSERT_EQUAL_STRING_ARRAY(expStrings, testStrings, 4);
|
1477
1491
|
}
|
1478
1492
|
|
1493
|
+
void testNotEqualStringArrayLengthZero(void)
|
1494
|
+
{
|
1495
|
+
const char *testStrings[] = {NULL};
|
1496
|
+
const char **expStrings = NULL;
|
1497
|
+
|
1498
|
+
EXPECT_ABORT_BEGIN
|
1499
|
+
TEST_ASSERT_EQUAL_STRING_ARRAY(expStrings, testStrings, 0);
|
1500
|
+
VERIFY_FAILS_END
|
1501
|
+
}
|
1502
|
+
|
1479
1503
|
void testEqualMemory(void)
|
1480
1504
|
{
|
1481
1505
|
const char *testString = "whatever";
|
@@ -1516,6 +1540,13 @@ void testNotEqualMemory4(void)
|
|
1516
1540
|
VERIFY_FAILS_END
|
1517
1541
|
}
|
1518
1542
|
|
1543
|
+
void testNotEqualMemoryLengthZero(void)
|
1544
|
+
{
|
1545
|
+
EXPECT_ABORT_BEGIN
|
1546
|
+
TEST_ASSERT_EQUAL_MEMORY(NULL, NULL, 0);
|
1547
|
+
VERIFY_FAILS_END
|
1548
|
+
}
|
1549
|
+
|
1519
1550
|
void testEqualIntArrays(void)
|
1520
1551
|
{
|
1521
1552
|
int p0[] = {1, 8, 987, -2};
|
@@ -1528,6 +1559,7 @@ void testEqualIntArrays(void)
|
|
1528
1559
|
TEST_ASSERT_EQUAL_INT_ARRAY(p0, p1, 4);
|
1529
1560
|
TEST_ASSERT_EQUAL_INT_ARRAY(p0, p2, 3);
|
1530
1561
|
TEST_ASSERT_EQUAL_INT_ARRAY(p0, p3, 1);
|
1562
|
+
TEST_ASSERT_EQUAL_INT_ARRAY(NULL, NULL, 1);
|
1531
1563
|
}
|
1532
1564
|
|
1533
1565
|
void testNotEqualIntArraysNullExpected(void)
|
@@ -1580,6 +1612,16 @@ void testNotEqualIntArrays3(void)
|
|
1580
1612
|
VERIFY_FAILS_END
|
1581
1613
|
}
|
1582
1614
|
|
1615
|
+
void testNotEqualIntArraysLengthZero(void)
|
1616
|
+
{
|
1617
|
+
_UU32 p0[1] = {1};
|
1618
|
+
_UU32 p1[1] = {1};
|
1619
|
+
|
1620
|
+
EXPECT_ABORT_BEGIN
|
1621
|
+
TEST_ASSERT_EQUAL_INT_ARRAY(p0, p1, 0);
|
1622
|
+
VERIFY_FAILS_END
|
1623
|
+
}
|
1624
|
+
|
1583
1625
|
void testEqualPtrArrays(void)
|
1584
1626
|
{
|
1585
1627
|
char A = 1;
|
@@ -2205,7 +2247,7 @@ char* getBufferPutcharSpy(void)
|
|
2205
2247
|
#endif
|
2206
2248
|
}
|
2207
2249
|
|
2208
|
-
|
2250
|
+
void putcharSpy(int c)
|
2209
2251
|
{
|
2210
2252
|
#ifdef USING_OUTPUT_SPY
|
2211
2253
|
if (putcharSpyEnabled)
|
@@ -2215,7 +2257,19 @@ int putcharSpy(int c)
|
|
2215
2257
|
} else
|
2216
2258
|
c = putchar(c);
|
2217
2259
|
#endif
|
2218
|
-
|
2260
|
+
}
|
2261
|
+
|
2262
|
+
void testFailureCountIncrementsAndIsReturnedAtEnd(void)
|
2263
|
+
{
|
2264
|
+
Unity.CurrentTestFailed = 1;
|
2265
|
+
startPutcharSpy(); // Suppress output
|
2266
|
+
UnityConcludeTest();
|
2267
|
+
TEST_ASSERT_EQUAL(1, Unity.TestFailures);
|
2268
|
+
|
2269
|
+
int failures = UnityEnd();
|
2270
|
+
Unity.TestFailures--;
|
2271
|
+
endPutcharSpy();
|
2272
|
+
TEST_ASSERT_EQUAL(1, failures);
|
2219
2273
|
}
|
2220
2274
|
|
2221
2275
|
#define TEST_ASSERT_EQUAL_PRINT_NUMBERS(expected, actual) { \
|
@@ -2978,6 +3032,18 @@ void testFloatIsNotDeterminate2(void)
|
|
2978
3032
|
#endif
|
2979
3033
|
}
|
2980
3034
|
|
3035
|
+
void testFloatTraitFailsOnInvalidTrait(void)
|
3036
|
+
{
|
3037
|
+
#ifdef UNITY_EXCLUDE_FLOAT
|
3038
|
+
TEST_IGNORE();
|
3039
|
+
#else
|
3040
|
+
EXPECT_ABORT_BEGIN
|
3041
|
+
UnityAssertFloatSpecial(1.0f, NULL, __LINE__, UNITY_FLOAT_INVALID_TRAIT);
|
3042
|
+
VERIFY_FAILS_END
|
3043
|
+
#endif
|
3044
|
+
}
|
3045
|
+
|
3046
|
+
|
2981
3047
|
void testEqualFloatArrays(void)
|
2982
3048
|
{
|
2983
3049
|
#ifdef UNITY_EXCLUDE_FLOAT
|
@@ -2993,6 +3059,7 @@ void testEqualFloatArrays(void)
|
|
2993
3059
|
TEST_ASSERT_EQUAL_FLOAT_ARRAY(p0, p1, 4);
|
2994
3060
|
TEST_ASSERT_EQUAL_FLOAT_ARRAY(p0, p2, 3);
|
2995
3061
|
TEST_ASSERT_EQUAL_FLOAT_ARRAY(p0, p3, 1);
|
3062
|
+
TEST_ASSERT_EQUAL_FLOAT_ARRAY(NULL, NULL, 1);
|
2996
3063
|
#endif
|
2997
3064
|
}
|
2998
3065
|
|
@@ -3136,6 +3203,20 @@ void testNotEqualFloatArraysInf(void)
|
|
3136
3203
|
#endif
|
3137
3204
|
}
|
3138
3205
|
|
3206
|
+
void testNotEqualFloatArraysLengthZero(void)
|
3207
|
+
{
|
3208
|
+
#ifdef UNITY_EXCLUDE_FLOAT
|
3209
|
+
TEST_IGNORE();
|
3210
|
+
#else
|
3211
|
+
float p0[1] = {0.0f};
|
3212
|
+
float p1[1] = {0.0f};
|
3213
|
+
|
3214
|
+
EXPECT_ABORT_BEGIN
|
3215
|
+
TEST_ASSERT_EQUAL_FLOAT_ARRAY(p0, p1, 0);
|
3216
|
+
VERIFY_FAILS_END
|
3217
|
+
#endif
|
3218
|
+
}
|
3219
|
+
|
3139
3220
|
// ===================== THESE TEST WILL RUN IF YOUR CONFIG INCLUDES DOUBLE SUPPORT ==================
|
3140
3221
|
|
3141
3222
|
void testDoublesWithinDelta(void)
|
@@ -3483,6 +3564,17 @@ void testDoubleIsNotDeterminate2(void)
|
|
3483
3564
|
#endif
|
3484
3565
|
}
|
3485
3566
|
|
3567
|
+
void testDoubleTraitFailsOnInvalidTrait(void)
|
3568
|
+
{
|
3569
|
+
#ifdef UNITY_EXCLUDE_DOUBLE
|
3570
|
+
TEST_IGNORE();
|
3571
|
+
#else
|
3572
|
+
EXPECT_ABORT_BEGIN
|
3573
|
+
UnityAssertDoubleSpecial(1.0, NULL, __LINE__, UNITY_FLOAT_INVALID_TRAIT);
|
3574
|
+
VERIFY_FAILS_END
|
3575
|
+
#endif
|
3576
|
+
}
|
3577
|
+
|
3486
3578
|
void testEqualDoubleArrays(void)
|
3487
3579
|
{
|
3488
3580
|
#ifdef UNITY_EXCLUDE_DOUBLE
|
@@ -3498,6 +3590,7 @@ void testEqualDoubleArrays(void)
|
|
3498
3590
|
TEST_ASSERT_EQUAL_DOUBLE_ARRAY(p0, p1, 4);
|
3499
3591
|
TEST_ASSERT_EQUAL_DOUBLE_ARRAY(p0, p2, 3);
|
3500
3592
|
TEST_ASSERT_EQUAL_DOUBLE_ARRAY(p0, p3, 1);
|
3593
|
+
TEST_ASSERT_EQUAL_DOUBLE_ARRAY(NULL, NULL, 1);
|
3501
3594
|
#endif
|
3502
3595
|
}
|
3503
3596
|
|
@@ -3641,6 +3734,22 @@ void testNotEqualDoubleArraysInf(void)
|
|
3641
3734
|
#endif
|
3642
3735
|
}
|
3643
3736
|
|
3737
|
+
void testNotEqualDoubleArraysLengthZero(void)
|
3738
|
+
{
|
3739
|
+
#ifdef UNITY_EXCLUDE_DOUBLE
|
3740
|
+
TEST_IGNORE();
|
3741
|
+
#else
|
3742
|
+
double p0[1] = {0.0};
|
3743
|
+
double p1[1] = {0.0};
|
3744
|
+
|
3745
|
+
EXPECT_ABORT_BEGIN
|
3746
|
+
TEST_ASSERT_EQUAL_DOUBLE_ARRAY(p0, p1, 0);
|
3747
|
+
VERIFY_FAILS_END
|
3748
|
+
#endif
|
3749
|
+
}
|
3750
|
+
|
3751
|
+
// ===================== THESE TEST WILL RUN IF YOUR CONFIG INCLUDES DETAIL SUPPORT ==================
|
3752
|
+
|
3644
3753
|
void testThatDetailsCanBeHandleOneDetail(void)
|
3645
3754
|
{
|
3646
3755
|
#ifdef UNITY_EXCLUDE_DETAILS
|
@@ -3654,6 +3763,19 @@ void testThatDetailsCanBeHandleOneDetail(void)
|
|
3654
3763
|
#endif
|
3655
3764
|
}
|
3656
3765
|
|
3766
|
+
void testThatDetailsCanHandleTestFail(void)
|
3767
|
+
{
|
3768
|
+
#ifdef UNITY_EXCLUDE_DETAILS
|
3769
|
+
TEST_IGNORE();
|
3770
|
+
#else
|
3771
|
+
UNITY_SET_DETAILS("Detail1","Detail2");
|
3772
|
+
|
3773
|
+
EXPECT_ABORT_BEGIN
|
3774
|
+
TEST_FAIL_MESSAGE("Should Fail And Say Detail1 and Detail2");
|
3775
|
+
VERIFY_FAILS_END
|
3776
|
+
#endif
|
3777
|
+
}
|
3778
|
+
|
3657
3779
|
void testThatDetailsCanBeHandleTwoDetails(void)
|
3658
3780
|
{
|
3659
3781
|
#ifdef UNITY_EXCLUDE_DETAILS
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# Unity Project - A Test Framework for C
|
3
3
|
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
4
|
# [Released under MIT License. Please refer to license.txt for details]
|
5
|
-
# ==========================================
|
5
|
+
# ==========================================
|
6
6
|
|
7
7
|
# This script creates all the files with start code necessary for a new module.
|
8
8
|
# A simple module only requires a source file, header file, and test file.
|
@@ -32,20 +32,20 @@ HELP_TEXT = [ "\nGENERATE MODULE\n-------- ------",
|
|
32
32
|
|
33
33
|
#Built in patterns
|
34
34
|
PATTERNS = { 'src' => {'' => { :inc => [] } },
|
35
|
-
'dh' => {'Driver' => { :inc => ['%1$sHardware.h'] },
|
36
|
-
'Hardware' => { :inc => [] }
|
35
|
+
'dh' => {'Driver' => { :inc => ['%1$sHardware.h'] },
|
36
|
+
'Hardware' => { :inc => [] }
|
37
37
|
},
|
38
|
-
'dih' => {'Driver' => { :inc => ['%1$sHardware.h', '%1$sInterrupt.h'] },
|
38
|
+
'dih' => {'Driver' => { :inc => ['%1$sHardware.h', '%1$sInterrupt.h'] },
|
39
39
|
'Interrupt'=> { :inc => ['%1$sHardware.h'] },
|
40
|
-
'Hardware' => { :inc => [] }
|
40
|
+
'Hardware' => { :inc => [] }
|
41
41
|
},
|
42
|
-
'mch' => {'Model' => { :inc => [] },
|
42
|
+
'mch' => {'Model' => { :inc => [] },
|
43
43
|
'Conductor'=> { :inc => ['%1$sModel.h', '%1$sHardware.h'] },
|
44
|
-
'Hardware' => { :inc => [] }
|
44
|
+
'Hardware' => { :inc => [] }
|
45
45
|
},
|
46
|
-
'mvp' => {'Model' => { :inc => [] },
|
46
|
+
'mvp' => {'Model' => { :inc => [] },
|
47
47
|
'Presenter'=> { :inc => ['%1$sModel.h', '%1$sView.h'] },
|
48
|
-
'View' => { :inc => [] }
|
48
|
+
'View' => { :inc => [] }
|
49
49
|
}
|
50
50
|
}
|
51
51
|
|
@@ -63,7 +63,7 @@ void tearDown(void)
|
|
63
63
|
|
64
64
|
void test_%1$s_NeedToImplement(void)
|
65
65
|
{
|
66
|
-
|
66
|
+
TEST_IGNORE_MESSAGE("Need to Implement %1$s");
|
67
67
|
}
|
68
68
|
]
|
69
69
|
|
@@ -91,7 +91,7 @@ ARGV.each do |arg|
|
|
91
91
|
when /^(\w+)/
|
92
92
|
raise "ERROR: You can't have more than one Module name specified!" unless @module_name.nil?
|
93
93
|
@module_name = arg
|
94
|
-
when /^-(h|-help)/
|
94
|
+
when /^-(h|-help)/
|
95
95
|
puts HELP_TEXT
|
96
96
|
exit
|
97
97
|
else
|
@@ -126,7 +126,7 @@ end
|
|
126
126
|
@includes.merge!(@extra_inc) unless @extra_inc.nil?
|
127
127
|
|
128
128
|
#create triad definition
|
129
|
-
TRIAD = [ { :ext => '.c', :path => @path_src, :template => TEMPLATE_SRC, :inc => :src, :boilerplate => @boilerplates[:src] },
|
129
|
+
TRIAD = [ { :ext => '.c', :path => @path_src, :template => TEMPLATE_SRC, :inc => :src, :boilerplate => @boilerplates[:src] },
|
130
130
|
{ :ext => '.h', :path => @path_inc, :template => TEMPLATE_INC, :inc => :inc, :boilerplate => @boilerplates[:inc] },
|
131
131
|
{ :ext => '.c', :path => @path_tst+'Test', :template => TEMPLATE_TST, :inc => :tst, :boilerplate => @boilerplates[:tst] },
|
132
132
|
]
|
@@ -159,7 +159,7 @@ if @destroy
|
|
159
159
|
file = filespec[:path]
|
160
160
|
if File.exist?(file)
|
161
161
|
if @update_svn
|
162
|
-
`svn delete \"#{file}\" --force`
|
162
|
+
`svn delete \"#{file}\" --force`
|
163
163
|
puts "File #{file} deleted and removed from source control"
|
164
164
|
else
|
165
165
|
FileUtils.remove(file)
|
@@ -182,13 +182,13 @@ end
|
|
182
182
|
files.each_with_index do |file, i|
|
183
183
|
File.open(file[:path], 'w') do |f|
|
184
184
|
f.write(file[:boilerplate] % [file[:name]]) unless file[:boilerplate].nil?
|
185
|
-
f.write(file[:template] % [ file[:name],
|
186
|
-
file[:includes].map{|f| "#include \"#{f}\"\n"}.join,
|
185
|
+
f.write(file[:template] % [ file[:name],
|
186
|
+
file[:includes].map{|f| "#include \"#{f}\"\n"}.join,
|
187
187
|
file[:name].upcase ]
|
188
188
|
)
|
189
189
|
end
|
190
190
|
if (@update_svn)
|
191
|
-
`svn add \"#{file[:path]}\"`
|
191
|
+
`svn add \"#{file[:path]}\"`
|
192
192
|
if $?.exitstatus == 0
|
193
193
|
puts "File #{file[:path]} created and added to source control"
|
194
194
|
else
|
@@ -22,13 +22,16 @@ class UnityTestRunnerGenerator
|
|
22
22
|
|
23
23
|
def self.default_options
|
24
24
|
{
|
25
|
-
:includes
|
26
|
-
:plugins
|
27
|
-
:framework
|
28
|
-
:test_prefix
|
29
|
-
:setup_name
|
30
|
-
:teardown_name
|
31
|
-
:main_name
|
25
|
+
:includes => [],
|
26
|
+
:plugins => [],
|
27
|
+
:framework => :unity,
|
28
|
+
:test_prefix => "test|spec|should",
|
29
|
+
:setup_name => "setUp",
|
30
|
+
:teardown_name => "tearDown",
|
31
|
+
:main_name => "main", #set to :auto to automatically generate each time
|
32
|
+
:main_export_decl => "",
|
33
|
+
:cmdline_args => false,
|
34
|
+
:use_param_tests => false,
|
32
35
|
}
|
33
36
|
end
|
34
37
|
|
@@ -158,7 +161,7 @@ class UnityTestRunnerGenerator
|
|
158
161
|
def create_header(output, mocks, testfile_includes=[])
|
159
162
|
output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
|
160
163
|
create_runtest(output, mocks)
|
161
|
-
output.puts("\n
|
164
|
+
output.puts("\n/*=======Automagically Detected Files To Include=====*/")
|
162
165
|
output.puts("#include \"#{@options[:framework].to_s}.h\"")
|
163
166
|
output.puts('#include "cmock.h"') unless (mocks.empty?)
|
164
167
|
output.puts('#include <setjmp.h>')
|
@@ -186,7 +189,7 @@ class UnityTestRunnerGenerator
|
|
186
189
|
end
|
187
190
|
|
188
191
|
def create_externs(output, tests, mocks)
|
189
|
-
output.puts("\n
|
192
|
+
output.puts("\n/*=======External Functions This Runner Calls=====*/")
|
190
193
|
output.puts("extern void #{@options[:setup_name]}(void);")
|
191
194
|
output.puts("extern void #{@options[:teardown_name]}(void);")
|
192
195
|
tests.each do |test|
|
@@ -197,7 +200,7 @@ class UnityTestRunnerGenerator
|
|
197
200
|
|
198
201
|
def create_mock_management(output, mock_headers)
|
199
202
|
unless (mock_headers.empty?)
|
200
|
-
output.puts("\n
|
203
|
+
output.puts("\n/*=======Mock Management=====*/")
|
201
204
|
output.puts("static void CMock_Init(void)")
|
202
205
|
output.puts("{")
|
203
206
|
if @options[:enforce_strict_ordering]
|
@@ -232,14 +235,14 @@ class UnityTestRunnerGenerator
|
|
232
235
|
|
233
236
|
def create_suite_setup_and_teardown(output)
|
234
237
|
unless (@options[:suite_setup].nil?)
|
235
|
-
output.puts("\n
|
236
|
-
output.puts("static
|
238
|
+
output.puts("\n/*=======Suite Setup=====*/")
|
239
|
+
output.puts("static void suite_setup(void)")
|
237
240
|
output.puts("{")
|
238
241
|
output.puts(@options[:suite_setup])
|
239
242
|
output.puts("}")
|
240
243
|
end
|
241
244
|
unless (@options[:suite_teardown].nil?)
|
242
|
-
output.puts("\n
|
245
|
+
output.puts("\n/*=======Suite Teardown=====*/")
|
243
246
|
output.puts("static int suite_teardown(int num_failures)")
|
244
247
|
output.puts("{")
|
245
248
|
output.puts(@options[:suite_teardown])
|
@@ -251,12 +254,13 @@ class UnityTestRunnerGenerator
|
|
251
254
|
cexception = @options[:plugins].include? :cexception
|
252
255
|
va_args1 = @options[:use_param_tests] ? ', ...' : ''
|
253
256
|
va_args2 = @options[:use_param_tests] ? '__VA_ARGS__' : ''
|
254
|
-
output.puts("\n
|
257
|
+
output.puts("\n/*=======Test Runner Used To Run Each Test Below=====*/")
|
255
258
|
output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests]
|
256
259
|
output.puts("#define RUN_TEST(TestFunc, TestLineNum#{va_args1}) \\")
|
257
260
|
output.puts("{ \\")
|
258
261
|
output.puts(" Unity.CurrentTestName = #TestFunc#{va_args2.empty? ? '' : " \"(\" ##{va_args2} \")\""}; \\")
|
259
262
|
output.puts(" Unity.CurrentTestLineNumber = TestLineNum; \\")
|
263
|
+
output.puts(" if (UnityTestMatches()) { \\") if (@options[:cmdline_args])
|
260
264
|
output.puts(" Unity.NumberOfTests++; \\")
|
261
265
|
output.puts(" CMock_Init(); \\") unless (used_mocks.empty?)
|
262
266
|
output.puts(" UNITY_CLR_DETAILS(); \\") unless (used_mocks.empty?)
|
@@ -275,11 +279,12 @@ class UnityTestRunnerGenerator
|
|
275
279
|
output.puts(" } \\")
|
276
280
|
output.puts(" CMock_Destroy(); \\") unless (used_mocks.empty?)
|
277
281
|
output.puts(" UnityConcludeTest(); \\")
|
282
|
+
output.puts(" } \\") if (@options[:cmdline_args])
|
278
283
|
output.puts("}\n")
|
279
284
|
end
|
280
285
|
|
281
286
|
def create_reset(output, used_mocks)
|
282
|
-
output.puts("\n
|
287
|
+
output.puts("\n/*=======Test Reset Option=====*/")
|
283
288
|
output.puts("void resetTest(void);")
|
284
289
|
output.puts("void resetTest(void)")
|
285
290
|
output.puts("{")
|
@@ -292,14 +297,49 @@ class UnityTestRunnerGenerator
|
|
292
297
|
end
|
293
298
|
|
294
299
|
def create_main(output, filename, tests, used_mocks)
|
295
|
-
output.puts("\n\n
|
296
|
-
|
297
|
-
|
300
|
+
output.puts("\n\n/*=======MAIN=====*/")
|
301
|
+
main_name = (@options[:main_name].to_sym == :auto) ? "main_#{filename.gsub('.c','')}" : "#{@options[:main_name]}"
|
302
|
+
if (@options[:cmdline_args])
|
303
|
+
if (main_name != "main")
|
304
|
+
output.puts("#{@options[:main_export_decl]} int #{main_name}(int argc, char** argv);")
|
305
|
+
end
|
306
|
+
output.puts("#{@options[:main_export_decl]} int #{main_name}(int argc, char** argv)")
|
307
|
+
output.puts("{")
|
308
|
+
output.puts(" int parse_status = UnityParseOptions(argc, argv);")
|
309
|
+
output.puts(" if (parse_status != 0)")
|
310
|
+
output.puts(" {")
|
311
|
+
output.puts(" if (parse_status < 0)")
|
312
|
+
output.puts(" {")
|
313
|
+
output.puts(" UnityPrint(\"#{filename.gsub('.c','')}.\");")
|
314
|
+
output.puts(" UNITY_PRINT_EOL();")
|
315
|
+
if (@options[:use_param_tests])
|
316
|
+
tests.each do |test|
|
317
|
+
if ((test[:args].nil?) or (test[:args].empty?))
|
318
|
+
output.puts(" UnityPrint(\" #{test[:test]}(RUN_TEST_NO_ARGS)\");")
|
319
|
+
output.puts(" UNITY_PRINT_EOL();")
|
320
|
+
else
|
321
|
+
test[:args].each do |args|
|
322
|
+
output.puts(" UnityPrint(\" #{test[:test]}(#{args})\");")
|
323
|
+
output.puts(" UNITY_PRINT_EOL();")
|
324
|
+
end
|
325
|
+
end
|
326
|
+
end
|
327
|
+
else
|
328
|
+
tests.each { |test| output.puts(" UnityPrint(\" #{test[:test]}\");\n UNITY_PRINT_EOL();")}
|
329
|
+
end
|
330
|
+
output.puts(" return 0;")
|
331
|
+
output.puts(" }")
|
332
|
+
output.puts(" return parse_status;")
|
333
|
+
output.puts(" }")
|
334
|
+
else
|
335
|
+
if (main_name != "main")
|
336
|
+
output.puts("#{@options[:main_export_decl]} int #{main_name}(void);")
|
337
|
+
end
|
338
|
+
output.puts("int #{main_name}(void)")
|
339
|
+
output.puts("{")
|
298
340
|
end
|
299
|
-
output.puts("int #{@options[:main_name]}(void)")
|
300
|
-
output.puts("{")
|
301
341
|
output.puts(" suite_setup();") unless @options[:suite_setup].nil?
|
302
|
-
output.puts(" UnityBegin(\"#{filename.gsub(/\\/,'
|
342
|
+
output.puts(" UnityBegin(\"#{filename.gsub(/\\/,'\\\\\\')}\");")
|
303
343
|
if (@options[:use_param_tests])
|
304
344
|
tests.each do |test|
|
305
345
|
if ((test[:args].nil?) or (test[:args].empty?))
|