ceedling 0.25.0 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,45 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/setupinator'
|
3
|
-
|
4
|
-
|
5
|
-
class SetupinatorTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
objects = create_mocks(:project_config_manager, :configurator, :test_includes_extractor, :plugin_manager, :file_finder)
|
9
|
-
create_mocks(:config_hash, :system_objects)
|
10
|
-
@setupinator = Setupinator.new(objects)
|
11
|
-
end
|
12
|
-
|
13
|
-
def teardown
|
14
|
-
end
|
15
|
-
|
16
|
-
|
17
|
-
should "perform all post-instantiation setup steps" do
|
18
|
-
@project_config_manager.expects.find_project_files
|
19
|
-
@project_config_manager.expects.load_project_config.returns(@config_hash)
|
20
|
-
|
21
|
-
@configurator.expects.populate_plugins_defaults(@config_hash)
|
22
|
-
@configurator.expects.standardize_paths(@config_hash)
|
23
|
-
@configurator.expects.validate(@config_hash)
|
24
|
-
@configurator.expects.populate_cmock_defaults(@config_hash)
|
25
|
-
@configurator.expects.find_and_merge_plugins(@config_hash)
|
26
|
-
@configurator.expects.build(@config_hash)
|
27
|
-
|
28
|
-
@configurator.expects.rake_plugins.returns(['plugins/ext1/ext1.rake', 'plugins/ext2/ext2.rake'])
|
29
|
-
@configurator.expects.insert_rake_plugins(['plugins/ext1/ext1.rake', 'plugins/ext2/ext2.rake'])
|
30
|
-
|
31
|
-
@configurator.expects.script_plugins.returns(['plugins/ext2/ext2.rb', 'plugins/ext3/ext3.rb'])
|
32
|
-
@plugin_manager.expects.load_plugin_scripts(['plugins/ext2/ext2.rb', 'plugins/ext3/ext3.rb'], @system_objects)
|
33
|
-
|
34
|
-
@configurator.expects.cmock_mock_prefix.returns('Mock')
|
35
|
-
@test_includes_extractor.expects.cmock_mock_prefix=('Mock')
|
36
|
-
|
37
|
-
@configurator.expects.extension_header.returns('.h')
|
38
|
-
@test_includes_extractor.expects.extension_header=('.h')
|
39
|
-
|
40
|
-
@file_finder.expects.prepare_search_sources
|
41
|
-
|
42
|
-
@setupinator.do_setup(@system_objects)
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/streaminator'
|
3
|
-
require 'ceedling/constants'
|
4
|
-
|
5
|
-
|
6
|
-
class StreaminatorTest < Test::Unit::TestCase
|
7
|
-
|
8
|
-
def setup
|
9
|
-
objects = create_mocks(:verbosinator, :stream_wrapper)
|
10
|
-
@streaminator = Streaminator.new(objects)
|
11
|
-
end
|
12
|
-
|
13
|
-
def teardown
|
14
|
-
end
|
15
|
-
|
16
|
-
|
17
|
-
should "write to stdout & flush if sufficient verbosity level" do
|
18
|
-
@verbosinator.expects.should_output?(Verbosity::OBNOXIOUS).returns(true)
|
19
|
-
|
20
|
-
@stream_wrapper.expects.stdout_puts("Hey. You lookin at me??")
|
21
|
-
@stream_wrapper.expects.stdout_flush
|
22
|
-
|
23
|
-
@streaminator.stdout_puts("Hey. You lookin at me??", Verbosity::OBNOXIOUS)
|
24
|
-
end
|
25
|
-
|
26
|
-
should "not write to stdout or flush because insufficient verbosity level" do
|
27
|
-
@verbosinator.expects.should_output?(Verbosity::NORMAL).returns(false)
|
28
|
-
|
29
|
-
@streaminator.stdout_puts("Hey. You lookin at me??", Verbosity::NORMAL)
|
30
|
-
end
|
31
|
-
|
32
|
-
|
33
|
-
should "write to stderr & flush if sufficient verbosity level" do
|
34
|
-
@verbosinator.expects.should_output?(Verbosity::ERRORS).returns(true)
|
35
|
-
|
36
|
-
@stream_wrapper.expects.stderr_puts("Hey, yah. I'm lookin at you.")
|
37
|
-
@stream_wrapper.expects.stderr_flush
|
38
|
-
|
39
|
-
@streaminator.stderr_puts("Hey, yah. I'm lookin at you.", Verbosity::ERRORS)
|
40
|
-
end
|
41
|
-
|
42
|
-
should "not write to stderr or flush because insufficient verbosity level" do
|
43
|
-
@verbosinator.expects.should_output?(Verbosity::NORMAL).returns(false)
|
44
|
-
|
45
|
-
@streaminator.stderr_puts("Hey, yah. I'm lookin at you.", Verbosity::NORMAL)
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
|
@@ -1,69 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/task_invoker'
|
3
|
-
|
4
|
-
|
5
|
-
class TaskInvokerTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
objects = create_mocks(:configurator, :rake_wrapper)
|
9
|
-
create_mocks(:task1, :task2)
|
10
|
-
@task_list = ['task1', 'task2']
|
11
|
-
@task_invoker = TaskInvoker.new(objects)
|
12
|
-
end
|
13
|
-
|
14
|
-
def teardown
|
15
|
-
end
|
16
|
-
|
17
|
-
def invoke_helper(enhance=true)
|
18
|
-
environment_files = ['tasks.rake', 'file_wrapper.rb']
|
19
|
-
|
20
|
-
if (enhance)
|
21
|
-
@rake_wrapper.expects(:[], @task_list[0]).returns(@task1)
|
22
|
-
@configurator.expects.collection_code_generation_dependencies.returns(environment_files)
|
23
|
-
@task1.expects.enhance(environment_files)
|
24
|
-
end
|
25
|
-
@rake_wrapper.expects(:[], @task_list[0]).returns(@task1)
|
26
|
-
@task1.expects.invoke
|
27
|
-
|
28
|
-
if (enhance)
|
29
|
-
@rake_wrapper.expects(:[], @task_list[1]).returns(@task2)
|
30
|
-
@configurator.expects.collection_code_generation_dependencies.returns(environment_files)
|
31
|
-
@task2.expects.enhance(environment_files)
|
32
|
-
end
|
33
|
-
@rake_wrapper.expects(:[], @task_list[1]).returns(@task2)
|
34
|
-
@task2.expects.invoke
|
35
|
-
end
|
36
|
-
|
37
|
-
|
38
|
-
should "enhance dependencies and invoke mocks" do
|
39
|
-
invoke_helper
|
40
|
-
@task_invoker.invoke_mocks(@task_list)
|
41
|
-
end
|
42
|
-
|
43
|
-
should "enhance dependencies and invoke runners" do
|
44
|
-
invoke_helper
|
45
|
-
@task_invoker.invoke_runners(@task_list)
|
46
|
-
end
|
47
|
-
|
48
|
-
should "enhance dependencies and invoke shallow include lists" do
|
49
|
-
invoke_helper
|
50
|
-
@task_invoker.invoke_shallow_include_lists(@task_list)
|
51
|
-
end
|
52
|
-
|
53
|
-
should "enhance dependencies and invoke preprocessed files" do
|
54
|
-
invoke_helper
|
55
|
-
@task_invoker.invoke_preprocessed_files(@task_list)
|
56
|
-
end
|
57
|
-
|
58
|
-
should "enhance dependencies and invoke auxiliary dependencies" do
|
59
|
-
invoke_helper
|
60
|
-
@task_invoker.invoke_dependencies_files(@task_list)
|
61
|
-
end
|
62
|
-
|
63
|
-
should "not enhance dependencies and invoke results" do
|
64
|
-
invoke_helper(false)
|
65
|
-
@task_invoker.invoke_results(@task_list)
|
66
|
-
end
|
67
|
-
|
68
|
-
|
69
|
-
end
|
@@ -1,111 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/test_includes_extractor'
|
3
|
-
|
4
|
-
|
5
|
-
class TestIncludesExtractorTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
# dummy file contents
|
8
|
-
DUMMY_BERT_C = %Q[
|
9
|
-
#include "unity.h"
|
10
|
-
#include "Bert.h"
|
11
|
-
#include "MockBigBird.h"
|
12
|
-
|
13
|
-
void test_ernie(void)
|
14
|
-
{
|
15
|
-
TEST_ASSERT_EQUAL_STRING("rubber ducky", ernie());
|
16
|
-
}
|
17
|
-
].left_margin(0)
|
18
|
-
|
19
|
-
DUMMY_OSCAR_C = %Q[
|
20
|
-
#include "unity.h"
|
21
|
-
#include "Oscar.h"
|
22
|
-
#include "MockBigBird.h"
|
23
|
-
#include " MockSnuffleupagus.h "
|
24
|
-
|
25
|
-
void test_elmo(void)
|
26
|
-
{
|
27
|
-
TEST_ASSERT_EQUAL(5, elmo()); // elmo is 5
|
28
|
-
}
|
29
|
-
].left_margin(0)
|
30
|
-
|
31
|
-
DUMMY_KERMIT_C = %Q[
|
32
|
-
#include "unity.h"
|
33
|
-
#include "Kermit.h"
|
34
|
-
#include "MockBigBird.h"
|
35
|
-
#include "MockTheCount.h"
|
36
|
-
#include "MockCookieMonster.h"
|
37
|
-
|
38
|
-
void test_MockTestRegex(void)
|
39
|
-
{
|
40
|
-
TEST_ASSERT_IGNORE("Throwing a random 'Mock' in the file...");
|
41
|
-
}
|
42
|
-
].left_margin(0)
|
43
|
-
|
44
|
-
|
45
|
-
def setup
|
46
|
-
objects = create_mocks(:yaml_wrapper, :file_wrapper)
|
47
|
-
|
48
|
-
@test_includes_extractor = TestIncludesExtractor.new(objects)
|
49
|
-
|
50
|
-
@test_includes_extractor.cmock_mock_prefix = 'Mock'
|
51
|
-
@test_includes_extractor.extension_header = '.h'
|
52
|
-
|
53
|
-
# verify all is blank before processing
|
54
|
-
assert_equal([], @test_includes_extractor.lookup_all_mocks)
|
55
|
-
end
|
56
|
-
|
57
|
-
def teardown
|
58
|
-
end
|
59
|
-
|
60
|
-
|
61
|
-
def parse_test_helper
|
62
|
-
@file_wrapper.expects.readlines('tests/a/test_bert.c').returns(DUMMY_BERT_C.split(/\n/))
|
63
|
-
@file_wrapper.expects.readlines('tests/b/test_oscar.c').returns(DUMMY_OSCAR_C.split(/\n/))
|
64
|
-
@file_wrapper.expects.readlines('tests/c/test_kermit.c').returns(DUMMY_KERMIT_C.split(/\n/))
|
65
|
-
|
66
|
-
# process dummy files
|
67
|
-
@test_includes_extractor.parse_test_files(['tests/a/test_bert.c', 'tests/b/test_oscar.c', 'tests/c/test_kermit.c'])
|
68
|
-
end
|
69
|
-
|
70
|
-
|
71
|
-
should "verify all mocks extracted from multiple test files" do
|
72
|
-
parse_test_helper
|
73
|
-
assert_equal(
|
74
|
-
['MockBigBird.h',
|
75
|
-
'MockSnuffleupagus.h',
|
76
|
-
'MockTheCount.h',
|
77
|
-
'MockCookieMonster.h'],
|
78
|
-
@test_includes_extractor.lookup_all_mocks)
|
79
|
-
end
|
80
|
-
|
81
|
-
should "verify raw mocks list extracted from multiple test files" do
|
82
|
-
parse_test_helper
|
83
|
-
assert_equal(['MockBigBird'], @test_includes_extractor.lookup_raw_mock_list('tests/a/test_bert.c'))
|
84
|
-
assert_equal(['MockBigBird', 'MockSnuffleupagus'], @test_includes_extractor.lookup_raw_mock_list('tests/b/test_oscar.c'))
|
85
|
-
assert_equal(['MockBigBird', 'MockTheCount', 'MockCookieMonster'], @test_includes_extractor.lookup_raw_mock_list('tests/c/test_kermit.c'))
|
86
|
-
assert_equal([], @test_includes_extractor.lookup_raw_mock_list('test_grover.c')) # no such file, get back empty list
|
87
|
-
end
|
88
|
-
|
89
|
-
should "verify includes list extracted from multiple test files" do
|
90
|
-
parse_test_helper
|
91
|
-
assert_equal(['unity.h', 'Bert.h', 'MockBigBird.h'], @test_includes_extractor.lookup_includes_list('tests/a/test_bert.c'))
|
92
|
-
assert_equal(['unity.h', 'Oscar.h', 'MockBigBird.h', 'MockSnuffleupagus.h'], @test_includes_extractor.lookup_includes_list('tests/b/test_oscar.c'))
|
93
|
-
assert_equal(['unity.h', 'Kermit.h', 'MockBigBird.h', 'MockTheCount.h', 'MockCookieMonster.h'], @test_includes_extractor.lookup_includes_list('tests/c/test_kermit.c'))
|
94
|
-
assert_equal([], @test_includes_extractor.lookup_includes_list('test_grover.c')) # no such file, get back empty list
|
95
|
-
end
|
96
|
-
|
97
|
-
should "verify includes stored in yaml files created during preprocessing" do
|
98
|
-
@yaml_wrapper.expects.load('preprocess/a_file.h').returns(['common.h', 'types.h'])
|
99
|
-
@yaml_wrapper.expects.load('preprocess/another_file.c').returns(['another_file.h', 'types.h'])
|
100
|
-
@yaml_wrapper.expects.load('preprocess/test_last_file.c').returns(['unity.h', 'mock_a_file.h', 'last_file.h'])
|
101
|
-
|
102
|
-
@test_includes_extractor.parse_includes_lists(['preprocess/a_file.h', 'preprocess/another_file.c', 'preprocess/test_last_file.c'])
|
103
|
-
|
104
|
-
assert_equal(['common.h', 'types.h'], @test_includes_extractor.lookup_includes_list('preprocess/a_file.h'))
|
105
|
-
assert_equal(['another_file.h', 'types.h'], @test_includes_extractor.lookup_includes_list('preprocess/another_file.c'))
|
106
|
-
assert_equal(['unity.h', 'mock_a_file.h', 'last_file.h'], @test_includes_extractor.lookup_includes_list('preprocess/test_last_file.c'))
|
107
|
-
assert_equal([], @test_includes_extractor.lookup_includes_list('junk.c')) # no such file, get back empty list
|
108
|
-
end
|
109
|
-
|
110
|
-
end
|
111
|
-
|
@@ -1,62 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/test_invoker_helper'
|
3
|
-
|
4
|
-
|
5
|
-
class TestInvokerHelperTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
objects = create_mocks(:configurator, :task_invoker, :dependinator, :file_path_utils, :file_finder, :file_wrapper)
|
9
|
-
create_mocks(:tests_list, :sources_list, :mocks_list, :runners_list, :pass_results_list, :fail_results_list)
|
10
|
-
create_mocks(:dependencies_list1, :dependencies_list2, :dependencies_list3, :dependencies_list4)
|
11
|
-
@test_invoker_helper = TestInvokerHelper.new(objects)
|
12
|
-
end
|
13
|
-
|
14
|
-
def teardown
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
|
-
should "clean all result files" do
|
19
|
-
@file_wrapper.expects.rm_f(@fail_results_list)
|
20
|
-
@file_wrapper.expects.rm_f(@pass_results_list)
|
21
|
-
|
22
|
-
@test_invoker_helper.clean_results({:force_run => true}, @fail_results_list, @pass_results_list)
|
23
|
-
end
|
24
|
-
|
25
|
-
should "clean only fail result files" do
|
26
|
-
@file_wrapper.expects.rm_f(@fail_results_list)
|
27
|
-
|
28
|
-
@test_invoker_helper.clean_results({:force_run => false}, @fail_results_list, @pass_results_list)
|
29
|
-
end
|
30
|
-
|
31
|
-
should "process no auxiliary dependencies" do
|
32
|
-
@configurator.expects.project_use_deep_dependencies.returns(false)
|
33
|
-
|
34
|
-
@test_invoker_helper.process_deep_dependencies(@tests_list)
|
35
|
-
end
|
36
|
-
|
37
|
-
should "process auxiliary dependencies" do
|
38
|
-
@configurator.expects.project_use_deep_dependencies.returns(true)
|
39
|
-
|
40
|
-
@file_finder.expects.find_sources_from_tests(@tests_list).returns(@sources_list)
|
41
|
-
|
42
|
-
@file_path_utils.expects.form_dependencies_filelist(@tests_list).returns(@dependencies_list1)
|
43
|
-
@task_invoker.expects.invoke_dependencies_files(@dependencies_list1)
|
44
|
-
@dependinator.expects.setup_test_object_dependencies(@dependencies_list1)
|
45
|
-
|
46
|
-
@file_path_utils.expects.form_dependencies_filelist(@sources_list).returns(@dependencies_list2)
|
47
|
-
@task_invoker.expects.invoke_dependencies_files(@dependencies_list2)
|
48
|
-
@dependinator.expects.setup_test_object_dependencies(@dependencies_list2)
|
49
|
-
|
50
|
-
@file_path_utils.expects.form_dependencies_filelist(@mocks_list).returns(@dependencies_list3)
|
51
|
-
@task_invoker.expects.invoke_dependencies_files(@dependencies_list3)
|
52
|
-
@dependinator.expects.setup_test_object_dependencies(@dependencies_list3)
|
53
|
-
|
54
|
-
@file_path_utils.expects.form_dependencies_filelist(@runners_list).returns(@dependencies_list4)
|
55
|
-
@task_invoker.expects.invoke_dependencies_files(@dependencies_list4)
|
56
|
-
@dependinator.expects.setup_test_object_dependencies(@dependencies_list4)
|
57
|
-
|
58
|
-
@test_invoker_helper.process_deep_dependencies(@tests_list, @mocks_list, @runners_list)
|
59
|
-
end
|
60
|
-
|
61
|
-
|
62
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/test_invoker'
|
3
|
-
|
4
|
-
|
5
|
-
class TestInvokerTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
objects = create_mocks(:test_invoker_helper, :configurator, :preprocessinator, :task_invoker, :dependinator, :file_wrapper)
|
9
|
-
create_mocks(:tests_list, :mocks_list, :runners_list, :pass_results_list, :fail_results_list)
|
10
|
-
@test_invoker = TestInvoker.new(objects)
|
11
|
-
end
|
12
|
-
|
13
|
-
def teardown
|
14
|
-
end
|
15
|
-
|
16
|
-
|
17
|
-
should "run tests" do
|
18
|
-
@file_wrapper.expects.instantiate_file_list(['project/tests/TestIng.c', 'project/tests/TestIcular.c']).returns(@tests_list)
|
19
|
-
|
20
|
-
@configurator.expects.project_test_results_path.returns('project/build/results')
|
21
|
-
@configurator.expects.extension_testfail.returns('.fail')
|
22
|
-
@tests_list.expects.pathmap('project/build/results/%n.fail').returns(@fail_results_list)
|
23
|
-
@configurator.expects.project_test_results_path.returns('project/build/results')
|
24
|
-
@configurator.expects.extension_testpass.returns('.pass')
|
25
|
-
@tests_list.expects.pathmap('project/build/results/%n.pass').returns(@pass_results_list)
|
26
|
-
|
27
|
-
@test_invoker_helper.expects.clean_results({:force_run => true}, @fail_results_list, @pass_results_list)
|
28
|
-
|
29
|
-
@preprocessinator.expects.preprocess_tests_and_invoke_mocks(@tests_list).returns(@mocks_list)
|
30
|
-
|
31
|
-
@configurator.expects.project_test_runners_path.returns('project/build/runners')
|
32
|
-
@configurator.expects.test_runner_file_suffix.returns('_runner')
|
33
|
-
@tests_list.expects.pathmap('project/build/runners/%n_runner%x').returns(@runners_list)
|
34
|
-
|
35
|
-
@task_invoker.expects.invoke_runners(@runners_list)
|
36
|
-
|
37
|
-
@test_invoker_helper.expects.process_deep_dependencies(@tests_list, @mocks_list, @runners_list)
|
38
|
-
|
39
|
-
@dependinator.expects.setup_test_executable_dependencies(@tests_list)
|
40
|
-
|
41
|
-
@task_invoker.expects.invoke_results(@pass_results_list)
|
42
|
-
|
43
|
-
@test_invoker.setup_and_invoke(['project/tests/TestIng.c', 'project/tests/TestIcular.c'])
|
44
|
-
end
|
45
|
-
|
46
|
-
|
47
|
-
end
|
@@ -1,100 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../unit_test_helper'
|
2
|
-
require 'ceedling/tool_executor_helper'
|
3
|
-
|
4
|
-
|
5
|
-
class ToolExecutorHelperTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
objects = create_mocks(:verbosinator, :stream_wrapper)
|
9
|
-
@tool_executor_helper = ToolExecutorHelper.new(objects)
|
10
|
-
end
|
11
|
-
|
12
|
-
def teardown
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
should "print no happy results" do
|
17
|
-
# non-zero (fail) exit code
|
18
|
-
shell_result = {:output => 'la la la. connect the dots.', :exit_code => 1}
|
19
|
-
@tool_executor_helper.print_happy_results("", shell_result)
|
20
|
-
|
21
|
-
# zero exit code but insufficent verbosity settings
|
22
|
-
shell_result = {:output => "pee wee's playhouse", :exit_code => 0}
|
23
|
-
@verbosinator.expects.should_output?(Verbosity::OBNOXIOUS).returns(false)
|
24
|
-
@tool_executor_helper.print_happy_results("tool.exe", shell_result)
|
25
|
-
end
|
26
|
-
|
27
|
-
should "print happy results with response" do
|
28
|
-
# zero exit code (success) and sufficent verbosity settings
|
29
|
-
shell_result = {:output => "gcc blather", :exit_code => 0}
|
30
|
-
@verbosinator.expects.should_output?(Verbosity::OBNOXIOUS).returns(true)
|
31
|
-
|
32
|
-
@stream_wrapper.expects.stdout_puts("> Shell executed command:")
|
33
|
-
@stream_wrapper.expects.stdout_puts("gcc -Iproject/source file.c -o file.out")
|
34
|
-
@stream_wrapper.expects.stdout_puts("> Produced response:")
|
35
|
-
@stream_wrapper.expects.stdout_puts("gcc blather")
|
36
|
-
@stream_wrapper.expects.stdout_puts('')
|
37
|
-
@stream_wrapper.expects.stdout_flush
|
38
|
-
|
39
|
-
@tool_executor_helper.print_happy_results("gcc -Iproject/source file.c -o file.out", shell_result)
|
40
|
-
end
|
41
|
-
|
42
|
-
should "print happy results with no response" do
|
43
|
-
# zero exit code (success) and sufficent verbosity settings
|
44
|
-
shell_result = {:output => "", :exit_code => 0}
|
45
|
-
@verbosinator.expects.should_output?(Verbosity::OBNOXIOUS).returns(true)
|
46
|
-
|
47
|
-
@stream_wrapper.expects.stdout_puts("> Shell executed command:")
|
48
|
-
@stream_wrapper.expects.stdout_puts("gcc -Iproject/source file.c -o file.out")
|
49
|
-
@stream_wrapper.expects.stdout_puts('')
|
50
|
-
@stream_wrapper.expects.stdout_flush
|
51
|
-
|
52
|
-
@tool_executor_helper.print_happy_results("gcc -Iproject/source file.c -o file.out", shell_result)
|
53
|
-
end
|
54
|
-
|
55
|
-
|
56
|
-
should "print no error results" do
|
57
|
-
# zero (success) exit code
|
58
|
-
shell_result = {:output => 'here he comes to save the day!', :exit_code => 0}
|
59
|
-
@tool_executor_helper.print_error_results("", shell_result)
|
60
|
-
|
61
|
-
# non-zero exit code but insufficent verbosity settings
|
62
|
-
shell_result = {:output => "mighty mouse", :exit_code => 1}
|
63
|
-
@verbosinator.expects.should_output?(Verbosity::ERRORS).returns(false)
|
64
|
-
@tool_executor_helper.print_error_results("cmd.exe", shell_result)
|
65
|
-
end
|
66
|
-
|
67
|
-
should "print error results with response" do
|
68
|
-
# non-zero exit code (fail) and sufficent verbosity settings
|
69
|
-
shell_result = {:output => "coverage: 56%", :exit_code => 99}
|
70
|
-
@verbosinator.expects.should_output?(Verbosity::ERRORS).returns(true)
|
71
|
-
|
72
|
-
@stream_wrapper.expects.stderr_puts("ERROR: Shell command failed.")
|
73
|
-
@stream_wrapper.expects.stderr_puts("> Shell executed command:")
|
74
|
-
@stream_wrapper.expects.stderr_puts("bullseye.exe project/build/output")
|
75
|
-
@stream_wrapper.expects.stderr_puts("> Produced response:")
|
76
|
-
@stream_wrapper.expects.stderr_puts("coverage: 56%")
|
77
|
-
@stream_wrapper.expects.stderr_puts("> And exited with status: [99].")
|
78
|
-
@stream_wrapper.expects.stderr_puts('')
|
79
|
-
@stream_wrapper.expects.stderr_flush
|
80
|
-
|
81
|
-
@tool_executor_helper.print_error_results("bullseye.exe project/build/output", shell_result)
|
82
|
-
end
|
83
|
-
|
84
|
-
should "print error results with no response" do
|
85
|
-
# non-zero exit code (fail) and sufficent verbosity settings
|
86
|
-
shell_result = {:output => "", :exit_code => 21}
|
87
|
-
@verbosinator.expects.should_output?(Verbosity::ERRORS).returns(true)
|
88
|
-
|
89
|
-
@stream_wrapper.expects.stderr_puts("ERROR: Shell command failed.")
|
90
|
-
@stream_wrapper.expects.stderr_puts("> Shell executed command:")
|
91
|
-
@stream_wrapper.expects.stderr_puts("bullseye.exe project/build/output")
|
92
|
-
@stream_wrapper.expects.stderr_puts("> And exited with status: [21].")
|
93
|
-
@stream_wrapper.expects.stderr_puts('')
|
94
|
-
@stream_wrapper.expects.stderr_flush
|
95
|
-
|
96
|
-
@tool_executor_helper.print_error_results("bullseye.exe project/build/output", shell_result)
|
97
|
-
end
|
98
|
-
|
99
|
-
end
|
100
|
-
|