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
data/plugins/gcov/readme.txt
DELETED
File without changes
|
@@ -1,71 +0,0 @@
|
|
1
|
-
require 'plugin'
|
2
|
-
require 'constants'
|
3
|
-
|
4
|
-
class WarningsReport < Plugin
|
5
|
-
|
6
|
-
def setup
|
7
|
-
@stderr_redirect = nil
|
8
|
-
@log_paths = {}
|
9
|
-
end
|
10
|
-
|
11
|
-
def pre_compile_execute( arg_hash )
|
12
|
-
# at beginning of compile, override tool's stderr_redirect so we can parse $stderr + $stdout
|
13
|
-
set_stderr_redirect( arg_hash )
|
14
|
-
end
|
15
|
-
|
16
|
-
def post_compile_execute( arg_hash )
|
17
|
-
# after compilation, grab output for parsing/logging, restore stderr_redirect, log warning if it exists
|
18
|
-
output = arg_hash[:shell_result][:output]
|
19
|
-
restore_stderr_redirect( arg_hash )
|
20
|
-
write_warning_log( arg_hash[:context], output )
|
21
|
-
end
|
22
|
-
|
23
|
-
def pre_link_execute( arg_hash )
|
24
|
-
# at beginning of link, override tool's stderr_redirect so we can parse $stderr + $stdout
|
25
|
-
set_stderr_redirect( arg_hash )
|
26
|
-
end
|
27
|
-
|
28
|
-
def post_link_execute( arg_hash )
|
29
|
-
# after linking, grab output for parsing/logging, restore stderr_redirect, log warning if it exists
|
30
|
-
output = arg_hash[:shell_result][:output]
|
31
|
-
restore_stderr_redirect( arg_hash )
|
32
|
-
write_warning_log( arg_hash[:context], output )
|
33
|
-
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
def set_stderr_redirect( hash )
|
38
|
-
@stderr_redirect = hash[:tool][:stderr_redirect]
|
39
|
-
hash[:tool][:stderr_redirect] = StdErrRedirect::AUTO
|
40
|
-
end
|
41
|
-
|
42
|
-
def restore_stderr_redirect( hash )
|
43
|
-
hash[:tool][:stderr_redirect] = @stderr_redirect
|
44
|
-
end
|
45
|
-
|
46
|
-
def write_warning_log( context, output )
|
47
|
-
# if $stderr/$stdout contain "warning", log it
|
48
|
-
if (output =~ /warning/i)
|
49
|
-
# generate a log path & file io write flags
|
50
|
-
logging = generate_log_path( context )
|
51
|
-
@ceedling[:file_wrapper].write( logging[:path], output + "\n", logging[:flags] ) if (not logging.nil?)
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
def generate_log_path( context )
|
56
|
-
# if path has already been generated, return it & 'append' file io flags (append to log)
|
57
|
-
return { :path => @log_paths[context], :flags => 'a' } if (not @log_paths[context].nil?)
|
58
|
-
|
59
|
-
# first time through, generate path & 'write' file io flags (create new log)
|
60
|
-
base_path = File.join( PROJECT_BUILD_ARTIFACTS_ROOT, context.to_s )
|
61
|
-
file_path = File.join( base_path, 'warnings.log' )
|
62
|
-
|
63
|
-
if (@ceedling[:file_wrapper].exist?( base_path ))
|
64
|
-
@log_paths[context] = file_path
|
65
|
-
return { :path => file_path, :flags => 'w' }
|
66
|
-
end
|
67
|
-
|
68
|
-
return nil
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|
@@ -1,110 +0,0 @@
|
|
1
|
-
require 'ceedling/plugin'
|
2
|
-
require 'ceedling/constants'
|
3
|
-
|
4
|
-
class XmlTestsReport < Plugin
|
5
|
-
|
6
|
-
def setup
|
7
|
-
@results_list = {}
|
8
|
-
@test_counter = 0
|
9
|
-
end
|
10
|
-
|
11
|
-
def post_test_fixture_execute(arg_hash)
|
12
|
-
context = arg_hash[:context]
|
13
|
-
|
14
|
-
@results_list[context] = [] if (@results_list[context].nil?)
|
15
|
-
|
16
|
-
@results_list[context] << arg_hash[:result_file]
|
17
|
-
end
|
18
|
-
|
19
|
-
def post_build
|
20
|
-
@results_list.each_key do |context|
|
21
|
-
results = @ceedling[:plugin_reportinator].assemble_test_results(@results_list[context])
|
22
|
-
|
23
|
-
file_path = File.join( PROJECT_BUILD_ARTIFACTS_ROOT, context.to_s, 'report.xml' )
|
24
|
-
|
25
|
-
@ceedling[:file_wrapper].open( file_path, 'w' ) do |f|
|
26
|
-
@test_counter = 1
|
27
|
-
write_results( results, f )
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def write_results( results, stream )
|
35
|
-
write_header( stream )
|
36
|
-
write_failures( results[:failures], stream )
|
37
|
-
write_tests( results[:successes], stream, 'SuccessfulTests' )
|
38
|
-
write_tests( results[:ignores], stream, 'IgnoredTests' )
|
39
|
-
write_statistics( results[:counts], stream )
|
40
|
-
write_footer( stream )
|
41
|
-
end
|
42
|
-
|
43
|
-
def write_header( stream )
|
44
|
-
stream.puts "<?xml version='1.0' encoding='utf-8' ?>"
|
45
|
-
stream.puts "<TestRun>"
|
46
|
-
end
|
47
|
-
|
48
|
-
def write_failures( results, stream )
|
49
|
-
if (results.size == 0)
|
50
|
-
stream.puts "\t<FailedTests/>"
|
51
|
-
return
|
52
|
-
end
|
53
|
-
|
54
|
-
stream.puts "\t<FailedTests>"
|
55
|
-
|
56
|
-
results.each do |result|
|
57
|
-
result[:collection].each do |item|
|
58
|
-
filename = File.join( result[:source][:path], result[:source][:file] )
|
59
|
-
|
60
|
-
stream.puts "\t\t<Test id=\"#{@test_counter}\">"
|
61
|
-
stream.puts "\t\t\t<Name>#{filename}::#{item[:test]}</Name>"
|
62
|
-
stream.puts "\t\t\t<FailureType>Assertion</FailureType>"
|
63
|
-
stream.puts "\t\t\t<Location>"
|
64
|
-
stream.puts "\t\t\t\t<File>#{filename}</File>"
|
65
|
-
stream.puts "\t\t\t\t<Line>#{item[:line]}</Line>"
|
66
|
-
stream.puts "\t\t\t</Location>"
|
67
|
-
stream.puts "\t\t\t<Message>#{item[:message]}</Message>"
|
68
|
-
stream.puts "\t\t</Test>"
|
69
|
-
@test_counter += 1
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
stream.puts "\t</FailedTests>"
|
74
|
-
end
|
75
|
-
|
76
|
-
def write_tests( results, stream, tag )
|
77
|
-
if (results.size == 0)
|
78
|
-
stream.puts "\t<#{tag}/>"
|
79
|
-
return
|
80
|
-
end
|
81
|
-
|
82
|
-
stream.puts "\t<#{tag}>"
|
83
|
-
|
84
|
-
results.each do |result|
|
85
|
-
result[:collection].each do |item|
|
86
|
-
stream.puts "\t\t<Test id=\"#{@test_counter}\">"
|
87
|
-
stream.puts "\t\t\t<Name>#{File.join( result[:source][:path], result[:source][:file] )}::#{item[:test]}</Name>"
|
88
|
-
stream.puts "\t\t</Test>"
|
89
|
-
@test_counter += 1
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
stream.puts "\t</#{tag}>"
|
94
|
-
end
|
95
|
-
|
96
|
-
def write_statistics( counts, stream )
|
97
|
-
stream.puts "\t<Statistics>"
|
98
|
-
stream.puts "\t\t<Tests>#{counts[:total]}</Tests>"
|
99
|
-
stream.puts "\t\t<Ignores>#{counts[:ignored]}</Ignores>"
|
100
|
-
stream.puts "\t\t<FailuresTotal>#{counts[:failed]}</FailuresTotal>"
|
101
|
-
stream.puts "\t\t<Errors>0</Errors>"
|
102
|
-
stream.puts "\t\t<Failures>#{counts[:failed]}</Failures>"
|
103
|
-
stream.puts "\t</Statistics>"
|
104
|
-
end
|
105
|
-
|
106
|
-
def write_footer( stream )
|
107
|
-
stream.puts "</TestRun>"
|
108
|
-
end
|
109
|
-
|
110
|
-
end
|
Binary file
|
Binary file
|
@@ -1,224 +0,0 @@
|
|
1
|
-
==============
|
2
|
-
Unity Test API
|
3
|
-
==============
|
4
|
-
|
5
|
-
[Copyright (c) 2007 - 2012 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams]
|
6
|
-
|
7
|
-
-------------
|
8
|
-
Running Tests
|
9
|
-
-------------
|
10
|
-
|
11
|
-
RUN_TEST(func, linenum)
|
12
|
-
|
13
|
-
Each Test is run within the macro RUN_TEST. This macro performs necessary setup before the test is called and handles cleanup and result tabulation afterwards.
|
14
|
-
|
15
|
-
--------------
|
16
|
-
Ignoring Tests
|
17
|
-
--------------
|
18
|
-
|
19
|
-
There are times when a test is incomplete or not valid for some reason. At these times, TEST_IGNORE can be called. Control will immediately be returned to the caller of the test, and no failures will be returned.
|
20
|
-
|
21
|
-
TEST_IGNORE()
|
22
|
-
|
23
|
-
Ignore this test and return immediately
|
24
|
-
|
25
|
-
TEST_IGNORE_MESSAGE (message)
|
26
|
-
|
27
|
-
Ignore this test and return immediately. Output a message stating why the test was ignored.
|
28
|
-
|
29
|
-
--------------
|
30
|
-
Aborting Tests
|
31
|
-
--------------
|
32
|
-
|
33
|
-
There are times when a test will contain an infinite loop on error conditions, or there may be reason to escape from the test early without executing the rest of the test. A pair of macros support this functionality in Unity. The first (TEST_PROTECT) sets up the feature, and handles emergency abort cases. TEST_ABORT can then be used at any time within the tests to return to the last TEST_PROTECT call.
|
34
|
-
|
35
|
-
TEST_PROTECT()
|
36
|
-
|
37
|
-
Setup and Catch macro
|
38
|
-
|
39
|
-
TEST_ABORT()
|
40
|
-
|
41
|
-
Abort Test macro
|
42
|
-
|
43
|
-
Example:
|
44
|
-
|
45
|
-
main()
|
46
|
-
{
|
47
|
-
if (TEST_PROTECT() == 0)
|
48
|
-
{
|
49
|
-
MyTest();
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
|
-
If MyTest calls TEST_ABORT, program control will immediately return to TEST_PROTECT with a non-zero return value.
|
54
|
-
|
55
|
-
|
56
|
-
=======================
|
57
|
-
Unity Assertion Summary
|
58
|
-
=======================
|
59
|
-
|
60
|
-
--------------------
|
61
|
-
Basic Validity Tests
|
62
|
-
--------------------
|
63
|
-
|
64
|
-
TEST_ASSERT_TRUE(condition)
|
65
|
-
|
66
|
-
Evaluates whatever code is in condition and fails if it evaluates to false
|
67
|
-
|
68
|
-
TEST_ASSERT_FALSE(condition)
|
69
|
-
|
70
|
-
Evaluates whatever code is in condition and fails if it evaluates to true
|
71
|
-
|
72
|
-
TEST_ASSERT(condition)
|
73
|
-
|
74
|
-
Another way of calling TEST_ASSERT_TRUE
|
75
|
-
|
76
|
-
TEST_ASSERT_UNLESS(condition)
|
77
|
-
|
78
|
-
Another way of calling TEST_ASSERT_FALSE
|
79
|
-
|
80
|
-
TEST_FAIL()
|
81
|
-
TEST_FAIL_MESSAGE(message)
|
82
|
-
|
83
|
-
This test is automatically marked as a failure. The message is output stating why.
|
84
|
-
|
85
|
-
------------------------------
|
86
|
-
Numerical Assertions: Integers
|
87
|
-
------------------------------
|
88
|
-
|
89
|
-
TEST_ASSERT_EQUAL_INT(expected, actual)
|
90
|
-
TEST_ASSERT_EQUAL_INT8(expected, actual)
|
91
|
-
TEST_ASSERT_EQUAL_INT16(expected, actual)
|
92
|
-
TEST_ASSERT_EQUAL_INT32(expected, actual)
|
93
|
-
TEST_ASSERT_EQUAL_INT64(expected, actual)
|
94
|
-
|
95
|
-
Compare two integers for equality and display errors as signed integers. A cast will be performed
|
96
|
-
to your natural integer size so often this can just be used. When you need to specify the exact size,
|
97
|
-
like when comparing arrays, you can use a specific version:
|
98
|
-
|
99
|
-
TEST_ASSERT_EQUAL_UINT(expected, actual)
|
100
|
-
TEST_ASSERT_EQUAL_UINT8(expected, actual)
|
101
|
-
TEST_ASSERT_EQUAL_UINT16(expected, actual)
|
102
|
-
TEST_ASSERT_EQUAL_UINT32(expected, actual)
|
103
|
-
TEST_ASSERT_EQUAL_UINT64(expected, actual)
|
104
|
-
|
105
|
-
Compare two integers for equality and display errors as unsigned integers. Like INT, there are
|
106
|
-
variants for different sizes also.
|
107
|
-
|
108
|
-
TEST_ASSERT_EQUAL_HEX(expected, actual)
|
109
|
-
TEST_ASSERT_EQUAL_HEX8(expected, actual)
|
110
|
-
TEST_ASSERT_EQUAL_HEX16(expected, actual)
|
111
|
-
TEST_ASSERT_EQUAL_HEX32(expected, actual)
|
112
|
-
TEST_ASSERT_EQUAL_HEX64(expected, actual)
|
113
|
-
|
114
|
-
Compares two integers for equality and display errors as hexadecimal. Like the other integer comparisons,
|
115
|
-
you can specify the size... here the size will also effect how many nibbles are shown (for example, HEX16
|
116
|
-
will show 4 nibbles).
|
117
|
-
|
118
|
-
_ARRAY
|
119
|
-
|
120
|
-
You can append _ARRAY to any of these macros to make an array comparison of that type. Here you will
|
121
|
-
need to care a bit more about the actual size of the value being checked. You will also specify an
|
122
|
-
additional argument which is the number of elements to compare. For example:
|
123
|
-
|
124
|
-
TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, elements)
|
125
|
-
|
126
|
-
TEST_ASSERT_EQUAL(expected, actual)
|
127
|
-
|
128
|
-
Another way of calling TEST_ASSERT_EQUAL_INT
|
129
|
-
|
130
|
-
TEST_ASSERT_INT_WITHIN(delta, expected, actual)
|
131
|
-
|
132
|
-
Asserts that the actual value is within plus or minus delta of the expected value. This also comes in
|
133
|
-
size specific variants.
|
134
|
-
|
135
|
-
|
136
|
-
-----------------------------
|
137
|
-
Numerical Assertions: Bitwise
|
138
|
-
-----------------------------
|
139
|
-
|
140
|
-
TEST_ASSERT_BITS(mask, expected, actual)
|
141
|
-
|
142
|
-
Use an integer mask to specify which bits should be compared between two other integers. High bits in the mask are compared, low bits ignored.
|
143
|
-
|
144
|
-
TEST_ASSERT_BITS_HIGH(mask, actual)
|
145
|
-
|
146
|
-
Use an integer mask to specify which bits should be inspected to determine if they are all set high. High bits in the mask are compared, low bits ignored.
|
147
|
-
|
148
|
-
TEST_ASSERT_BITS_LOW(mask, actual)
|
149
|
-
|
150
|
-
Use an integer mask to specify which bits should be inspected to determine if they are all set low. High bits in the mask are compared, low bits ignored.
|
151
|
-
|
152
|
-
TEST_ASSERT_BIT_HIGH(bit, actual)
|
153
|
-
|
154
|
-
Test a single bit and verify that it is high. The bit is specified 0-31 for a 32-bit integer.
|
155
|
-
|
156
|
-
TEST_ASSERT_BIT_LOW(bit, actual)
|
157
|
-
|
158
|
-
Test a single bit and verify that it is low. The bit is specified 0-31 for a 32-bit integer.
|
159
|
-
|
160
|
-
----------------------------
|
161
|
-
Numerical Assertions: Floats
|
162
|
-
----------------------------
|
163
|
-
|
164
|
-
TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual)
|
165
|
-
|
166
|
-
Asserts that the actual value is within plus or minus delta of the expected value.
|
167
|
-
|
168
|
-
TEST_ASSERT_EQUAL_FLOAT(expected, actual)
|
169
|
-
TEST_ASSERT_EQUAL_DOUBLE(expected, actual)
|
170
|
-
|
171
|
-
Asserts that two floating point values are "equal" within a small % delta of the expected value.
|
172
|
-
|
173
|
-
-----------------
|
174
|
-
String Assertions
|
175
|
-
-----------------
|
176
|
-
|
177
|
-
TEST_ASSERT_EQUAL_STRING(expected, actual)
|
178
|
-
|
179
|
-
Compare two null-terminate strings. Fail if any character is different or if the lengths are different.
|
180
|
-
|
181
|
-
TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len)
|
182
|
-
|
183
|
-
Compare two strings. Fail if any character is different, stop comparing after len characters.
|
184
|
-
|
185
|
-
TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message)
|
186
|
-
|
187
|
-
Compare two null-terminate strings. Fail if any character is different or if the lengths are different. Output a custom message on failure.
|
188
|
-
|
189
|
-
TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message)
|
190
|
-
|
191
|
-
Compare two strings. Fail if any character is different, stop comparing after len characters. Output a custom message on failure.
|
192
|
-
|
193
|
-
------------------
|
194
|
-
Pointer Assertions
|
195
|
-
------------------
|
196
|
-
|
197
|
-
Most pointer operations can be performed by simply using the integer comparisons above. However, a couple of special cases are added for clarity.
|
198
|
-
|
199
|
-
TEST_ASSERT_NULL(pointer)
|
200
|
-
|
201
|
-
Fails if the pointer is not equal to NULL
|
202
|
-
|
203
|
-
TEST_ASSERT_NOT_NULL(pointer)
|
204
|
-
|
205
|
-
Fails if the pointer is equal to NULL
|
206
|
-
|
207
|
-
|
208
|
-
-----------------
|
209
|
-
Memory Assertions
|
210
|
-
-----------------
|
211
|
-
|
212
|
-
TEST_ASSERT_EQUAL_MEMORY(expected, actual, len)
|
213
|
-
|
214
|
-
Compare two blocks of memory. This is a good generic assertion for types that can't be coerced into acting like
|
215
|
-
standard types... but since it's a memory compare, you have to be careful that your data types are packed.
|
216
|
-
|
217
|
-
--------
|
218
|
-
_MESSAGE
|
219
|
-
--------
|
220
|
-
|
221
|
-
you can append _MESSAGE to any of the macros to make them take an additional argument. This argument
|
222
|
-
is a string that will be printed at the end of the failure strings. This is useful for specifying more
|
223
|
-
information about the problem.
|
224
|
-
|
@@ -1,51 +0,0 @@
|
|
1
|
-
// This is just a sample test file to be used to test the generator script
|
2
|
-
#ifndef TEST_SAMPLE_H
|
3
|
-
#define TEST_SAMPLE_H
|
4
|
-
|
5
|
-
#include <setjmp.h>
|
6
|
-
#include "unity.h"
|
7
|
-
#include "funky.h"
|
8
|
-
#include "Mockstanky.h"
|
9
|
-
|
10
|
-
void setUp(void)
|
11
|
-
{
|
12
|
-
CustomSetupStuff();
|
13
|
-
}
|
14
|
-
|
15
|
-
void tearDown(void)
|
16
|
-
{
|
17
|
-
CustomTeardownStuff
|
18
|
-
}
|
19
|
-
|
20
|
-
//Yup, nice comment
|
21
|
-
void test_TheFirstThingToTest(void)
|
22
|
-
{
|
23
|
-
TEST_ASSERT(1);
|
24
|
-
|
25
|
-
TEST_ASSERT_TRUE(1);
|
26
|
-
}
|
27
|
-
|
28
|
-
/*
|
29
|
-
void test_ShouldBeIgnored(void)
|
30
|
-
{
|
31
|
-
DoesStuff();
|
32
|
-
}
|
33
|
-
*/
|
34
|
-
|
35
|
-
//void test_ShouldAlsoNotBeTested(void)
|
36
|
-
//{
|
37
|
-
// Call_An_Expect();
|
38
|
-
//
|
39
|
-
// CallAFunction();
|
40
|
-
// test_CallAFunctionThatLooksLikeATest();
|
41
|
-
//}
|
42
|
-
|
43
|
-
void test_TheSecondThingToTest(void)
|
44
|
-
{
|
45
|
-
Call_An_Expect();
|
46
|
-
|
47
|
-
CallAFunction();
|
48
|
-
test_CallAFunctionThatLooksLikeATest();
|
49
|
-
}
|
50
|
-
|
51
|
-
#endif //TEST_SAMPLE_H
|