ceedling 0.25.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/project_as_gem.yml +13 -0
- data/assets/project_with_guts.yml +13 -0
- data/bin/ceedling +91 -67
- data/docs/CeedlingPacket.md +61 -23
- data/docs/CeedlingPacket.odt +0 -0
- data/docs/CeedlingPacket.pdf +0 -0
- data/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/examples/temp_sensor/test/TestTemperatureCalculator.c +4 -1
- data/lib/ceedling/configurator.rb +14 -1
- data/lib/ceedling/configurator_builder.rb +2 -1
- data/lib/ceedling/configurator_validator.rb +12 -3
- data/lib/ceedling/constants.rb +3 -1
- data/lib/ceedling/defaults.rb +12 -1
- data/lib/ceedling/file_finder.rb +3 -0
- data/lib/ceedling/file_path_utils.rb +1 -1
- data/lib/ceedling/file_wrapper.rb +4 -4
- data/lib/ceedling/generator.rb +12 -3
- data/lib/ceedling/preprocessinator_helper.rb +5 -5
- data/lib/ceedling/preprocessinator_includes_handler.rb +10 -1
- data/lib/ceedling/project_config_manager.rb +1 -2
- data/lib/ceedling/project_file_loader.rb +27 -9
- data/lib/ceedling/rakefile.rb +6 -6
- data/lib/ceedling/release_invoker.rb +21 -6
- data/lib/ceedling/rules_release.rake +9 -5
- data/lib/ceedling/rules_tests.rake +6 -1
- data/lib/ceedling/setupinator.rb +1 -0
- data/lib/ceedling/tasks_base.rake +3 -0
- data/lib/ceedling/tasks_filesystem.rake +10 -7
- data/lib/ceedling/tasks_release.rake +3 -1
- data/lib/ceedling/test_includes_extractor.rb +16 -12
- data/lib/ceedling/test_invoker.rb +40 -0
- data/lib/ceedling/version.rb +3 -3
- data/lib/ceedling/version.rb.erb +1 -1
- data/plugins/command_hooks/lib/command_hooks.rb +1 -1
- data/plugins/fake_function_framework/examples/fff_example/src/bar.h +1 -0
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +1 -0
- data/plugins/fake_function_framework/lib/fff_mock_generator.rb +4 -0
- data/plugins/fake_function_framework/spec/{fff_mock_generator_spec.rb → fff_mock_header_generator_spec.rb} +34 -194
- data/plugins/fake_function_framework/spec/fff_mock_source_generator_spec.rb +149 -0
- data/plugins/fake_function_framework/spec/header_generator.rb +51 -0
- data/plugins/junit_tests_report/lib/junit_tests_report.rb +115 -0
- data/plugins/subprojects/README.md +63 -0
- data/plugins/subprojects/config/defaults.yml +33 -0
- data/plugins/subprojects/lib/subprojects.rb +92 -0
- data/plugins/subprojects/subprojects.rake +78 -0
- data/spec/preprocessinator_includes_handler_spec.rb +15 -5
- data/spec/spec_helper.rb +2 -2
- data/spec/spec_system_helper.rb +49 -1
- data/spec/system/deployment_spec.rb +29 -0
- data/vendor/c_exception/README.md +8 -2
- data/vendor/c_exception/docs/{readme.txt → CException.md} +133 -102
- data/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/c_exception/vendor/unity/README.md +19 -10
- data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/c_exception/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/c_exception/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/c_exception/vendor/unity/src/unity.c +396 -330
- data/vendor/c_exception/vendor/unity/src/unity.h +50 -4
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/c_exception/vendor/unity/test/Makefile +17 -17
- data/vendor/c_exception/vendor/unity/test/rakefile +63 -3
- data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/c_exception/vendor/unity/test/tests/testunity.c +1338 -151
- data/vendor/cmock/README.md +10 -1
- data/vendor/cmock/config/test_environment.rb +7 -7
- data/vendor/cmock/docs/CMock_Summary.md +325 -128
- data/vendor/cmock/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/examples/make_example/Makefile +2 -2
- data/vendor/cmock/examples/temp_sensor/gcc.yml +5 -4
- data/vendor/cmock/examples/temp_sensor/iar_v4.yml +5 -4
- data/vendor/cmock/examples/temp_sensor/iar_v5.yml +5 -4
- data/vendor/cmock/examples/temp_sensor/rakefile.rb +11 -1
- data/vendor/cmock/examples/temp_sensor/rakefile_helper.rb +12 -10
- data/vendor/cmock/lib/cmock.rb +0 -3
- data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +6 -2
- data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +2 -1
- data/vendor/cmock/lib/cmock_header_parser.rb +5 -6
- data/vendor/cmock/release/version.info +1 -1
- data/vendor/cmock/scripts/create_makefile.rb +4 -2
- data/vendor/cmock/scripts/test_summary.rb +17 -9
- data/vendor/cmock/src/cmock.c +1 -0
- data/vendor/cmock/src/cmock.h +1 -1
- data/vendor/cmock/src/cmock_internals.h +14 -1
- data/vendor/cmock/test/c/TestCMockC.yml +4 -4
- data/vendor/cmock/test/c/TestCMockCDynamic.yml +4 -4
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_FLASH.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_RAM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/SAM7_SIM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/at91SAM7X256_FLASH.xcl +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/at91SAM7X256_RAM.xcl +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/Resource/ioat91sam7x256.ddf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.dep +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.ewd +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.ewp +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/cmock_demo.eww +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X-EK.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.inc +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.rdf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256.tcl +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/AT91SAM7X256_inc.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/ioat91sam7x256.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/incIAR/lib_AT91SAM7X256.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.cspy.bat +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.dbgdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.dni +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/settings/cmock_demo.wsdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/srcIAR/Cstartup.s79 +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v4/srcIAR/Cstartup_SAM7.c +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_FLASH.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_RAM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/SAM7_SIM.mac +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/at91SAM7X256_FLASH.icf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/Resource/at91SAM7X256_RAM.icf +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.dep +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.ewd +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.ewp +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/cmock_demo.eww +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/AT91SAM7X-EK.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/AT91SAM7X256_inc.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/lib_AT91SAM7X256.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/incIAR/project.h +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.dbgdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.dni +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X.wsdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.cspy.bat +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.dbgdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.dni +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo.wsdt +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_Binary.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/settings/cmock_demo_RAM_Debug.jlink +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/srcIAR/Cstartup.s +0 -0
- data/vendor/cmock/{iar → test/iar}/iar_v5/srcIAR/Cstartup_SAM7.c +0 -0
- data/vendor/cmock/{Rakefile → test/rakefile} +9 -9
- data/vendor/cmock/{rakefile_helper.rb → test/rakefile_helper.rb} +13 -13
- data/vendor/cmock/test/system/test_compilation/config.yml +4 -4
- data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +2 -0
- data/vendor/cmock/{targets → test/targets}/clang_strict.yml +11 -11
- data/vendor/cmock/{targets → test/targets}/gcc.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/gcc_64.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/gcc_tiny.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/iar_arm_v4.yml +9 -9
- data/vendor/cmock/{targets → test/targets}/iar_arm_v5.yml +10 -10
- data/vendor/cmock/test/test_helper.rb +4 -8
- data/vendor/cmock/test/unit/cmock_config_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_file_writer_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +3 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +1 -1
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +15 -2
- data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +6 -10
- data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +1 -1
- data/vendor/cmock/vendor/c_exception/README.md +8 -2
- data/vendor/cmock/vendor/c_exception/docs/{readme.txt → CException.md} +133 -102
- data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/README.md +19 -10
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/cmock/vendor/c_exception/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.c +396 -330
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity.h +50 -4
- data/vendor/cmock/vendor/c_exception/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/Makefile +17 -17
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile +63 -3
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/cmock/vendor/c_exception/vendor/unity/test/tests/testunity.c +1338 -151
- data/vendor/cmock/vendor/unity/README.md +19 -10
- data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/cmock/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/cmock/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/cmock/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/cmock/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/cmock/vendor/unity/release/version.info +1 -1
- data/vendor/cmock/vendor/unity/src/unity.c +396 -330
- data/vendor/cmock/vendor/unity/src/unity.h +50 -4
- data/vendor/cmock/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/cmock/vendor/unity/test/Makefile +17 -17
- data/vendor/cmock/vendor/unity/test/rakefile +63 -3
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +1338 -151
- data/vendor/deep_merge/Rakefile +1 -1
- data/vendor/unity/README.md +19 -10
- data/vendor/unity/auto/colour_prompt.rb +67 -64
- data/vendor/unity/auto/colour_reporter.rb +20 -20
- data/vendor/unity/auto/generate_module.rb +149 -142
- data/vendor/unity/auto/generate_test_runner.rb +234 -232
- data/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/unity/auto/stylize_as_junit.rb +108 -120
- data/vendor/unity/auto/test_file_filter.rb +11 -9
- data/vendor/unity/auto/type_sanitizer.rb +1 -3
- data/vendor/unity/auto/unity_test_summary.py +6 -2
- data/vendor/unity/auto/unity_test_summary.rb +45 -57
- data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/unity/docs/UnityAssertionsReference.md +716 -0
- data/vendor/unity/docs/UnityConfigurationGuide.md +398 -0
- data/vendor/unity/docs/UnityGettingStartedGuide.md +191 -0
- data/vendor/unity/docs/UnityHelperScriptsGuide.md +242 -0
- data/vendor/unity/examples/example_1/makefile +22 -17
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +1 -1
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +1 -1
- data/vendor/unity/examples/example_2/makefile +16 -17
- data/vendor/unity/examples/example_3/rakefile.rb +15 -15
- data/vendor/unity/examples/example_3/rakefile_helper.rb +93 -100
- data/vendor/unity/examples/example_3/readme.txt +4 -10
- data/vendor/unity/examples/unity_config.h +14 -26
- data/vendor/unity/extras/fixture/rakefile.rb +12 -12
- data/vendor/unity/extras/fixture/rakefile_helper.rb +87 -88
- data/vendor/unity/extras/fixture/src/unity_fixture.c +15 -8
- data/vendor/unity/extras/fixture/src/unity_fixture.h +6 -1
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +3 -0
- data/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +1 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +1 -1
- data/vendor/unity/release/version.info +1 -1
- data/vendor/unity/src/unity.c +396 -330
- data/vendor/unity/src/unity.h +50 -4
- data/vendor/unity/src/unity_internals.h +119 -84
- data/vendor/unity/test/Makefile +17 -17
- data/vendor/unity/test/rakefile +63 -3
- data/vendor/unity/test/rakefile_helper.rb +108 -105
- data/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -0
- data/vendor/unity/test/targets/clang_file.yml +0 -6
- data/vendor/unity/test/targets/clang_strict.yml +1 -9
- data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +2 -0
- data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +2 -2
- data/vendor/unity/test/tests/test_generate_test_runner.rb +5 -5
- data/vendor/unity/test/tests/testunity.c +1338 -151
- metadata +102 -157
- data/test_graveyard/integration/paths.yml +0 -17
- data/test_graveyard/integration/paths_test.rb +0 -80
- data/test_graveyard/integration/rake_rules_aux_dependencies_test.rb +0 -75
- data/test_graveyard/integration/rake_rules_cmock_test.rb +0 -74
- data/test_graveyard/integration/rake_rules_preprocess_test.rb +0 -178
- data/test_graveyard/integration/rake_rules_test.rb +0 -268
- data/test_graveyard/integration/rake_tasks_test.rb +0 -103
- data/test_graveyard/integration_test_helper.rb +0 -34
- data/test_graveyard/rakefile_rules.rb +0 -10
- data/test_graveyard/rakefile_rules_aux_dependencies.rb +0 -10
- data/test_graveyard/rakefile_rules_cmock.rb +0 -10
- data/test_graveyard/rakefile_rules_preprocess.rb +0 -10
- data/test_graveyard/rakefile_tasks.rb +0 -10
- data/test_graveyard/system/file_system_dependencies.yml +0 -20
- data/test_graveyard/system/file_system_kitchen_sink.yml +0 -20
- data/test_graveyard/system/file_system_mocks.yml +0 -20
- data/test_graveyard/system/file_system_preprocess.yml +0 -20
- data/test_graveyard/system/file_system_simple.yml +0 -20
- data/test_graveyard/system/file_system_test.rb +0 -78
- data/test_graveyard/system/mocks/include/a_file.h +0 -2
- data/test_graveyard/system/mocks/include/other_stuff.h +0 -2
- data/test_graveyard/system/mocks/include/stuff.h +0 -3
- data/test_graveyard/system/mocks/source/a_file.c +0 -9
- data/test_graveyard/system/mocks/test/test_a_file.c +0 -41
- data/test_graveyard/system/mocks/test/test_no_file.c +0 -14
- data/test_graveyard/system/project_mocks.yml +0 -43
- data/test_graveyard/system/project_mocks_test.rb +0 -38
- data/test_graveyard/system/project_simple.yml +0 -36
- data/test_graveyard/system/project_simple_test.rb +0 -39
- data/test_graveyard/system/rule_mocks_test.rb +0 -44
- data/test_graveyard/system/rule_runners_test.rb +0 -44
- data/test_graveyard/system/simple/include/other_stuff.h +0 -2
- data/test_graveyard/system/simple/include/stuff.h +0 -3
- data/test_graveyard/system/simple/source/other_stuff.c +0 -6
- data/test_graveyard/system/simple/source/stuff.c +0 -7
- data/test_graveyard/system/simple/test/test_other_stuff.c +0 -30
- data/test_graveyard/system/simple/test/test_stuff.c +0 -51
- data/test_graveyard/system_test_helper.rb +0 -73
- data/test_graveyard/test_helper.rb +0 -93
- data/test_graveyard/unit/busted/configurator_builder_test.rb +0 -569
- data/test_graveyard/unit/busted/configurator_helper_test.rb +0 -234
- data/test_graveyard/unit/busted/configurator_test.rb +0 -232
- data/test_graveyard/unit/busted/configurator_validator_test.rb +0 -169
- data/test_graveyard/unit/busted/deep_merge_fix_test.rb +0 -55
- data/test_graveyard/unit/busted/dependinator_test.rb +0 -129
- data/test_graveyard/unit/busted/file_finder_helper_test.rb +0 -45
- data/test_graveyard/unit/busted/file_finder_test.rb +0 -114
- data/test_graveyard/unit/busted/file_path_utils_test.rb +0 -97
- data/test_graveyard/unit/busted/file_system_utils_test.rb +0 -21
- data/test_graveyard/unit/busted/generator_test.rb +0 -187
- data/test_graveyard/unit/busted/generator_test_results_test.rb +0 -129
- data/test_graveyard/unit/busted/generator_test_runner_test.rb +0 -475
- data/test_graveyard/unit/busted/preprocessinator_file_handler_test.rb +0 -39
- data/test_graveyard/unit/busted/preprocessinator_helper_test.rb +0 -156
- data/test_graveyard/unit/busted/preprocessinator_includes_handler_test.rb +0 -93
- data/test_graveyard/unit/busted/preprocessinator_test.rb +0 -57
- data/test_graveyard/unit/busted/project_file_loader_test.rb +0 -142
- data/test_graveyard/unit/busted/setupinator_test.rb +0 -45
- data/test_graveyard/unit/busted/streaminator_test.rb +0 -49
- data/test_graveyard/unit/busted/task_invoker_test.rb +0 -69
- data/test_graveyard/unit/busted/test_includes_extractor_test.rb +0 -111
- data/test_graveyard/unit/busted/test_invoker_helper_test.rb +0 -62
- data/test_graveyard/unit/busted/test_invoker_test.rb +0 -47
- data/test_graveyard/unit/busted/tool_executor_helper_test.rb +0 -100
- data/test_graveyard/unit/busted/tool_executor_test.rb +0 -351
- data/test_graveyard/unit/busted/verbosinator_test.rb +0 -65
- data/test_graveyard/unit/preprocessinator_extractor_test.rb +0 -731
- data/test_graveyard/unit_test_helper.rb +0 -16
- data/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/c_exception/vendor/unity/auto/parseOutput.rb +0 -191
- 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/cmock/docs/CMock Summary.odt +0 -0
- data/vendor/cmock/docs/CMock Summary.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
- data/vendor/cmock/vendor/c_exception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/cmock/vendor/c_exception/vendor/unity/auto/parseOutput.rb +0 -191
- 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/unity/auto/parseOutput.rb +0 -191
- 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/unity/auto/parseOutput.rb +0 -191
- 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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
compiler:
|
|
3
3
|
path: gcc
|
|
4
|
-
source_path: &systest_generated_path '
|
|
5
|
-
unit_tests_path: &unit_tests_path 'examples/test/'
|
|
6
|
-
mocks_path: &systest_mocks_path '
|
|
7
|
-
build_path: &systest_build_path '
|
|
4
|
+
source_path: &systest_generated_path './system/generated/'
|
|
5
|
+
unit_tests_path: &unit_tests_path '../examples/test/'
|
|
6
|
+
mocks_path: &systest_mocks_path './system/generated/'
|
|
7
|
+
build_path: &systest_build_path './system/build/'
|
|
8
8
|
options:
|
|
9
9
|
- '-c'
|
|
10
10
|
- '-m64'
|
|
@@ -20,11 +20,11 @@ compiler:
|
|
|
20
20
|
- *systest_generated_path
|
|
21
21
|
- *unit_tests_path
|
|
22
22
|
- *systest_mocks_path
|
|
23
|
-
- 'src/'
|
|
24
|
-
- 'vendor/unity/src/'
|
|
25
|
-
- 'vendor/c_exception/lib/'
|
|
26
|
-
- '
|
|
27
|
-
- '
|
|
23
|
+
- '../src/'
|
|
24
|
+
- '../vendor/unity/src/'
|
|
25
|
+
- '../vendor/c_exception/lib/'
|
|
26
|
+
- './system/test_compilation/'
|
|
27
|
+
- './'
|
|
28
28
|
defines:
|
|
29
29
|
prefix: '-D'
|
|
30
30
|
items:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
compiler:
|
|
3
3
|
path: gcc
|
|
4
|
-
source_path: &systest_generated_path '
|
|
5
|
-
unit_tests_path: &unit_tests_path 'examples/test/'
|
|
6
|
-
mocks_path: &systest_mocks_path '
|
|
7
|
-
build_path: &systest_build_path '
|
|
4
|
+
source_path: &systest_generated_path './system/generated/'
|
|
5
|
+
unit_tests_path: &unit_tests_path '../examples/test/'
|
|
6
|
+
mocks_path: &systest_mocks_path './system/generated/'
|
|
7
|
+
build_path: &systest_build_path './system/build/'
|
|
8
8
|
options:
|
|
9
9
|
- '-c'
|
|
10
10
|
- '-Wall'
|
|
@@ -21,11 +21,11 @@ compiler:
|
|
|
21
21
|
- *systest_generated_path
|
|
22
22
|
- *unit_tests_path
|
|
23
23
|
- *systest_mocks_path
|
|
24
|
-
- 'src/'
|
|
25
|
-
- 'vendor/unity/src/'
|
|
26
|
-
- 'vendor/c_exception/lib/'
|
|
27
|
-
- '
|
|
28
|
-
- '
|
|
24
|
+
- '../src/'
|
|
25
|
+
- '../vendor/unity/src/'
|
|
26
|
+
- '../vendor/c_exception/lib/'
|
|
27
|
+
- './system/test_compilation/'
|
|
28
|
+
- './'
|
|
29
29
|
defines:
|
|
30
30
|
prefix: '-D'
|
|
31
31
|
items:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 4.0\'
|
|
2
2
|
compiler:
|
|
3
3
|
path: [*tools_root, 'arm\bin\iccarm.exe']
|
|
4
|
-
source_path: &systest_generated_path '
|
|
5
|
-
unit_tests_path: &unit_tests_path 'examples/test/'
|
|
6
|
-
mocks_path: &systest_mocks_path '
|
|
7
|
-
build_path: &systest_build_path '
|
|
4
|
+
source_path: &systest_generated_path './system/generated/'
|
|
5
|
+
unit_tests_path: &unit_tests_path '../examples/test/'
|
|
6
|
+
mocks_path: &systest_mocks_path './system/generated/'
|
|
7
|
+
build_path: &systest_build_path './system/build/'
|
|
8
8
|
options:
|
|
9
9
|
- --dlib_config
|
|
10
10
|
- [*tools_root, 'arm\lib\dl4tptinl8n.h']
|
|
@@ -38,11 +38,11 @@ compiler:
|
|
|
38
38
|
- *systest_generated_path
|
|
39
39
|
- *unit_tests_path
|
|
40
40
|
- *systest_mocks_path
|
|
41
|
-
- 'src/'
|
|
42
|
-
- 'vendor/unity/src/'
|
|
43
|
-
- 'vendor/c_exception/lib/'
|
|
44
|
-
- '
|
|
45
|
-
- '
|
|
41
|
+
- '../src/'
|
|
42
|
+
- '../vendor/unity/src/'
|
|
43
|
+
- '../vendor/c_exception/lib/'
|
|
44
|
+
- './system/test_compilation/'
|
|
45
|
+
- './'
|
|
46
46
|
defines:
|
|
47
47
|
prefix: '-D'
|
|
48
48
|
items:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 5.3\'
|
|
2
2
|
compiler:
|
|
3
3
|
path: [*tools_root, 'arm\bin\iccarm.exe']
|
|
4
|
-
source_path: &systest_generated_path '
|
|
5
|
-
unit_tests_path: &unit_tests_path 'examples/test/'
|
|
6
|
-
mocks_path: &systest_mocks_path '
|
|
7
|
-
build_path: &systest_build_path '
|
|
4
|
+
source_path: &systest_generated_path './system/generated/'
|
|
5
|
+
unit_tests_path: &unit_tests_path '../examples/test/'
|
|
6
|
+
mocks_path: &systest_mocks_path './system/generated/'
|
|
7
|
+
build_path: &systest_build_path './system/build/'
|
|
8
8
|
options:
|
|
9
9
|
- --dlib_config
|
|
10
10
|
- [*tools_root, 'arm\inc\DLib_Config_Normal.h']
|
|
@@ -36,12 +36,12 @@ compiler:
|
|
|
36
36
|
- *systest_generated_path
|
|
37
37
|
- *unit_tests_path
|
|
38
38
|
- *systest_mocks_path
|
|
39
|
-
- 'src/'
|
|
40
|
-
- 'vendor/unity/src/'
|
|
41
|
-
- 'vendor/c_exception/lib/'
|
|
42
|
-
- '
|
|
43
|
-
- '
|
|
44
|
-
- '
|
|
39
|
+
- '../src/'
|
|
40
|
+
- '../vendor/unity/src/'
|
|
41
|
+
- '../vendor/c_exception/lib/'
|
|
42
|
+
- './system/test_compilation/'
|
|
43
|
+
- './'
|
|
44
|
+
- '.\iar\iar_v5\incIAR\'
|
|
45
45
|
defines:
|
|
46
46
|
prefix: '-D'
|
|
47
47
|
items:
|
|
@@ -15,14 +15,10 @@ end
|
|
|
15
15
|
|
|
16
16
|
def create_stub(funcs)
|
|
17
17
|
stub = Class.new
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
funcs.each_pair {|k,v| blob += "def #{k.to_s}(unused=nil)\n #{v.inspect}\nend\n" }
|
|
23
|
-
blob += "end"
|
|
24
|
-
eval blob
|
|
25
|
-
#end
|
|
18
|
+
blob = "class << stub\n"
|
|
19
|
+
funcs.each_pair {|k,v| blob += "def #{k.to_s}(unused=nil)\n #{v.inspect}\nend\n" }
|
|
20
|
+
blob += "end"
|
|
21
|
+
eval blob
|
|
26
22
|
stub
|
|
27
23
|
end
|
|
28
24
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_file_writer'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_file_writer'
|
|
9
9
|
|
|
10
10
|
describe CMockFileWriter, "Verify CMockFileWriter Module" do
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
$ThisIsOnlyATest = true
|
|
8
8
|
|
|
9
9
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
10
|
-
require 'cmock_generator'
|
|
10
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator'
|
|
11
11
|
|
|
12
12
|
class MockedPluginHelper
|
|
13
13
|
def initialize return_this
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_generator_plugin_array'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_array'
|
|
9
9
|
|
|
10
10
|
describe CMockGeneratorPluginArray, "Verify CMockPGeneratorluginArray Module" do
|
|
11
11
|
before do
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_generator_plugin_callback'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_callback'
|
|
9
9
|
|
|
10
10
|
describe CMockGeneratorPluginCallback, "Verify CMockGeneratorPluginCallback Module" do
|
|
11
11
|
|
|
@@ -14,6 +14,7 @@ describe CMockGeneratorPluginCallback, "Verify CMockGeneratorPluginCallback Modu
|
|
|
14
14
|
|
|
15
15
|
@config.expect :callback_include_count, true
|
|
16
16
|
@config.expect :callback_after_arg_check, false
|
|
17
|
+
@config.expect :plugins, [:ignore]
|
|
17
18
|
|
|
18
19
|
@cmock_generator_plugin_callback = CMockGeneratorPluginCallback.new(@config, @utils)
|
|
19
20
|
end
|
|
@@ -240,6 +241,7 @@ describe CMockGeneratorPluginCallback, "Verify CMockGeneratorPluginCallback Modu
|
|
|
240
241
|
|
|
241
242
|
expected = ["void Lemon_StubWithCallback(CMOCK_Lemon_CALLBACK Callback)\n",
|
|
242
243
|
"{\n",
|
|
244
|
+
" Mock.Lemon_IgnoreBool = (int)0;\n",
|
|
243
245
|
" Mock.Lemon_CallbackFunctionPointer = Callback;\n",
|
|
244
246
|
"}\n\n"
|
|
245
247
|
].join
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_generator_plugin_cexception'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_cexception'
|
|
9
9
|
|
|
10
10
|
describe CMockGeneratorPluginCexception, "Verify CMockGeneratorPluginCexception Module" do
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_generator_plugin_expect'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_expect'
|
|
9
9
|
|
|
10
10
|
describe CMockGeneratorPluginExpect, "Verify CMockGeneratorPluginExpect Module Without Global Ordering" do
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_generator_plugin_expect_any_args.rb'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_expect_any_args.rb'
|
|
9
9
|
|
|
10
10
|
describe CMockGeneratorPluginExpectAnyArgs, "Verify CMockGeneratorPluginExpectAnyArgs Module" do
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_generator_plugin_expect'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_expect'
|
|
9
9
|
|
|
10
10
|
describe CMockGeneratorPluginExpect, "Verify CMockGeneratorPluginExpect Module with Global Ordering" do
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_generator_plugin_ignore_arg'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_ignore_arg'
|
|
9
9
|
|
|
10
10
|
describe CMockGeneratorPluginIgnoreArg, "Verify CMockGeneratorPluginIgnoreArg Module" do
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_generator_plugin_ignore'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_ignore'
|
|
9
9
|
|
|
10
10
|
describe CMockGeneratorPluginIgnore, "Verify CMockGeneratorPluginIgnore Module" do
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_generator_plugin_return_thru_ptr'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_return_thru_ptr'
|
|
9
9
|
|
|
10
10
|
describe CMockGeneratorPluginReturnThruPtr, "Verify CMockGeneratorPluginReturnThruPtr Module" do
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_generator_utils'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_utils'
|
|
9
9
|
|
|
10
10
|
describe CMockGeneratorUtils, "Verify CMockGeneratorUtils Module" do
|
|
11
11
|
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
$ThisIsOnlyATest = true
|
|
8
|
-
$QUICK_RUBY_VERSION = RUBY_VERSION.split('.').inject(0){|vv,v| vv * 100 + v.to_i }
|
|
9
8
|
|
|
10
9
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
11
|
-
require 'cmock_header_parser'
|
|
10
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_header_parser'
|
|
12
11
|
|
|
13
12
|
describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|
14
13
|
|
|
@@ -326,6 +325,18 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|
|
326
325
|
"{\n" +
|
|
327
326
|
" bar((unsigned int) a);\n" +
|
|
328
327
|
" stripme(a);\n" +
|
|
328
|
+
"}\n" +
|
|
329
|
+
"uint32 func_with_decl_c(unsigned int);\n" +
|
|
330
|
+
"uint32 func_with_decl_c(unsigned int a)\n" +
|
|
331
|
+
"{\n" +
|
|
332
|
+
" if(a > 0)\n" +
|
|
333
|
+
" {\n" +
|
|
334
|
+
" return 1;\n" +
|
|
335
|
+
" }\n" +
|
|
336
|
+
" else\n"+
|
|
337
|
+
" {\n" +
|
|
338
|
+
" return 2;\n" +
|
|
339
|
+
" }\n" +
|
|
329
340
|
"}\n"
|
|
330
341
|
|
|
331
342
|
expected =
|
|
@@ -334,6 +345,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|
|
334
345
|
"uint32 func_with_decl_a", #okay. it's not going to be interpretted as another function
|
|
335
346
|
"uint32 func_with_decl_b(unsigned int)",
|
|
336
347
|
"uint32 func_with_decl_b", #okay. it's not going to be interpretted as another function
|
|
348
|
+
"uint32 func_with_decl_c(unsigned int)",
|
|
349
|
+
"uint32 func_with_decl_c", #okay. it's not going to be interpretted as another function
|
|
337
350
|
]
|
|
338
351
|
|
|
339
352
|
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_plugin_manager'
|
|
9
|
-
require 'cmock_generator_plugin_expect'
|
|
10
|
-
require 'cmock_generator_plugin_ignore'
|
|
11
|
-
require 'cmock_generator_plugin_cexception'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_plugin_manager'
|
|
9
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_expect'
|
|
10
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_ignore'
|
|
11
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_generator_plugin_cexception'
|
|
12
12
|
|
|
13
13
|
describe CMockPluginManager, "Verify CMockPluginManager Module" do
|
|
14
14
|
|
|
@@ -21,12 +21,8 @@ describe CMockPluginManager, "Verify CMockPluginManager Module" do
|
|
|
21
21
|
:ignore => :args_and_calls
|
|
22
22
|
)
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# @config.define_singleton_method( :plugins= ){ |val| @plugins = val }
|
|
27
|
-
#else
|
|
28
|
-
eval "class << @config\ndef plugins\n@plugins||[]\nend\ndef plugins=(val)\n@plugins=val\nend\nend\n"
|
|
29
|
-
#end
|
|
24
|
+
eval "class << @config\ndef plugins\n@plugins||[]\nend\ndef plugins=(val)\n@plugins=val\nend\nend\n"
|
|
25
|
+
|
|
30
26
|
end
|
|
31
27
|
|
|
32
28
|
after do
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# ==========================================
|
|
6
6
|
|
|
7
7
|
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
|
8
|
-
require 'cmock_unityhelper_parser'
|
|
8
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_unityhelper_parser'
|
|
9
9
|
|
|
10
10
|
describe CMockUnityHelperParser, "Verify CMockUnityHelperParser Module" do
|
|
11
11
|
|
|
@@ -9,10 +9,16 @@ CException is simple exception handling in C. It is significantly faster than fu
|
|
|
9
9
|
Getting Started
|
|
10
10
|
================
|
|
11
11
|
|
|
12
|
+
The simplest way to get started is to just grab the code and pull it into your project:
|
|
13
|
+
|
|
12
14
|
> git clone --recursive https://github.com/throwtheswitch/cexception.git
|
|
15
|
+
|
|
16
|
+
If you want to contribute to this project, you'll also need to have Ruby installed to run the unit tests. You can automatically
|
|
17
|
+
install all the things you need by doing this:
|
|
18
|
+
|
|
13
19
|
> cd cexception
|
|
14
20
|
> bundle install # Ensures you have all RubyGems needed
|
|
15
|
-
> bundle
|
|
21
|
+
> bundle exec rake # Run CException tests
|
|
16
22
|
|
|
17
23
|
Usage
|
|
18
24
|
=====
|
|
@@ -148,7 +154,7 @@ License
|
|
|
148
154
|
=======
|
|
149
155
|
|
|
150
156
|
*This software is licensed under the MIT License:
|
|
151
|
-
Copyright (c) 2007-
|
|
157
|
+
Copyright (c) 2007-2017 Mark VanderVoord*
|
|
152
158
|
|
|
153
159
|
*Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
154
160
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.*
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
CException
|
|
3
|
-
|
|
3
|
+
==========
|
|
4
4
|
|
|
5
5
|
CException is a basic exception framework for C, suitable for use in
|
|
6
6
|
embedded applications. It provides an exception framework similar in
|
|
7
7
|
use to C++, but with much less overhead.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
CException uses C standard library functions `setjmp` and `longjmp` to
|
|
10
11
|
operate. As long as the target system has these two functions defined,
|
|
11
12
|
this library should be useable with very little configuration. It
|
|
12
13
|
even supports environments where multiple program flows are in use,
|
|
13
14
|
such as real-time operating systems.
|
|
14
15
|
|
|
16
|
+
|
|
15
17
|
There are about a gabillion exception frameworks using a similar
|
|
16
18
|
setjmp/longjmp method out there... and there will probably be more
|
|
17
19
|
in the future. Unfortunately, when we started our last embedded
|
|
@@ -19,142 +21,149 @@ project, all those that existed either (a) did not support multiple
|
|
|
19
21
|
tasks (therefore multiple stacks) or (b) were way more complex than
|
|
20
22
|
we really wanted. CException was born.
|
|
21
23
|
|
|
22
|
-
Why use CException?
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
*Why use CException?*
|
|
26
|
+
|
|
25
27
|
|
|
28
|
+
0. It's ANSI C, and it beats passing error codes around.
|
|
26
29
|
1. You want something simple... CException throws a single id. You can
|
|
27
30
|
define those ID's to be whatever you like. You might even choose which
|
|
28
31
|
type that number is for your project. But that's as far as it goes.
|
|
29
32
|
We weren't interested in passing objects or structs or strings...
|
|
30
33
|
just simple error codes.
|
|
31
|
-
|
|
32
34
|
2. Performance... CException can be configured for single tasking or
|
|
33
35
|
multitasking. In single tasking, there is very little overhead past
|
|
34
36
|
the setjmp/longjmp calls (which are already fast). In multitasking,
|
|
35
37
|
your only additional overhead is the time it takes you to determine
|
|
36
38
|
a unique task id 0 - num_tasks.
|
|
37
39
|
|
|
38
|
-
For the latest version, go to http://cexception.sourceforge.net
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
For the latest version, go to [ThrowTheSwitch.org](http://throwtheswitch.org)
|
|
42
|
+
|
|
43
|
+
|
|
41
44
|
CONTENTS OF THIS DOCUMENT
|
|
42
|
-
|
|
45
|
+
=========================
|
|
46
|
+
|
|
47
|
+
* Usage
|
|
48
|
+
* Limitations
|
|
49
|
+
*API
|
|
50
|
+
* Configuration
|
|
51
|
+
* Testing
|
|
52
|
+
* License
|
|
43
53
|
|
|
44
|
-
Usage
|
|
45
|
-
Limitations
|
|
46
|
-
API
|
|
47
|
-
Configuration
|
|
48
|
-
Testing
|
|
49
|
-
License
|
|
50
54
|
|
|
51
|
-
--------------------------------------------------------------------
|
|
52
55
|
Usage
|
|
53
|
-
|
|
56
|
+
-----
|
|
54
57
|
|
|
55
|
-
Code that is to be protected are wrapped in Try { } Catch { } blocks.
|
|
58
|
+
Code that is to be protected are wrapped in `Try { } Catch { }` blocks.
|
|
56
59
|
The code directly following the Try call is "protected", meaning that
|
|
57
60
|
if any Throws occur, program control is directly transferred to the
|
|
58
61
|
start of the Catch block.
|
|
59
62
|
|
|
63
|
+
|
|
60
64
|
A numerical exception ID is included with Throw, and is made accessible
|
|
61
65
|
from the Catch block.
|
|
62
66
|
|
|
67
|
+
|
|
63
68
|
Throws can occur from within function calls (nested as deeply as you
|
|
64
69
|
like) or directly from within the function itself.
|
|
65
70
|
|
|
66
|
-
|
|
71
|
+
|
|
72
|
+
|
|
67
73
|
Limitations
|
|
68
|
-
|
|
74
|
+
-----------
|
|
75
|
+
|
|
69
76
|
|
|
70
77
|
This library was made to be as fast as possible, and provide basic
|
|
71
78
|
exception handling. It is not a full-blown exception library. Because
|
|
72
79
|
of this, there are a few limitations that should be observed in order
|
|
73
80
|
to successfully utilize this library:
|
|
74
81
|
|
|
75
|
-
1. Do not directly "return" from within a Try block, nor
|
|
76
|
-
into or out of a Try block.
|
|
82
|
+
1. Do not directly "return" from within a `Try` block, nor `goto`
|
|
83
|
+
into or out of a `Try` block.
|
|
77
84
|
|
|
78
|
-
Why
|
|
85
|
+
*Why?*
|
|
79
86
|
|
|
80
|
-
The
|
|
81
|
-
pointer. These are cleaned up at the top of the
|
|
87
|
+
The `Try` macro allocates some local memory and alters a global
|
|
88
|
+
pointer. These are cleaned up at the top of the `Catch` macro.
|
|
82
89
|
Gotos and returns would bypass some of these steps, resulting in
|
|
83
90
|
memory leaks or unpredictable behavior.
|
|
84
91
|
|
|
85
|
-
|
|
92
|
+
|
|
93
|
+
2. If (a) you change local (stack) variables within your `Try` block,
|
|
86
94
|
AND (b) wish to make use of the updated values after an exception
|
|
87
|
-
is thrown, those variables should be made volatile
|
|
95
|
+
is thrown, those variables should be made `volatile`. Note that this
|
|
88
96
|
is ONLY for locals and ONLY when you need access to them after a
|
|
89
|
-
|
|
97
|
+
`Throw`.
|
|
90
98
|
|
|
91
|
-
Why
|
|
99
|
+
*Why?*
|
|
92
100
|
|
|
93
101
|
Compilers optimize. There is no way to guarantee that the actual
|
|
94
102
|
memory location was updated and not just a register unless the
|
|
95
103
|
variable is marked volatile.
|
|
96
104
|
|
|
97
|
-
|
|
105
|
+
|
|
106
|
+
3. Memory which is `malloc`'d or `new`'d is not automatically released
|
|
98
107
|
when an error is thrown. This will sometimes be desirable, and
|
|
99
|
-
othertimes may not. It will be the responsibility of the Catch
|
|
108
|
+
othertimes may not. It will be the responsibility of the `Catch`
|
|
100
109
|
block to perform this kind of cleanup.
|
|
101
110
|
|
|
102
|
-
Why
|
|
111
|
+
*Why?*
|
|
103
112
|
|
|
104
|
-
There's just no easy way to track malloc'd memory, etc., without
|
|
113
|
+
There's just no easy way to track `malloc`'d memory, etc., without
|
|
105
114
|
replacing or wrapping malloc calls or something like that. This
|
|
106
115
|
is a light framework, so these options were not desirable.
|
|
107
116
|
|
|
108
|
-
--------------------------------------------------------------------
|
|
109
|
-
API
|
|
110
|
-
--------------------------------------------------------------------
|
|
111
117
|
|
|
112
|
-
|
|
118
|
+
|
|
119
|
+
API
|
|
113
120
|
---
|
|
114
121
|
|
|
115
|
-
Try
|
|
122
|
+
###Try
|
|
123
|
+
|
|
124
|
+
`Try` is a macro which starts a protected block. It MUST be followed by
|
|
116
125
|
a pair of braces or a single protected line (similar to an 'if'),
|
|
117
|
-
enclosing the data that is to be protected. It
|
|
118
|
-
Catch block (don't worry, you'll get compiler errors to let you know if
|
|
126
|
+
enclosing the data that is to be protected. It **must** be followed by a
|
|
127
|
+
`Catch` block (don't worry, you'll get compiler errors to let you know if
|
|
119
128
|
you mess any of that up).
|
|
120
129
|
|
|
121
|
-
Catch(e)
|
|
122
|
-
--------
|
|
123
130
|
|
|
124
|
-
Catch
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
131
|
+
###Catch(e)
|
|
132
|
+
|
|
133
|
+
`Catch` is a macro which ends the `Try` block and starts the error handling
|
|
134
|
+
block. The `Catch` block is called if and only if an exception was thrown
|
|
135
|
+
while within the `Try` block. This error was thrown by a `Throw` call
|
|
136
|
+
somewhere within `Try` (or within a function called within `Try`, or a function
|
|
137
|
+
called by a function called within `Try`, etc).
|
|
129
138
|
|
|
130
|
-
The single parameter
|
|
139
|
+
The single parameter `e` is filled with the error code which was thrown.
|
|
131
140
|
This can be used for reporting, conditional cleanup, etc. (or you can just
|
|
132
141
|
ignore it if you really want... people ignore return codes all the time,
|
|
133
|
-
right?).
|
|
142
|
+
right?). `e` should be of type `EXCEPTION_T`
|
|
134
143
|
|
|
135
|
-
Throw(e)
|
|
136
|
-
--------
|
|
137
144
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
###Throw(e)
|
|
146
|
+
|
|
147
|
+
This is the method of throwing an error. A `Throw` should only occur from within a
|
|
148
|
+
protected (`Try` ... `Catch`) block, though it may easily be nested many function
|
|
149
|
+
calls deep without an impact on performance or functionality. `Throw` takes
|
|
150
|
+
a single argument, which is an exception id which will be passed to `Catch`
|
|
142
151
|
as the reason for the error.
|
|
143
152
|
|
|
144
|
-
If you wish to
|
|
145
|
-
the error code you just caught. It
|
|
153
|
+
If you wish to rethrow an error, this can be done by calling `Throw(e)` with
|
|
154
|
+
the error code you just caught. It **is** valid to throw from a catch block.
|
|
155
|
+
|
|
146
156
|
|
|
147
|
-
ExitTry()
|
|
148
|
-
---------
|
|
157
|
+
###ExitTry()
|
|
149
158
|
|
|
150
|
-
On rare occasion, you might want to immediately exit your current Try block
|
|
151
|
-
but
|
|
152
|
-
from after the Catch as if nothing had happened... That's what ExitTry is
|
|
159
|
+
On rare occasion, you might want to immediately exit your current `Try` block
|
|
160
|
+
but **not** treat this as an error. Don't run the `Catch`. Just start executing
|
|
161
|
+
from after the `Catch` as if nothing had happened... That's what `ExitTry` is
|
|
153
162
|
for.
|
|
154
163
|
|
|
155
|
-
|
|
164
|
+
|
|
156
165
|
CONFIGURATION
|
|
157
|
-
|
|
166
|
+
-------------
|
|
158
167
|
|
|
159
168
|
CException is a mostly portable library. It has one universal
|
|
160
169
|
dependency, and some macros which are required if working in a
|
|
@@ -172,75 +181,97 @@ multi-tasking environment.
|
|
|
172
181
|
for each protected block and once during a throw. This is the
|
|
173
182
|
only overhead in the system.
|
|
174
183
|
|
|
184
|
+
|
|
175
185
|
Exception.h
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
-----------
|
|
187
|
+
|
|
188
|
+
By convention, most projects include `Exception.h` which defines any
|
|
189
|
+
further requirements, then calls `CException.h` to do the gruntwork. All
|
|
190
|
+
of these are optional. You could directly include `CException.h` if
|
|
180
191
|
you wanted and just use the defaults provided.
|
|
181
192
|
|
|
182
|
-
EXCEPTION_T
|
|
183
|
-
|
|
193
|
+
* `EXCEPTION_T`
|
|
194
|
+
* Set this to the type you want your exception id's to be. Defaults to 'unsigned int'.
|
|
195
|
+
|
|
196
|
+
* `EXCEPTION_NONE`
|
|
197
|
+
* Set this to a number which will never be an exception id in your system. Defaults to `0x5a5a5a5a`.
|
|
184
198
|
|
|
185
|
-
|
|
186
|
-
|
|
199
|
+
* `EXCEPTION_GET_ID`
|
|
200
|
+
* If in a multi-tasking environment, this should be
|
|
201
|
+
set to be a call to the function described in #2 above.
|
|
202
|
+
Defaults to just return `0` all the time (good for
|
|
203
|
+
single tasking environments)
|
|
187
204
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
205
|
+
* `EXCEPTION_NUM_ID`
|
|
206
|
+
* If in a multi-tasking environment, this should be set
|
|
207
|
+
to the number of ID's required (usually the number of
|
|
208
|
+
tasks in the system). Defaults to `1` (for single
|
|
209
|
+
tasking environments).
|
|
192
210
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
211
|
+
* `CEXCEPTION_NO_CATCH_HANDLER(id)`
|
|
212
|
+
* This macro can be optionally specified.
|
|
213
|
+
It allows you to specify code to be called when a Throw
|
|
214
|
+
is made outside of `Try` ... `Catch` protection. Consider
|
|
215
|
+
this the emergency fallback plan for when something has
|
|
216
|
+
gone terribly wrong.
|
|
197
217
|
|
|
198
|
-
CEXCEPTION_NO_CATCH_HANDLER(id) - This macro can be optionally specified.
|
|
199
|
-
It allows you to specify code to be called when a Throw
|
|
200
|
-
is made outside of Try...Catch protection. Consider
|
|
201
|
-
this the emergency fallback plan for when something has
|
|
202
|
-
gone terribly wrong.
|
|
203
218
|
|
|
204
219
|
You may also want to include any header files which will commonly be
|
|
205
220
|
needed by the rest of your application where it uses exception handling
|
|
206
221
|
here. For example, OS header files or exception codes would be useful.
|
|
207
222
|
|
|
223
|
+
|
|
208
224
|
Finally, there are some hook macros which you can implement to inject
|
|
209
225
|
your own target-specific code in particular places. It is a rare instance
|
|
210
226
|
where you will need these, but they are here if you need them:
|
|
211
227
|
|
|
212
|
-
CEXCEPTION_HOOK_START_TRY - called immediately before the Try block
|
|
213
|
-
CEXCEPTION_HOOK_HAPPY_TRY - called immediately after the Try block
|
|
214
|
-
if no exception was thrown
|
|
215
|
-
CEXCEPTION_HOOK_AFTER_TRY - called immediately after the Try block
|
|
216
|
-
OR before an exception is caught
|
|
217
|
-
CEXCEPTION_HOOK_START_CATCH - called immediately before the catch
|
|
218
228
|
|
|
219
|
-
|
|
229
|
+
* `CEXCEPTION_HOOK_START_TRY`
|
|
230
|
+
* called immediately before the Try block
|
|
231
|
+
|
|
232
|
+
* `CEXCEPTION_HOOK_HAPPY_TRY`
|
|
233
|
+
* called immediately after the Try block if no exception was thrown
|
|
234
|
+
|
|
235
|
+
* `CEXCEPTION_HOOK_AFTER_TRY`
|
|
236
|
+
* called immediately after the Try block OR before an exception is caught
|
|
237
|
+
|
|
238
|
+
* `CEXCEPTION_HOOK_START_CATCH`
|
|
239
|
+
* called immediately before the catch
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
220
243
|
TESTING
|
|
221
|
-
|
|
244
|
+
-------
|
|
245
|
+
|
|
222
246
|
|
|
223
247
|
If you want to validate that CException works with your tools or that
|
|
224
248
|
it works with your custom configuration, you may want to run the test
|
|
225
249
|
suite.
|
|
226
250
|
|
|
227
|
-
|
|
251
|
+
|
|
252
|
+
The test suite included makes use of the `Unity` Test Framework. It will
|
|
228
253
|
require a native C compiler. The example makefile uses MinGW's gcc.
|
|
229
|
-
Modify the makefile to include the proper paths to tools, then run
|
|
254
|
+
Modify the makefile to include the proper paths to tools, then run `make`
|
|
230
255
|
to compile and run the test application.
|
|
231
256
|
|
|
232
|
-
C_COMPILER
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
257
|
+
* `C_COMPILER`
|
|
258
|
+
* The C compiler to use to perform the tests
|
|
259
|
+
|
|
260
|
+
* `C_LIBS`
|
|
261
|
+
* The path to the C libraries (including setjmp)
|
|
262
|
+
|
|
263
|
+
* `UNITY_DIR`
|
|
264
|
+
* The path to the Unity framework (required to run tests)
|
|
265
|
+
(get it at [ThrowTheSwitch.org](http://throwtheswitch.org))
|
|
266
|
+
|
|
267
|
+
|
|
236
268
|
|
|
237
|
-
--------------------------------------------------------------------
|
|
238
269
|
LICENSE
|
|
239
|
-
|
|
270
|
+
-------
|
|
240
271
|
|
|
241
272
|
This software is licensed under the MIT License
|
|
242
273
|
|
|
243
|
-
Copyright (c) 2007-
|
|
274
|
+
Copyright (c) 2007-2017 Mark VanderVoord
|
|
244
275
|
|
|
245
276
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
246
277
|
of this software and associated documentation files (the "Software"), to deal
|