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,39 +0,0 @@
|
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
|
2
|
-
require 'ceedling/preprocessinator_file_handler'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class PreprocessinatorFileHandlerTest < Test::Unit::TestCase
|
|
6
|
-
|
|
7
|
-
def setup
|
|
8
|
-
objects = create_mocks(:preprocessinator_extractor, :configurator, :tool_executor, :file_path_utils, :file_wrapper)
|
|
9
|
-
@preprocessinator_file_handler = PreprocessinatorFileHandler.new(objects)
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def teardown
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
should "preprocess a file" do
|
|
17
|
-
create_mock(:tool_config)
|
|
18
|
-
|
|
19
|
-
expected_file = %Q[
|
|
20
|
-
#include "other_file.h"
|
|
21
|
-
#include "file.h"
|
|
22
|
-
#include "protobuf.pb-c.h"
|
|
23
|
-
|
|
24
|
-
void foo(void)
|
|
25
|
-
{
|
|
26
|
-
}
|
|
27
|
-
].left_margin(0)
|
|
28
|
-
|
|
29
|
-
@file_path_utils.expects.form_preprocessed_file_path('project/source/file.c').returns('project/build/preprocessed/files/file.c')
|
|
30
|
-
@configurator.expects.tools_file_preprocessor.returns(@tool_config)
|
|
31
|
-
@tool_executor.expects.build_command_line(@tool_config, 'project/source/file.c', 'project/build/preprocessed/files/file.c').returns('boring command line')
|
|
32
|
-
@tool_executor.expects.exec('boring command line').returns('')
|
|
33
|
-
@preprocessinator_extractor.expects.extract_base_file_from_preprocessed_expansion('project/build/preprocessed/files/file.c').returns(['', 'void foo(void)', '{', '}'])
|
|
34
|
-
@file_wrapper.expects.write('project/build/preprocessed/files/file.c', expected_file.strip)
|
|
35
|
-
|
|
36
|
-
@preprocessinator_file_handler.preprocess_file('project/source/file.c', ['file.h', 'other_file.h'])
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
end
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
|
2
|
-
require 'ceedling/preprocessinator_helper'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class PreprocessinatorHelperTest < Test::Unit::TestCase
|
|
6
|
-
|
|
7
|
-
def setup
|
|
8
|
-
objects = create_mocks(:configurator, :test_includes_extractor, :task_invoker, :file_finder, :file_path_utils)
|
|
9
|
-
@preprocessinator_helper = PreprocessinatorHelper.new(objects)
|
|
10
|
-
create_mocks(:preprocess_file_proc)
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def teardown
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
########## assemble test list ###########
|
|
18
|
-
|
|
19
|
-
should "assemble non-preprocessed test list" do
|
|
20
|
-
test_list = ['tests/tweedle_test.c', 'tests/dumb_test.c']
|
|
21
|
-
|
|
22
|
-
@configurator.expects.project_use_preprocessor.returns(false)
|
|
23
|
-
|
|
24
|
-
assert_equal(test_list, @preprocessinator_helper.assemble_test_list(test_list))
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
should "assemble preprocessed test list" do
|
|
28
|
-
test_list = ['tests/tweedle_test.c', 'tests/dee_test.c']
|
|
29
|
-
preprocessed_test_list = ['project/build/preprocess/tweedle_test.c', 'project/build/preprocess/dee_test.c']
|
|
30
|
-
|
|
31
|
-
@configurator.expects.project_use_preprocessor.returns(true)
|
|
32
|
-
@file_path_utils.expects.form_preprocessed_files_filelist(test_list).returns(preprocessed_test_list)
|
|
33
|
-
|
|
34
|
-
assert_equal(preprocessed_test_list, @preprocessinator_helper.assemble_test_list(test_list))
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
########## preprocess includes ###########
|
|
38
|
-
|
|
39
|
-
should "extract non-preprocessed includes" do
|
|
40
|
-
test_list = ['tests/tweedle_test.c', 'tests/dumb_test.c']
|
|
41
|
-
includes = ['unity.h', 'types.h']
|
|
42
|
-
|
|
43
|
-
@configurator.expects.project_use_preprocessor.returns(false)
|
|
44
|
-
@test_includes_extractor.expects.parse_test_files(test_list).returns(includes)
|
|
45
|
-
|
|
46
|
-
assert_equal(includes, @preprocessinator_helper.preprocess_includes(test_list))
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
should "extract preprocessed includes" do
|
|
50
|
-
test_list = ['tests/tweedle_test.c', 'tests/dumb_test.c']
|
|
51
|
-
includes_lists = ['project/build/preprocess/includes/tweedle_test.c', 'project/build/preprocess/includes/dumb_test.c']
|
|
52
|
-
includes = ['unity.h', 'types.h']
|
|
53
|
-
|
|
54
|
-
@configurator.expects.project_use_preprocessor.returns(true)
|
|
55
|
-
@file_path_utils.expects.form_preprocessed_includes_list_filelist(test_list).returns(includes_lists)
|
|
56
|
-
@task_invoker.expects.invoke_shallow_include_lists(includes_lists)
|
|
57
|
-
@test_includes_extractor.expects.parse_includes_lists(includes_lists).returns(includes)
|
|
58
|
-
|
|
59
|
-
assert_equal(includes, @preprocessinator_helper.preprocess_includes(test_list))
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
########## assemble mocks list ###########
|
|
63
|
-
|
|
64
|
-
should "assemble mocks list" do
|
|
65
|
-
mocks_list = ['mock_and_roll.h', 'mock_em_sock_em.h']
|
|
66
|
-
mocks_filelist = ['project/build/mocks/mock_and_roll.c', 'project/build/mocks/mock_em_sock_em.c']
|
|
67
|
-
|
|
68
|
-
@test_includes_extractor.expects.lookup_all_mocks.returns(mocks_list)
|
|
69
|
-
@file_path_utils.expects.form_mocks_filelist(mocks_list).returns(mocks_filelist)
|
|
70
|
-
|
|
71
|
-
assert_equal(mocks_filelist, @preprocessinator_helper.assemble_mocks_list)
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
########## preprocess mockable headers ###########
|
|
75
|
-
|
|
76
|
-
should "preprocess no mockable headers" do
|
|
77
|
-
mocks_list = ['project/build/mocks/mock_and_roll.c', 'project/build/mocks/mock_em_sock_em.c']
|
|
78
|
-
|
|
79
|
-
@configurator.expects.project_use_preprocessor.returns(false)
|
|
80
|
-
|
|
81
|
-
@preprocessinator_helper.preprocess_mockable_headers(mocks_list, @preprocess_file_proc)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
should "preprocess mockable headers invoked from auxiliary dependencies" do
|
|
85
|
-
mocks_list = ['project/build/mocks/mock_and_roll.c', 'project/build/mocks/mock_em_sock_em.c']
|
|
86
|
-
mocks_filelist = ['project/build/preprocessed/and_roll.h', 'project/build/preprocessed/em_sock_em.h']
|
|
87
|
-
|
|
88
|
-
@configurator.expects.project_use_preprocessor.returns(true)
|
|
89
|
-
|
|
90
|
-
@file_path_utils.expects.form_preprocessed_mockable_headers_filelist(mocks_list).returns(mocks_filelist)
|
|
91
|
-
|
|
92
|
-
@configurator.expects.project_use_deep_dependencies.returns(true)
|
|
93
|
-
|
|
94
|
-
@task_invoker.expects.invoke_preprocessed_files(mocks_filelist)
|
|
95
|
-
|
|
96
|
-
@preprocessinator_helper.preprocess_mockable_headers(mocks_list, @preprocess_file_proc)
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
should "force preprocessing of mockable headers" do
|
|
100
|
-
mocks_list = ['project/build/mocks/mock_and_roll.c', 'project/build/mocks/mock_em_sock_em.c']
|
|
101
|
-
mocks_filelist = ['project/build/preprocessed/and_roll.h', 'project/build/preprocessed/em_sock_em.h']
|
|
102
|
-
headers_list = ['source/lib/and_roll.h', 'source/em_sock_em.h']
|
|
103
|
-
|
|
104
|
-
@configurator.expects.project_use_preprocessor.returns(true)
|
|
105
|
-
|
|
106
|
-
@file_path_utils.expects.form_preprocessed_mockable_headers_filelist(mocks_list).returns(mocks_filelist)
|
|
107
|
-
|
|
108
|
-
@configurator.expects.project_use_deep_dependencies.returns(false)
|
|
109
|
-
|
|
110
|
-
@file_finder.expects.find_mockable_header(mocks_filelist[0]).returns(headers_list[0])
|
|
111
|
-
@preprocess_file_proc.expects.call(headers_list[0])
|
|
112
|
-
@file_finder.expects.find_mockable_header(mocks_filelist[1]).returns(headers_list[1])
|
|
113
|
-
@preprocess_file_proc.expects.call(headers_list[1])
|
|
114
|
-
|
|
115
|
-
@preprocessinator_helper.preprocess_mockable_headers(mocks_list, @preprocess_file_proc)
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
########## preprocess test files ###########
|
|
119
|
-
|
|
120
|
-
should "preprocess no test files" do
|
|
121
|
-
preprocessed_test_list = ['project/build/preprocess/tweedle_test.c', 'project/build/preprocess/dee_test.c']
|
|
122
|
-
|
|
123
|
-
@configurator.expects.project_use_preprocessor.returns(false)
|
|
124
|
-
|
|
125
|
-
@preprocessinator_helper.preprocess_test_files(preprocessed_test_list, @preprocess_file_proc)
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
should "preprocess test files invoked from auxiliary dependencies" do
|
|
129
|
-
preprocessed_test_list = ['project/build/preprocess/tweedle_test.c', 'project/build/preprocess/dee_test.c']
|
|
130
|
-
|
|
131
|
-
@configurator.expects.project_use_preprocessor.returns(true)
|
|
132
|
-
|
|
133
|
-
@configurator.expects.project_use_deep_dependencies.returns(true)
|
|
134
|
-
|
|
135
|
-
@task_invoker.expects.invoke_preprocessed_files(preprocessed_test_list)
|
|
136
|
-
|
|
137
|
-
@preprocessinator_helper.preprocess_test_files(preprocessed_test_list, @preprocess_file_proc)
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
should "force preprocessing of test files" do
|
|
141
|
-
preprocessed_test_list = ['project/build/preprocess/tweedle_test.c', 'project/build/preprocess/dee_test.c']
|
|
142
|
-
test_list = ['tests/tweedle_test.c', 'tests/dee_test.c']
|
|
143
|
-
|
|
144
|
-
@configurator.expects.project_use_preprocessor.returns(true)
|
|
145
|
-
|
|
146
|
-
@configurator.expects.project_use_deep_dependencies.returns(false)
|
|
147
|
-
|
|
148
|
-
@file_finder.expects.find_test_from_file_path(preprocessed_test_list[0]).returns(test_list[0])
|
|
149
|
-
@preprocess_file_proc.expects.call(test_list[0])
|
|
150
|
-
@file_finder.expects.find_test_from_file_path(preprocessed_test_list[1]).returns(test_list[1])
|
|
151
|
-
@preprocess_file_proc.expects.call(test_list[1])
|
|
152
|
-
|
|
153
|
-
@preprocessinator_helper.preprocess_test_files(preprocessed_test_list, @preprocess_file_proc)
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
end
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
|
2
|
-
require 'ceedling/preprocessinator_includes_handler'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class PreprocessinatorIncludesHandlerTest < Test::Unit::TestCase
|
|
6
|
-
|
|
7
|
-
def setup
|
|
8
|
-
objects = create_mocks(:configurator, :tool_executor, :task_invoker, :file_path_utils, :yaml_wrapper, :file_wrapper)
|
|
9
|
-
@preprocessinator_includes_handler = PreprocessinatorIncludesHandler.new(objects)
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def teardown
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
should "invoke a shallow includes list" do
|
|
17
|
-
@file_path_utils.expects.form_preprocessed_includes_list_path('tests/test_me_please.c').returns('project/build/preprocess/includes/test_me_please.c')
|
|
18
|
-
@task_invoker.expects.invoke_shallow_include_lists('project/build/preprocess/includes/test_me_please.c')
|
|
19
|
-
|
|
20
|
-
@preprocessinator_includes_handler.invoke_shallow_includes_list('tests/test_me_please.c')
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
should "form a make-style dependency rule that lists decorated names of only those headers included in a source file" do
|
|
25
|
-
source_file = %Q[
|
|
26
|
-
#include "unity.h"
|
|
27
|
-
#include "CException.h"
|
|
28
|
-
#include "extra_thing2.h"
|
|
29
|
-
#include <setjmp.h>
|
|
30
|
-
#include <stdio.h>
|
|
31
|
-
#include "mock_abc.h"
|
|
32
|
-
|
|
33
|
-
int Stuff;
|
|
34
|
-
|
|
35
|
-
void foo(void);
|
|
36
|
-
].left_margin(0)
|
|
37
|
-
|
|
38
|
-
decorated_temp_file = %Q[
|
|
39
|
-
#include "@@@@unity.h"
|
|
40
|
-
#include "@@@@CException.h"
|
|
41
|
-
#include "@@@@extra_thing2.h"
|
|
42
|
-
#include <setjmp.h>
|
|
43
|
-
#include <stdio.h>
|
|
44
|
-
#include "@@@@mock_abc.h"
|
|
45
|
-
|
|
46
|
-
int Stuff;
|
|
47
|
-
|
|
48
|
-
void foo(void);
|
|
49
|
-
].left_margin(0)
|
|
50
|
-
|
|
51
|
-
includes_preprocessor_tool = {:name => 'includes preprocessor', :executable => 'gcc'}
|
|
52
|
-
|
|
53
|
-
@file_path_utils.expects.form_temp_path('tests/test_me_please.c').returns('build/temp/test_me_please.c')
|
|
54
|
-
|
|
55
|
-
@file_wrapper.expects.read('tests/test_me_please.c').returns(source_file)
|
|
56
|
-
@file_wrapper.expects.write('build/temp/test_me_please.c', decorated_temp_file)
|
|
57
|
-
|
|
58
|
-
@configurator.expects.tools_includes_preprocessor.returns(includes_preprocessor_tool)
|
|
59
|
-
@tool_executor.expects.build_command_line(includes_preprocessor_tool, 'build/temp/test_me_please.c').returns("gcc -MG preprocessor args")
|
|
60
|
-
@tool_executor.expects.exec("gcc -MG preprocessor args").returns("fake make-style dependency rule")
|
|
61
|
-
@file_wrapper.expects.rm_f('build/temp/test_me_please.c')
|
|
62
|
-
|
|
63
|
-
assert_equal("fake make-style dependency rule", @preprocessinator_includes_handler.form_shallow_dependencies_rule('tests/test_me_please.c'))
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
should "extract immediately included header files from source file's decorated dependencies scan" do
|
|
68
|
-
dependency_rule = %Q[
|
|
69
|
-
project/build/out/a_file.o: \
|
|
70
|
-
project/source/a_file.c \
|
|
71
|
-
@@@@a_file.h \
|
|
72
|
-
@@@@api.h \
|
|
73
|
-
@@@@types.h \
|
|
74
|
-
@@@@ignore.c
|
|
75
|
-
].left_margin(0)
|
|
76
|
-
|
|
77
|
-
@configurator.expects.extension_header.returns('.h')
|
|
78
|
-
|
|
79
|
-
assert_equal(
|
|
80
|
-
['a_file.h', 'api.h', 'types.h'],
|
|
81
|
-
@preprocessinator_includes_handler.extract_shallow_includes(dependency_rule))
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
should "write shallow includes list to yaml file" do
|
|
86
|
-
includes = ['unity.h', 'a_file.h']
|
|
87
|
-
|
|
88
|
-
@yaml_wrapper.expects.dump('project/build/preprocess/includes/test_me_please.c', includes)
|
|
89
|
-
|
|
90
|
-
@preprocessinator_includes_handler.write_shallow_includes_list('project/build/preprocess/includes/test_me_please.c', includes)
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
end
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
|
2
|
-
require 'ceedling/preprocessinator'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class PreprocessinatorTest < Test::Unit::TestCase
|
|
6
|
-
|
|
7
|
-
def setup
|
|
8
|
-
objects = create_mocks(:configurator, :preprocessinator_helper, :preprocessinator_includes_handler, :preprocessinator_file_handler, :task_invoker, :file_path_utils, :yaml_wrapper)
|
|
9
|
-
@preprocessinator = Preprocessinator.new(objects)
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def teardown
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
should "preprocess tests and invoke mocks" do
|
|
17
|
-
create_mocks(:tests_list, :mocks_list)
|
|
18
|
-
|
|
19
|
-
@preprocessinator_helper.expects.assemble_test_list(['tests/tweedle_test.c', 'tests/dumb_test.c']).returns(@tests_list)
|
|
20
|
-
@preprocessinator_helper.expects.preprocess_includes(@tests_list)
|
|
21
|
-
@preprocessinator_helper.expects.assemble_mocks_list.returns(@mocks_list)
|
|
22
|
-
@preprocessinator_helper.expects.preprocess_mockable_headers(@mocks_list, @preprocessinator.preprocess_file_proc)
|
|
23
|
-
@task_invoker.expects.invoke_mocks(@mocks_list)
|
|
24
|
-
@preprocessinator_helper.expects.preprocess_test_files(@tests_list, @preprocessinator.preprocess_file_proc)
|
|
25
|
-
|
|
26
|
-
assert_equal(@mocks_list, @preprocessinator.preprocess_tests_and_invoke_mocks(['tests/tweedle_test.c', 'tests/dumb_test.c']))
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
should "preprocess shallow includes for a given file and write them to disk" do
|
|
30
|
-
@preprocessinator_includes_handler.expects.form_shallow_dependencies_rule('project/source/software.c').returns('project/build/output/thing.o: header.h')
|
|
31
|
-
@preprocessinator_includes_handler.expects.extract_shallow_includes('project/build/output/thing.o: header.h').returns(['header.h'])
|
|
32
|
-
@file_path_utils.expects.form_preprocessed_includes_list_path('project/source/software.c').returns('project/build/preprocessed/includes/software.c')
|
|
33
|
-
@preprocessinator_includes_handler.expects.write_shallow_includes_list('project/build/preprocessed/includes/software.c', ['header.h'])
|
|
34
|
-
|
|
35
|
-
@preprocessinator.preprocess_shallow_includes('project/source/software.c')
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
should "preprocess a file" do
|
|
39
|
-
includes = ['types.h', 'a_widdle_file.h']
|
|
40
|
-
mocks_filelist = ['project/build/mocks/mock_and_roll.c', 'project/build/mocks/mock_em_sock_em.c']
|
|
41
|
-
|
|
42
|
-
@preprocessinator_includes_handler.expects.invoke_shallow_includes_list('source/a_widdle_file.c')
|
|
43
|
-
@file_path_utils.expects.form_preprocessed_includes_list_path('source/a_widdle_file.c').returns('project/build/preprocess/includes/a_widdle_file.c')
|
|
44
|
-
@yaml_wrapper.expects.load('project/build/preprocess/includes/a_widdle_file.c').returns(includes)
|
|
45
|
-
@preprocessinator_file_handler.expects.preprocess_file('source/a_widdle_file.c', includes)
|
|
46
|
-
|
|
47
|
-
@preprocessinator.preprocess_file('source/a_widdle_file.c')
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
should "form preprocessed file path if preprocessing is enabled" do
|
|
51
|
-
@configurator.expects.project_use_preprocessor.returns(true)
|
|
52
|
-
@file_path_utils.expects.form_preprocessed_file_path('project/files/a_file.c').returns('project/build/preprocessed/files/a_file.c')
|
|
53
|
-
|
|
54
|
-
assert_equal('project/build/preprocessed/files/a_file.c', @preprocessinator.form_file_path('project/files/a_file.c'))
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
end
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
|
2
|
-
require 'ceedling/project_config_manager'
|
|
3
|
-
require 'yaml'
|
|
4
|
-
|
|
5
|
-
class ProjectFileLoaderTest < Test::Unit::TestCase
|
|
6
|
-
|
|
7
|
-
def setup
|
|
8
|
-
@objects = create_mocks(:yaml_wrapper, :stream_wrapper, :system_wrapper, :file_wrapper)
|
|
9
|
-
@loader = ProjectFileLoader.new(@objects)
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def teardown
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### find project file ###
|
|
17
|
-
|
|
18
|
-
should "find both default project files if no environment variables are set and both exist on-disk" do
|
|
19
|
-
@system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
|
|
20
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(true)
|
|
21
|
-
|
|
22
|
-
@system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(nil)
|
|
23
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(true)
|
|
24
|
-
|
|
25
|
-
@loader.find_project_files
|
|
26
|
-
|
|
27
|
-
assert_equal(DEFAULT_CEEDLING_MAIN_PROJECT_FILE, @loader.main_project_filepath)
|
|
28
|
-
assert_equal(DEFAULT_CEEDLING_USER_PROJECT_FILE, @loader.user_project_filepath)
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
should "find only main default project files if no environment variables are set and it exist on-disk" do
|
|
32
|
-
@system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
|
|
33
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(false)
|
|
34
|
-
|
|
35
|
-
@system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(nil)
|
|
36
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(true)
|
|
37
|
-
|
|
38
|
-
@loader.find_project_files
|
|
39
|
-
|
|
40
|
-
assert_equal(DEFAULT_CEEDLING_MAIN_PROJECT_FILE, @loader.main_project_filepath)
|
|
41
|
-
assert_equal('', @loader.user_project_filepath)
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
should "find main project file specified in environment variable if it exists on disk (no default user file found)" do
|
|
46
|
-
test_config_file = 'tests/config.yml'
|
|
47
|
-
|
|
48
|
-
@system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
|
|
49
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(false)
|
|
50
|
-
|
|
51
|
-
@system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(test_config_file)
|
|
52
|
-
@file_wrapper.expects.exist?(test_config_file).returns(true)
|
|
53
|
-
|
|
54
|
-
@loader.find_project_files
|
|
55
|
-
|
|
56
|
-
assert_equal(test_config_file, @loader.main_project_filepath)
|
|
57
|
-
assert_equal('', @loader.user_project_filepath)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
should "find both project files specified in environment variables if they exist on disk" do
|
|
61
|
-
test_main_config_file = 'tests/project.yml'
|
|
62
|
-
test_user_config_file = 'tests/user.yml'
|
|
63
|
-
|
|
64
|
-
@system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(test_user_config_file)
|
|
65
|
-
@file_wrapper.expects.exist?(test_user_config_file).returns(true)
|
|
66
|
-
|
|
67
|
-
@system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(test_main_config_file)
|
|
68
|
-
@file_wrapper.expects.exist?(test_main_config_file).returns(true)
|
|
69
|
-
|
|
70
|
-
@loader.find_project_files
|
|
71
|
-
|
|
72
|
-
assert_equal(test_main_config_file, @loader.main_project_filepath)
|
|
73
|
-
assert_equal(test_user_config_file, @loader.user_project_filepath)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
should "raise if main project file cannot be found from environment variable or on disk" do
|
|
78
|
-
test_config_file = 'files/config/tests.yml'
|
|
79
|
-
|
|
80
|
-
@system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
|
|
81
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(false)
|
|
82
|
-
|
|
83
|
-
@system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(test_config_file)
|
|
84
|
-
@file_wrapper.expects.exist?(test_config_file).returns(false)
|
|
85
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(false)
|
|
86
|
-
|
|
87
|
-
@stream_wrapper.expects.stderr_puts('Found no Ceedling project file (*.yml)')
|
|
88
|
-
|
|
89
|
-
assert_raise(RuntimeError) { @loader.find_project_files }
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
should "raise if main test project file cannot be found on disk and no environment variable is set" do
|
|
93
|
-
|
|
94
|
-
@system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
|
|
95
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(false)
|
|
96
|
-
|
|
97
|
-
@system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(nil)
|
|
98
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(false)
|
|
99
|
-
|
|
100
|
-
@stream_wrapper.expects.stderr_puts('Found no Ceedling project file (*.yml)')
|
|
101
|
-
|
|
102
|
-
assert_raise(RuntimeError) { @loader.find_project_files }
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
### load project file ###
|
|
106
|
-
|
|
107
|
-
should "load yaml of main project file only" do
|
|
108
|
-
yaml = {:config => []}
|
|
109
|
-
|
|
110
|
-
@system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
|
|
111
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(false)
|
|
112
|
-
|
|
113
|
-
@system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(nil)
|
|
114
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(true)
|
|
115
|
-
@yaml_wrapper.expects.load(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(yaml)
|
|
116
|
-
|
|
117
|
-
@loader.find_project_files
|
|
118
|
-
|
|
119
|
-
assert_equal(yaml, @loader.load_project_config)
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
should "load yaml of main project file merged with user project file" do
|
|
123
|
-
main_yaml = {:config => [], :more => 'more'}
|
|
124
|
-
user_yaml = {:more => 'less', :smore => 'yum'}
|
|
125
|
-
merged_yaml = {:config => [], :more => 'less', :smore => 'yum'}
|
|
126
|
-
|
|
127
|
-
@system_wrapper.expects.env_get('CEEDLING_USER_PROJECT_FILE').returns(nil)
|
|
128
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(true)
|
|
129
|
-
|
|
130
|
-
@system_wrapper.expects.env_get('CEEDLING_MAIN_PROJECT_FILE').returns(nil)
|
|
131
|
-
@file_wrapper.expects.exist?(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(true)
|
|
132
|
-
|
|
133
|
-
@yaml_wrapper.expects.load(DEFAULT_CEEDLING_MAIN_PROJECT_FILE).returns(main_yaml)
|
|
134
|
-
@yaml_wrapper.expects.load(DEFAULT_CEEDLING_USER_PROJECT_FILE).returns(user_yaml)
|
|
135
|
-
|
|
136
|
-
@loader.find_project_files
|
|
137
|
-
|
|
138
|
-
assert_equal(merged_yaml, @loader.load_project_config)
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
end
|
|
142
|
-
|