ceedling 0.15.1 → 0.15.2
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/Gemfile +1 -1
- data/Gemfile.lock +9 -13
- data/README.md +21 -3
- data/{rakefile.rb → Rakefile} +0 -0
- data/lib/ceedling/version.rb +4 -4
- data/lib/ceedling/version.rb.erb +1 -1
- data/release/version.info +1 -1
- data/vendor/c_exception/Gemfile +1 -1
- data/vendor/c_exception/Gemfile.lock +12 -0
- data/vendor/c_exception/{docs/license.txt → LICENSE.txt} +9 -9
- data/vendor/c_exception/README.md +146 -0
- data/vendor/c_exception/{rakefile.rb → Rakefile} +6 -5
- data/vendor/c_exception/lib/CException.c +9 -6
- data/vendor/c_exception/release/build.info +1 -1
- data/vendor/c_exception/release/version.info +1 -1
- data/vendor/c_exception/test/CExceptionConfig.h +2 -0
- data/vendor/c_exception/test/TestException.c +4 -1
- data/vendor/cmock/README.md +24 -0
- data/vendor/cmock/{rakefile.rb → Rakefile} +12 -12
- data/vendor/cmock/docs/CMock Summary.odt +0 -0
- data/vendor/cmock/docs/CMock Summary.pdf +0 -0
- data/vendor/cmock/docs/CMock_Summary.md +130 -111
- data/vendor/cmock/docs/license.txt +1 -1
- data/vendor/cmock/lib/cmock.rb +36 -12
- data/vendor/cmock/lib/cmock_config.rb +39 -36
- data/vendor/cmock/lib/cmock_generator.rb +33 -25
- data/vendor/cmock/lib/cmock_generator_plugin_expect_any_args.rb +68 -0
- data/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +18 -42
- data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +2 -2
- data/vendor/cmock/lib/cmock_generator_utils.rb +39 -29
- data/vendor/cmock/lib/cmock_header_parser.rb +46 -39
- data/vendor/cmock/rakefile_helper.rb +38 -38
- data/vendor/cmock/src/cmock.c +20 -4
- data/vendor/cmock/src/cmock.h +6 -1
- data/vendor/cmock/src/cmock_internals.h +26 -3
- data/vendor/cmock/targets/clang_strict.yml +85 -0
- data/vendor/cmock/targets/gcc.yml +4 -2
- data/vendor/cmock/targets/gcc_64.yml +55 -0
- data/vendor/cmock/test/c/TestCMockC.c +3 -3
- data/vendor/cmock/test/c/TestCMockCDynamic.c +11 -11
- data/vendor/cmock/test/c/TestCMockCDynamic_Runner.c +4 -2
- data/vendor/cmock/test/c/TestCMockC_Runner.c +1 -1
- data/vendor/cmock/test/system/systest_generator.rb +38 -26
- data/vendor/cmock/test/system/test_compilation/const.h +8 -3
- data/vendor/cmock/test/system/test_interactions/all_plugins_but_other_limits.yml +92 -58
- data/vendor/cmock/test/system/test_interactions/all_plugins_coexist.yml +53 -48
- data/vendor/cmock/test/system/test_interactions/array_and_pointer_handling.yml +58 -56
- data/vendor/cmock/test/system/test_interactions/basic_expect_and_return.yml +19 -18
- data/vendor/cmock/test/system/test_interactions/expect_and_return_custom_types.yml +13 -13
- data/vendor/cmock/test/system/test_interactions/expect_and_return_treat_as.yml +20 -20
- data/vendor/cmock/test/system/test_interactions/expect_any_args.yml +238 -0
- data/vendor/cmock/test/system/test_interactions/fancy_pointer_handling.yml +36 -34
- data/vendor/cmock/test/system/test_interactions/ignore_and_return.yml +24 -15
- data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml +11 -11
- data/vendor/cmock/test/system/test_interactions/return_thru_ptr_and_expect_any_args.yml +235 -0
- data/vendor/cmock/test/system/test_interactions/return_thru_ptr_ignore_arg.yml +22 -26
- data/vendor/cmock/test/system/test_interactions/stubs_with_callbacks.yml +31 -31
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +141 -109
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +82 -0
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +17 -81
- data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +10 -10
- data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +47 -41
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +290 -227
- data/vendor/unity/{rakefile.rb → Rakefile} +13 -6
- data/vendor/unity/auto/colour_prompt.rb +33 -12
- data/vendor/unity/auto/generate_test_runner.rb +67 -63
- data/vendor/unity/auto/parseOutput.rb +189 -0
- data/vendor/{cmock/vendor/unity/examples → unity/examples/example_1}/makefile +41 -40
- data/vendor/unity/examples/example_1/readme.txt +5 -0
- data/vendor/{cmock/vendor/unity/examples → unity/examples/example_1}/src/ProductionCode.c +24 -24
- data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_1}/src/ProductionCode.h +3 -3
- data/vendor/{cmock/vendor/unity/examples → unity/examples/example_1}/src/ProductionCode2.c +9 -9
- data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_1}/src/ProductionCode2.h +2 -2
- data/vendor/{cmock/vendor/unity/examples → unity/examples/example_1}/test/TestProductionCode.c +62 -62
- data/vendor/unity/examples/{test → example_1/test}/TestProductionCode2.c +31 -31
- data/vendor/unity/examples/{test/no_ruby → example_1/test/test_runners}/TestProductionCode2_Runner.c +46 -46
- data/vendor/unity/examples/{test/no_ruby → example_1/test/test_runners}/TestProductionCode_Runner.c +50 -50
- data/vendor/unity/examples/example_2/makefile +45 -0
- data/vendor/unity/examples/example_2/readme.txt +5 -0
- data/vendor/unity/examples/{src → example_2/src}/ProductionCode.c +24 -24
- data/vendor/unity/examples/{src → example_2/src}/ProductionCode.h +3 -3
- data/vendor/unity/examples/{src → example_2/src}/ProductionCode2.c +9 -9
- data/vendor/unity/examples/{src → example_2/src}/ProductionCode2.h +2 -2
- data/vendor/unity/examples/{test → example_2/test}/TestProductionCode.c +64 -62
- data/vendor/{cmock/vendor/unity/examples → unity/examples/example_2}/test/TestProductionCode2.c +33 -31
- data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +9 -0
- data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +11 -0
- data/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -0
- data/vendor/unity/examples/{helper → example_3/helper}/UnityHelper.c +10 -10
- data/vendor/{cmock/vendor/unity/examples → unity/examples/example_3}/helper/UnityHelper.h +12 -12
- data/vendor/unity/examples/{makefile → example_3/makefile} +41 -40
- data/vendor/unity/examples/{rakefile.rb → example_3/rakefile.rb} +44 -43
- data/vendor/{cmock/vendor/unity/examples → unity/examples/example_3}/rakefile_helper.rb +256 -256
- data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/readme.txt +18 -17
- data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/src/ProductionCode.c +24 -24
- data/vendor/{cmock/vendor/unity/examples → unity/examples/example_3}/src/ProductionCode.h +3 -3
- data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/src/ProductionCode2.c +9 -9
- data/vendor/{cmock/vendor/unity/examples → unity/examples/example_3}/src/ProductionCode2.h +2 -2
- data/vendor/{c_exception/vendor/unity/targets/gcc_64.yml → unity/examples/example_3/target_gcc_32.yml} +46 -44
- data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/test/TestProductionCode.c +62 -62
- data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/test/TestProductionCode2.c +31 -31
- data/vendor/{c_exception/vendor/unity/examples → unity/examples/example_3}/test/no_ruby/TestProductionCode2_Runner.c +46 -46
- data/vendor/{cmock/vendor/unity/examples → unity/examples/example_3}/test/no_ruby/TestProductionCode_Runner.c +50 -50
- data/vendor/unity/extras/eclipse/error_parsers.txt +26 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.c +4 -1
- data/vendor/unity/extras/fixture/src/unity_fixture.h +17 -16
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +7 -7
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +17 -0
- data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +1 -0
- data/vendor/unity/makefile +6 -4
- data/vendor/unity/rakefile_helper.rb +36 -27
- data/vendor/unity/src/unity.c +180 -181
- data/vendor/unity/src/unity.h +64 -2
- data/vendor/unity/src/unity_internals.h +188 -102
- data/vendor/unity/targets/clang_strict.yml +83 -0
- data/vendor/unity/targets/gcc_32.yml +5 -0
- data/vendor/unity/targets/gcc_64.yml +5 -0
- data/vendor/{c_exception/vendor/unity/targets/gcc.yml → unity/targets/gcc_auto_limits.yml} +5 -2
- data/vendor/{cmock/vendor/unity/targets/gcc_64.yml → unity/targets/gcc_auto_sizeof.yml} +6 -3
- data/vendor/{cmock/vendor/unity/targets/gcc.yml → unity/targets/gcc_auto_stdint.yml} +4 -2
- data/vendor/unity/test/expectdata/testsample_cmd.c +57 -54
- data/vendor/unity/test/expectdata/testsample_def.c +53 -50
- data/vendor/unity/test/expectdata/testsample_mock_cmd.c +79 -76
- data/vendor/unity/test/expectdata/testsample_mock_def.c +75 -72
- data/vendor/unity/test/expectdata/testsample_mock_new1.c +88 -85
- data/vendor/unity/test/expectdata/testsample_mock_new2.c +88 -85
- data/vendor/unity/test/expectdata/testsample_mock_param.c +76 -73
- data/vendor/unity/test/expectdata/testsample_mock_run1.c +88 -85
- data/vendor/unity/test/expectdata/testsample_mock_run2.c +88 -85
- data/vendor/unity/test/expectdata/testsample_mock_yaml.c +89 -86
- data/vendor/unity/test/expectdata/testsample_new1.c +63 -60
- data/vendor/unity/test/expectdata/testsample_new2.c +66 -63
- data/vendor/unity/test/expectdata/testsample_param.c +54 -51
- data/vendor/unity/test/expectdata/testsample_run1.c +63 -60
- data/vendor/unity/test/expectdata/testsample_run2.c +66 -63
- data/vendor/unity/test/expectdata/testsample_yaml.c +67 -64
- data/vendor/unity/test/test_generate_test_runner.rb +66 -72
- data/vendor/unity/test/testunity.c +591 -111
- metadata +58 -195
- data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +0 -94
- data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +0 -39
- data/vendor/c_exception/vendor/unity/auto/generate_config.yml +0 -36
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +0 -202
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +0 -313
- data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +0 -23
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +0 -139
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -217
- data/vendor/c_exception/vendor/unity/docs/license.txt +0 -31
- data/vendor/c_exception/vendor/unity/examples/helper/UnityHelper.c +0 -10
- data/vendor/c_exception/vendor/unity/examples/helper/UnityHelper.h +0 -12
- data/vendor/c_exception/vendor/unity/examples/makefile +0 -40
- data/vendor/c_exception/vendor/unity/examples/rakefile.rb +0 -32
- data/vendor/c_exception/vendor/unity/examples/rakefile_helper.rb +0 -256
- data/vendor/c_exception/vendor/unity/examples/test/no_ruby/TestProductionCode_Runner.c +0 -50
- data/vendor/c_exception/vendor/unity/extras/fixture/build/MakefileWorker.mk +0 -331
- data/vendor/c_exception/vendor/unity/extras/fixture/build/filterGcov.sh +0 -61
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +0 -37
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +0 -178
- data/vendor/c_exception/vendor/unity/extras/fixture/readme.txt +0 -9
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +0 -381
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +0 -81
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +0 -44
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +0 -16
- data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +0 -21
- data/vendor/c_exception/vendor/unity/extras/fixture/test/testunity_fixture.c +0 -39
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +0 -321
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +0 -40
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.c +0 -56
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_output_Spy.h +0 -17
- data/vendor/c_exception/vendor/unity/makefile +0 -35
- data/vendor/c_exception/vendor/unity/rakefile.rb +0 -59
- data/vendor/c_exception/vendor/unity/rakefile_helper.rb +0 -240
- data/vendor/c_exception/vendor/unity/release/build.info +0 -2
- data/vendor/c_exception/vendor/unity/release/version.info +0 -2
- data/vendor/c_exception/vendor/unity/src/unity.c +0 -979
- data/vendor/c_exception/vendor/unity/src/unity.h +0 -232
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +0 -424
- data/vendor/c_exception/vendor/unity/targets/hitech_picc18.yml +0 -101
- data/vendor/c_exception/vendor/unity/targets/iar_arm_v4.yml +0 -89
- data/vendor/c_exception/vendor/unity/targets/iar_arm_v5.yml +0 -79
- data/vendor/c_exception/vendor/unity/targets/iar_arm_v5_3.yml +0 -79
- data/vendor/c_exception/vendor/unity/targets/iar_armcortex_LM3S9B92_v5_4.yml +0 -93
- data/vendor/c_exception/vendor/unity/targets/iar_cortexm3_v5.yml +0 -83
- data/vendor/c_exception/vendor/unity/targets/iar_msp430.yml +0 -94
- data/vendor/c_exception/vendor/unity/targets/iar_sh2a_v6.yml +0 -85
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +0 -54
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +0 -50
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +0 -76
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +0 -72
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +0 -85
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +0 -85
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +0 -73
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +0 -85
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +0 -85
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +0 -86
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +0 -60
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +0 -63
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +0 -51
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +0 -60
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +0 -63
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +0 -64
- data/vendor/c_exception/vendor/unity/test/test_generate_test_runner.rb +0 -94
- data/vendor/c_exception/vendor/unity/test/testdata/mocksample.c +0 -51
- data/vendor/c_exception/vendor/unity/test/testdata/sample.yml +0 -9
- data/vendor/c_exception/vendor/unity/test/testdata/testsample.c +0 -51
- data/vendor/c_exception/vendor/unity/test/testparameterized.c +0 -101
- data/vendor/c_exception/vendor/unity/test/testunity.c +0 -2024
- 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/docs/license.txt +0 -30
- data/vendor/cmock/vendor/c_exception/docs/readme.txt +0 -236
- data/vendor/cmock/vendor/c_exception/lib/CException.c +0 -39
- data/vendor/cmock/vendor/c_exception/lib/CException.h +0 -70
- data/vendor/cmock/vendor/c_exception/makefile +0 -24
- data/vendor/cmock/vendor/c_exception/rakefile.rb +0 -41
- data/vendor/cmock/vendor/c_exception/release/build.info +0 -2
- data/vendor/cmock/vendor/c_exception/release/version.info +0 -2
- data/vendor/cmock/vendor/c_exception/test/CExceptionConfig.h +0 -27
- data/vendor/cmock/vendor/c_exception/test/TestException.c +0 -291
- data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +0 -62
- data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +0 -94
- data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +0 -39
- data/vendor/cmock/vendor/unity/auto/generate_config.yml +0 -36
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +0 -202
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +0 -313
- data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +0 -23
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +0 -139
- data/vendor/cmock/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/cmock/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/Unity Summary.txt +0 -217
- data/vendor/cmock/vendor/unity/docs/license.txt +0 -31
- data/vendor/cmock/vendor/unity/examples/helper/UnityHelper.c +0 -10
- data/vendor/cmock/vendor/unity/examples/rakefile.rb +0 -32
- data/vendor/cmock/vendor/unity/examples/readme.txt +0 -18
- data/vendor/cmock/vendor/unity/examples/test/no_ruby/TestProductionCode2_Runner.c +0 -46
- data/vendor/cmock/vendor/unity/extras/fixture/build/MakefileWorker.mk +0 -331
- data/vendor/cmock/vendor/unity/extras/fixture/build/filterGcov.sh +0 -61
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +0 -37
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +0 -178
- data/vendor/cmock/vendor/unity/extras/fixture/readme.txt +0 -9
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +0 -381
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +0 -81
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +0 -44
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +0 -16
- data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +0 -21
- data/vendor/cmock/vendor/unity/extras/fixture/test/testunity_fixture.c +0 -39
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +0 -321
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +0 -40
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +0 -56
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.h +0 -17
- data/vendor/cmock/vendor/unity/makefile +0 -35
- data/vendor/cmock/vendor/unity/rakefile.rb +0 -48
- data/vendor/cmock/vendor/unity/rakefile_helper.rb +0 -240
- data/vendor/cmock/vendor/unity/release/build.info +0 -2
- data/vendor/cmock/vendor/unity/release/version.info +0 -2
- data/vendor/cmock/vendor/unity/src/unity.c +0 -979
- data/vendor/cmock/vendor/unity/src/unity.h +0 -232
- data/vendor/cmock/vendor/unity/src/unity_internals.h +0 -424
- data/vendor/cmock/vendor/unity/targets/hitech_picc18.yml +0 -101
- data/vendor/cmock/vendor/unity/targets/iar_arm_v4.yml +0 -89
- data/vendor/cmock/vendor/unity/targets/iar_arm_v5.yml +0 -79
- data/vendor/cmock/vendor/unity/targets/iar_arm_v5_3.yml +0 -79
- data/vendor/cmock/vendor/unity/targets/iar_armcortex_LM3S9B92_v5_4.yml +0 -93
- data/vendor/cmock/vendor/unity/targets/iar_cortexm3_v5.yml +0 -83
- data/vendor/cmock/vendor/unity/targets/iar_msp430.yml +0 -94
- data/vendor/cmock/vendor/unity/targets/iar_sh2a_v6.yml +0 -85
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +0 -54
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +0 -50
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +0 -76
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +0 -72
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +0 -85
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +0 -85
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +0 -73
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +0 -85
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +0 -85
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +0 -86
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +0 -60
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +0 -63
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +0 -51
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +0 -60
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +0 -63
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +0 -64
- data/vendor/cmock/vendor/unity/test/test_generate_test_runner.rb +0 -94
- data/vendor/cmock/vendor/unity/test/testdata/mocksample.c +0 -51
- data/vendor/cmock/vendor/unity/test/testdata/sample.yml +0 -9
- data/vendor/cmock/vendor/unity/test/testdata/testsample.c +0 -51
- data/vendor/cmock/vendor/unity/test/testparameterized.c +0 -101
- data/vendor/cmock/vendor/unity/test/testunity.c +0 -2024
- data/vendor/unity/Gemfile +0 -4
- data/vendor/unity/examples/helper/UnityHelper.h +0 -12
- data/vendor/unity/examples/rakefile_helper.rb +0 -256
- data/vendor/unity/examples/readme.txt +0 -18
|
@@ -4,12 +4,17 @@
|
|
|
4
4
|
[Released under MIT License. Please refer to license.txt for details]
|
|
5
5
|
========================================== */
|
|
6
6
|
|
|
7
|
+
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
|
|
8
|
+
#pragma GCC diagnostic ignored "-Wpragmas"
|
|
9
|
+
#endif
|
|
10
|
+
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
|
|
11
|
+
#pragma GCC diagnostic ignored "-Wduplicate-decl-specifier"
|
|
12
|
+
|
|
7
13
|
struct _DUMMY_T { unsigned int a; float b; };
|
|
8
14
|
|
|
9
15
|
void const_variants1( const char* a, int const, unsigned short const * c );
|
|
10
16
|
|
|
11
|
-
void const_variants2(
|
|
17
|
+
void const_variants2(
|
|
12
18
|
struct _DUMMY_T const * const param1,
|
|
13
19
|
const unsigned long int const * const param2,
|
|
14
|
-
const struct _DUMMY_T const * param3 );
|
|
15
|
-
|
|
20
|
+
const struct _DUMMY_T const * param3 );
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
:cmock:
|
|
4
4
|
:enforce_strict_ordering: 1
|
|
5
5
|
:treat_externs: :include
|
|
6
|
-
:ignore: :args_only
|
|
7
6
|
:plugins:
|
|
8
7
|
- :array
|
|
9
8
|
- :cexception
|
|
10
9
|
- :ignore
|
|
11
10
|
- :callback
|
|
11
|
+
- :return_thru_ptr
|
|
12
|
+
- :ignore_arg
|
|
13
|
+
- :expect_any_args
|
|
12
14
|
|
|
13
15
|
:systest:
|
|
14
16
|
:types: |
|
|
@@ -23,14 +25,14 @@
|
|
|
23
25
|
POINT_T* bar(void);
|
|
24
26
|
void fooa(POINT_T a[]);
|
|
25
27
|
void foos(const char * a);
|
|
26
|
-
extern const char
|
|
27
|
-
void no_pointers(int a, char* b);
|
|
28
|
+
extern const char* bars(void);
|
|
29
|
+
void no_pointers(int a, const char* b);
|
|
28
30
|
int mixed(int a, int* b, int c);
|
|
29
31
|
void no_args(void);
|
|
30
32
|
|
|
31
|
-
:source:
|
|
32
|
-
:header: |
|
|
33
|
-
#include "CException.h"
|
|
33
|
+
:source:
|
|
34
|
+
:header: |
|
|
35
|
+
#include "CException.h"
|
|
34
36
|
void function_a(void);
|
|
35
37
|
void function_b(void);
|
|
36
38
|
void function_c(void);
|
|
@@ -38,40 +40,40 @@
|
|
|
38
40
|
void function_e(void);
|
|
39
41
|
|
|
40
42
|
:code: |
|
|
41
|
-
void function_a(void)
|
|
43
|
+
void function_a(void)
|
|
42
44
|
{
|
|
43
45
|
foo(bar());
|
|
44
|
-
}
|
|
46
|
+
}
|
|
45
47
|
|
|
46
48
|
void function_b(void) {
|
|
47
49
|
fooa(bar());
|
|
48
50
|
}
|
|
49
|
-
|
|
51
|
+
|
|
50
52
|
void function_c(void) {
|
|
51
53
|
CEXCEPTION_T e;
|
|
52
54
|
Try {
|
|
53
55
|
foos(bars());
|
|
54
56
|
} Catch(e) { foos("err"); }
|
|
55
57
|
}
|
|
56
|
-
|
|
58
|
+
|
|
57
59
|
int function_d(void) {
|
|
58
60
|
int test_list[] = { 1, 2, 3, 4, 5 };
|
|
59
61
|
no_pointers(1, "silly");
|
|
60
62
|
return mixed(6, test_list, 7);
|
|
61
63
|
}
|
|
62
|
-
|
|
64
|
+
|
|
63
65
|
void function_e(void) {
|
|
64
66
|
foos("Hello");
|
|
65
67
|
foos("Tuna");
|
|
66
68
|
foos("Oranges");
|
|
67
69
|
}
|
|
68
|
-
|
|
70
|
+
|
|
69
71
|
:tests:
|
|
70
72
|
:common: |
|
|
71
73
|
#include "CException.h"
|
|
72
74
|
void setUp(void) {}
|
|
73
75
|
void tearDown(void) {}
|
|
74
|
-
|
|
76
|
+
|
|
75
77
|
:units:
|
|
76
78
|
- :pass: TRUE
|
|
77
79
|
:should: 'handle the situation where we pass nulls to pointers'
|
|
@@ -80,10 +82,10 @@
|
|
|
80
82
|
{
|
|
81
83
|
bar_ExpectAndReturn(NULL);
|
|
82
84
|
foo_Expect(NULL);
|
|
83
|
-
|
|
85
|
+
|
|
84
86
|
function_a();
|
|
85
87
|
}
|
|
86
|
-
|
|
88
|
+
|
|
87
89
|
- :pass: FALSE
|
|
88
90
|
:should: 'handle the situation where we expected nulls to pointers but did not get that'
|
|
89
91
|
:code: |
|
|
@@ -92,10 +94,10 @@
|
|
|
92
94
|
POINT_T pt = {1, 2};
|
|
93
95
|
bar_ExpectAndReturn(&pt);
|
|
94
96
|
foo_Expect(NULL);
|
|
95
|
-
|
|
97
|
+
|
|
96
98
|
function_a();
|
|
97
99
|
}
|
|
98
|
-
|
|
100
|
+
|
|
99
101
|
- :pass: FALSE
|
|
100
102
|
:should: 'handle the situation where we did not expect nulls to pointers but got null'
|
|
101
103
|
:code: |
|
|
@@ -104,10 +106,10 @@
|
|
|
104
106
|
POINT_T ex = {1, 2};
|
|
105
107
|
bar_ExpectAndReturn(NULL);
|
|
106
108
|
foo_Expect(&ex);
|
|
107
|
-
|
|
109
|
+
|
|
108
110
|
function_a();
|
|
109
111
|
}
|
|
110
|
-
|
|
112
|
+
|
|
111
113
|
- :pass: FALSE
|
|
112
114
|
:should: 'handle the situation where we pass single object with expect and it is wrong'
|
|
113
115
|
:code: |
|
|
@@ -117,10 +119,10 @@
|
|
|
117
119
|
POINT_T ex = {1, 3};
|
|
118
120
|
bar_ExpectAndReturn(&pt);
|
|
119
121
|
foo_Expect(&ex);
|
|
120
|
-
|
|
122
|
+
|
|
121
123
|
function_a();
|
|
122
124
|
}
|
|
123
|
-
|
|
125
|
+
|
|
124
126
|
- :pass: TRUE
|
|
125
127
|
:should: 'handle the situation where we pass single object with expect and use array handler'
|
|
126
128
|
:code: |
|
|
@@ -130,10 +132,10 @@
|
|
|
130
132
|
POINT_T ex = {1, 2};
|
|
131
133
|
bar_ExpectAndReturn(&pt);
|
|
132
134
|
foo_ExpectWithArray(&ex, 1);
|
|
133
|
-
|
|
135
|
+
|
|
134
136
|
function_a();
|
|
135
137
|
}
|
|
136
|
-
|
|
138
|
+
|
|
137
139
|
- :pass: FALSE
|
|
138
140
|
:should: 'handle the situation where we pass single object with expect and use array handler and it is wrong'
|
|
139
141
|
:code: |
|
|
@@ -143,10 +145,10 @@
|
|
|
143
145
|
POINT_T ex = {1, 3};
|
|
144
146
|
bar_ExpectAndReturn(&pt);
|
|
145
147
|
foo_ExpectWithArray(&ex, 1);
|
|
146
|
-
|
|
148
|
+
|
|
147
149
|
function_a();
|
|
148
150
|
}
|
|
149
|
-
|
|
151
|
+
|
|
150
152
|
- :pass: TRUE
|
|
151
153
|
:should: 'handle the situation where we pass multiple objects with expect and use array handler'
|
|
152
154
|
:code: |
|
|
@@ -156,10 +158,10 @@
|
|
|
156
158
|
POINT_T ex[] = {{1, 2}, {3, 4}, {5, 6}};
|
|
157
159
|
bar_ExpectAndReturn(pt);
|
|
158
160
|
foo_ExpectWithArray(ex, 3);
|
|
159
|
-
|
|
161
|
+
|
|
160
162
|
function_a();
|
|
161
163
|
}
|
|
162
|
-
|
|
164
|
+
|
|
163
165
|
- :pass: FALSE
|
|
164
166
|
:should: 'handle the situation where we pass multiple objects with expect and use array handler and it is wrong at end'
|
|
165
167
|
:code: |
|
|
@@ -169,7 +171,7 @@
|
|
|
169
171
|
POINT_T ex[] = {{1, 2}, {3, 4}, {5, 9}};
|
|
170
172
|
bar_ExpectAndReturn(pt);
|
|
171
173
|
foo_ExpectWithArray(ex, 3);
|
|
172
|
-
|
|
174
|
+
|
|
173
175
|
function_a();
|
|
174
176
|
}
|
|
175
177
|
|
|
@@ -182,7 +184,7 @@
|
|
|
182
184
|
POINT_T ex = {1, 2};
|
|
183
185
|
bar_ExpectAndReturn(&pt);
|
|
184
186
|
fooa_Expect(&ex);
|
|
185
|
-
|
|
187
|
+
|
|
186
188
|
function_b();
|
|
187
189
|
}
|
|
188
190
|
|
|
@@ -191,20 +193,24 @@
|
|
|
191
193
|
:code: |
|
|
192
194
|
test()
|
|
193
195
|
{
|
|
194
|
-
|
|
196
|
+
const char* constretval = "This is a\0 silly string";
|
|
197
|
+
char* retval = (char*)constretval;
|
|
198
|
+
bars_ExpectAndReturn(retval);
|
|
195
199
|
foos_Expect("This is a\0 wacky string");
|
|
196
|
-
|
|
200
|
+
|
|
197
201
|
function_c();
|
|
198
202
|
}
|
|
199
|
-
|
|
203
|
+
|
|
200
204
|
- :pass: FALSE
|
|
201
205
|
:should: 'handle standard c string as null terminated and not do crappy memory compares of a byte, finding failures'
|
|
202
206
|
:code: |
|
|
203
207
|
test()
|
|
204
208
|
{
|
|
205
|
-
|
|
209
|
+
const char* constretval = "This is a silly string";
|
|
210
|
+
char* retval = (char*)constretval;
|
|
211
|
+
bars_ExpectAndReturn(retval);
|
|
206
212
|
foos_Expect("This is a wacky string");
|
|
207
|
-
|
|
213
|
+
|
|
208
214
|
function_c();
|
|
209
215
|
}
|
|
210
216
|
|
|
@@ -216,7 +222,7 @@
|
|
|
216
222
|
int expect_list[] = { 1, 9 };
|
|
217
223
|
no_pointers_Expect(1, "silly");
|
|
218
224
|
mixed_ExpectAndReturn(6, expect_list, 7, 13);
|
|
219
|
-
|
|
225
|
+
|
|
220
226
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
221
227
|
}
|
|
222
228
|
|
|
@@ -228,7 +234,7 @@
|
|
|
228
234
|
int expect_list[] = { 9, 1 };
|
|
229
235
|
no_pointers_Expect(1, "silly");
|
|
230
236
|
mixed_ExpectAndReturn(6, expect_list, 7, 13);
|
|
231
|
-
|
|
237
|
+
|
|
232
238
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
233
239
|
}
|
|
234
240
|
|
|
@@ -240,7 +246,7 @@
|
|
|
240
246
|
int expect_list[] = { 1, 2, 3, 4, 6 };
|
|
241
247
|
no_pointers_Expect(1, "silly");
|
|
242
248
|
mixed_ExpectWithArrayAndReturn(6, expect_list, 4, 7, 13);
|
|
243
|
-
|
|
249
|
+
|
|
244
250
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
245
251
|
}
|
|
246
252
|
|
|
@@ -252,7 +258,7 @@
|
|
|
252
258
|
int expect_list[] = { 1, 2, 3, 4, 6 };
|
|
253
259
|
no_pointers_Expect(1, "silly");
|
|
254
260
|
mixed_ExpectWithArrayAndReturn(6, expect_list, 5, 7, 13);
|
|
255
|
-
|
|
261
|
+
|
|
256
262
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
257
263
|
}
|
|
258
264
|
|
|
@@ -261,10 +267,12 @@
|
|
|
261
267
|
:code: |
|
|
262
268
|
test()
|
|
263
269
|
{
|
|
264
|
-
|
|
270
|
+
const char* constretval = "This is a\0 silly string";
|
|
271
|
+
char* retval = (char*)constretval;
|
|
272
|
+
bars_ExpectAndReturn(retval);
|
|
265
273
|
foos_ExpectAndThrow("This is a\0 wacky string", 55);
|
|
266
274
|
foos_Expect("err");
|
|
267
|
-
|
|
275
|
+
|
|
268
276
|
function_c();
|
|
269
277
|
}
|
|
270
278
|
|
|
@@ -273,10 +281,12 @@
|
|
|
273
281
|
:code: |
|
|
274
282
|
test()
|
|
275
283
|
{
|
|
276
|
-
|
|
284
|
+
const char* constretval = "This is a\0 silly string";
|
|
285
|
+
char* retval = (char*)constretval;
|
|
286
|
+
bars_ExpectAndReturn(retval);
|
|
277
287
|
foos_ExpectAndThrow("This is a\0 wacky string", 55);
|
|
278
288
|
foos_Expect("wrong error");
|
|
279
|
-
|
|
289
|
+
|
|
280
290
|
function_c();
|
|
281
291
|
}
|
|
282
292
|
|
|
@@ -288,53 +298,77 @@
|
|
|
288
298
|
int expect_list[] = { 1, 2, 3, 4, 6 };
|
|
289
299
|
mixed_ExpectWithArrayAndReturn(6, expect_list, 4, 7, 13);
|
|
290
300
|
no_pointers_Expect(1, "silly");
|
|
291
|
-
|
|
301
|
+
|
|
292
302
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
293
303
|
}
|
|
294
304
|
|
|
295
305
|
- :pass: TRUE
|
|
296
|
-
:should: 'properly
|
|
306
|
+
:should: 'properly ExpectAnyArgs first function but the other will work properly'
|
|
297
307
|
:code: |
|
|
298
308
|
test()
|
|
299
309
|
{
|
|
300
310
|
int expect_list[] = { 1, 2, 3, 4, 6 };
|
|
301
|
-
|
|
311
|
+
no_pointers_ExpectAnyArgs();
|
|
302
312
|
mixed_ExpectWithArrayAndReturn(6, expect_list, 4, 7, 13);
|
|
303
|
-
|
|
313
|
+
|
|
304
314
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
305
315
|
}
|
|
306
316
|
|
|
307
317
|
- :pass: TRUE
|
|
308
|
-
:should: 'properly
|
|
318
|
+
:should: 'properly ExpectAnyArgs last function but the other will work properly'
|
|
309
319
|
:code: |
|
|
310
320
|
test()
|
|
311
321
|
{
|
|
312
322
|
no_pointers_Expect(1, "silly");
|
|
313
|
-
|
|
314
|
-
|
|
323
|
+
mixed_ExpectAnyArgsAndReturn(13);
|
|
324
|
+
|
|
315
325
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
316
326
|
}
|
|
317
327
|
|
|
318
328
|
- :pass: TRUE
|
|
319
|
-
:should: 'be ok if we
|
|
329
|
+
:should: 'be ok if we ExpectAnyArgs a call each because we are counting calls'
|
|
330
|
+
:code: |
|
|
331
|
+
test()
|
|
332
|
+
{
|
|
333
|
+
foos_ExpectAnyArgs();
|
|
334
|
+
foos_ExpectAnyArgs();
|
|
335
|
+
foos_ExpectAnyArgs();
|
|
336
|
+
|
|
337
|
+
function_e();
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
- :pass: TRUE
|
|
341
|
+
:should: 'be ok if we ExpectAnyArgs and Expect intermixed because we are counting calls'
|
|
320
342
|
:code: |
|
|
321
343
|
test()
|
|
322
344
|
{
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
345
|
+
foos_Expect("Hello");
|
|
346
|
+
foos_ExpectAnyArgs();
|
|
347
|
+
foos_ExpectAnyArgs();
|
|
348
|
+
|
|
327
349
|
function_e();
|
|
328
350
|
}
|
|
329
351
|
|
|
330
352
|
- :pass: FALSE
|
|
331
|
-
:should: '
|
|
353
|
+
:should: 'be able to detect Expect problem if we ExpectAnyArgs and Expect intermixed'
|
|
332
354
|
:code: |
|
|
333
355
|
test()
|
|
334
356
|
{
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
357
|
+
foos_Expect("Hello");
|
|
358
|
+
foos_ExpectAnyArgs();
|
|
359
|
+
foos_Expect("Wrong");
|
|
360
|
+
|
|
361
|
+
function_e();
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
- :pass: FALSE
|
|
365
|
+
:should: 'fail if we do not ExpectAnyArgs a call once because we are counting calls'
|
|
366
|
+
:code: |
|
|
367
|
+
test()
|
|
368
|
+
{
|
|
369
|
+
foos_ExpectAnyArgs();
|
|
370
|
+
foos_ExpectAnyArgs();
|
|
371
|
+
|
|
338
372
|
function_e();
|
|
339
373
|
}
|
|
340
374
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
- :callback
|
|
9
9
|
- :return_thru_ptr
|
|
10
10
|
- :ignore_arg
|
|
11
|
+
- :expect_any_args
|
|
11
12
|
:callback_after_arg_check: true
|
|
12
13
|
:callback_include_count: false
|
|
13
14
|
:treat_externs: :include
|
|
@@ -26,13 +27,13 @@
|
|
|
26
27
|
void fooa(POINT_T a[]);
|
|
27
28
|
void foos(const char * a);
|
|
28
29
|
const char * bars(void);
|
|
29
|
-
void no_pointers(int a, char* b);
|
|
30
|
+
void no_pointers(int a, const char* b);
|
|
30
31
|
int mixed(int a, int* b, int c);
|
|
31
32
|
void no_args(void);
|
|
32
33
|
|
|
33
|
-
:source:
|
|
34
|
-
:header: |
|
|
35
|
-
#include "CException.h"
|
|
34
|
+
:source:
|
|
35
|
+
:header: |
|
|
36
|
+
#include "CException.h"
|
|
36
37
|
void function_a(void);
|
|
37
38
|
void function_b(void);
|
|
38
39
|
void function_c(void);
|
|
@@ -40,41 +41,41 @@
|
|
|
40
41
|
void function_e(void);
|
|
41
42
|
|
|
42
43
|
:code: |
|
|
43
|
-
void function_a(void)
|
|
44
|
+
void function_a(void)
|
|
44
45
|
{
|
|
45
46
|
foo(bar());
|
|
46
|
-
}
|
|
47
|
+
}
|
|
47
48
|
|
|
48
49
|
void function_b(void) {
|
|
49
50
|
fooa(bar());
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
|
|
52
53
|
void function_c(void) {
|
|
53
54
|
CEXCEPTION_T e;
|
|
54
55
|
Try {
|
|
55
56
|
foos(bars());
|
|
56
57
|
} Catch(e) { foos("err"); }
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
+
|
|
59
60
|
int function_d(void) {
|
|
60
61
|
int test_list[] = { 1, 2, 3, 4, 5 };
|
|
61
62
|
no_pointers(1, "silly");
|
|
62
63
|
return mixed(6, test_list, 7);
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
+
|
|
65
66
|
void function_e(void) {
|
|
66
67
|
foos("Hello");
|
|
67
68
|
foos("Tuna");
|
|
68
69
|
foos("Oranges");
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
+
|
|
71
72
|
:tests:
|
|
72
73
|
:common: |
|
|
73
74
|
#include "CException.h"
|
|
74
75
|
void setUp(void) {}
|
|
75
76
|
void tearDown(void) {}
|
|
76
77
|
void my_foo_callback(POINT_T* a) { TEST_ASSERT_EQUAL_INT(2, a->x); }
|
|
77
|
-
|
|
78
|
+
|
|
78
79
|
:units:
|
|
79
80
|
- :pass: TRUE
|
|
80
81
|
:should: 'handle the situation where we pass nulls to pointers'
|
|
@@ -83,10 +84,10 @@
|
|
|
83
84
|
{
|
|
84
85
|
bar_ExpectAndReturn(NULL);
|
|
85
86
|
foo_Expect(NULL);
|
|
86
|
-
|
|
87
|
+
|
|
87
88
|
function_a();
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
+
|
|
90
91
|
- :pass: FALSE
|
|
91
92
|
:should: 'handle the situation where we expected nulls to pointers but did not get that'
|
|
92
93
|
:code: |
|
|
@@ -95,10 +96,10 @@
|
|
|
95
96
|
POINT_T pt = {1, 2};
|
|
96
97
|
bar_ExpectAndReturn(&pt);
|
|
97
98
|
foo_Expect(NULL);
|
|
98
|
-
|
|
99
|
+
|
|
99
100
|
function_a();
|
|
100
101
|
}
|
|
101
|
-
|
|
102
|
+
|
|
102
103
|
- :pass: FALSE
|
|
103
104
|
:should: 'handle the situation where we did not expect nulls to pointers but got null'
|
|
104
105
|
:code: |
|
|
@@ -107,10 +108,10 @@
|
|
|
107
108
|
POINT_T ex = {1, 2};
|
|
108
109
|
bar_ExpectAndReturn(NULL);
|
|
109
110
|
foo_Expect(&ex);
|
|
110
|
-
|
|
111
|
+
|
|
111
112
|
function_a();
|
|
112
113
|
}
|
|
113
|
-
|
|
114
|
+
|
|
114
115
|
- :pass: FALSE
|
|
115
116
|
:should: 'handle the situation where we pass single object with expect and it is wrong'
|
|
116
117
|
:code: |
|
|
@@ -120,10 +121,10 @@
|
|
|
120
121
|
POINT_T ex = {1, 3};
|
|
121
122
|
bar_ExpectAndReturn(&pt);
|
|
122
123
|
foo_Expect(&ex);
|
|
123
|
-
|
|
124
|
+
|
|
124
125
|
function_a();
|
|
125
126
|
}
|
|
126
|
-
|
|
127
|
+
|
|
127
128
|
- :pass: TRUE
|
|
128
129
|
:should: 'handle the situation where we pass single object with expect and use array handler'
|
|
129
130
|
:code: |
|
|
@@ -133,10 +134,10 @@
|
|
|
133
134
|
POINT_T ex = {1, 2};
|
|
134
135
|
bar_ExpectAndReturn(&pt);
|
|
135
136
|
foo_ExpectWithArray(&ex, 1);
|
|
136
|
-
|
|
137
|
+
|
|
137
138
|
function_a();
|
|
138
139
|
}
|
|
139
|
-
|
|
140
|
+
|
|
140
141
|
- :pass: FALSE
|
|
141
142
|
:should: 'handle the situation where we pass single object with expect and use array handler and it is wrong'
|
|
142
143
|
:code: |
|
|
@@ -146,10 +147,10 @@
|
|
|
146
147
|
POINT_T ex = {1, 3};
|
|
147
148
|
bar_ExpectAndReturn(&pt);
|
|
148
149
|
foo_ExpectWithArray(&ex, 1);
|
|
149
|
-
|
|
150
|
+
|
|
150
151
|
function_a();
|
|
151
152
|
}
|
|
152
|
-
|
|
153
|
+
|
|
153
154
|
- :pass: TRUE
|
|
154
155
|
:should: 'handle the situation where we pass multiple objects with expect and use array handler'
|
|
155
156
|
:code: |
|
|
@@ -159,10 +160,10 @@
|
|
|
159
160
|
POINT_T ex[] = {{1, 2}, {3, 4}, {5, 6}};
|
|
160
161
|
bar_ExpectAndReturn(pt);
|
|
161
162
|
foo_ExpectWithArray(ex, 3);
|
|
162
|
-
|
|
163
|
+
|
|
163
164
|
function_a();
|
|
164
165
|
}
|
|
165
|
-
|
|
166
|
+
|
|
166
167
|
- :pass: FALSE
|
|
167
168
|
:should: 'handle the situation where we pass multiple objects with expect and use array handler and it is wrong at end'
|
|
168
169
|
:code: |
|
|
@@ -172,7 +173,7 @@
|
|
|
172
173
|
POINT_T ex[] = {{1, 2}, {3, 4}, {5, 9}};
|
|
173
174
|
bar_ExpectAndReturn(pt);
|
|
174
175
|
foo_ExpectWithArray(ex, 3);
|
|
175
|
-
|
|
176
|
+
|
|
176
177
|
function_a();
|
|
177
178
|
}
|
|
178
179
|
|
|
@@ -185,7 +186,7 @@
|
|
|
185
186
|
POINT_T ex = {1, 2};
|
|
186
187
|
bar_ExpectAndReturn(&pt);
|
|
187
188
|
fooa_Expect(&ex);
|
|
188
|
-
|
|
189
|
+
|
|
189
190
|
function_b();
|
|
190
191
|
}
|
|
191
192
|
|
|
@@ -194,20 +195,22 @@
|
|
|
194
195
|
:code: |
|
|
195
196
|
test()
|
|
196
197
|
{
|
|
197
|
-
|
|
198
|
+
const char* retval = "This is a\0 silly string";
|
|
199
|
+
bars_ExpectAndReturn((char*)retval);
|
|
198
200
|
foos_Expect("This is a\0 wacky string");
|
|
199
|
-
|
|
201
|
+
|
|
200
202
|
function_c();
|
|
201
203
|
}
|
|
202
|
-
|
|
204
|
+
|
|
203
205
|
- :pass: FALSE
|
|
204
206
|
:should: 'handle standard c string as null terminated and not do crappy memory compares of a byte, finding failures'
|
|
205
207
|
:code: |
|
|
206
208
|
test()
|
|
207
209
|
{
|
|
208
|
-
|
|
210
|
+
const char* retval = "This is a silly string";
|
|
211
|
+
bars_ExpectAndReturn((char*)retval);
|
|
209
212
|
foos_Expect("This is a wacky string");
|
|
210
|
-
|
|
213
|
+
|
|
211
214
|
function_c();
|
|
212
215
|
}
|
|
213
216
|
|
|
@@ -219,7 +222,7 @@
|
|
|
219
222
|
int expect_list[] = { 1, 9 };
|
|
220
223
|
no_pointers_Expect(1, "silly");
|
|
221
224
|
mixed_ExpectAndReturn(6, expect_list, 7, 13);
|
|
222
|
-
|
|
225
|
+
|
|
223
226
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
224
227
|
}
|
|
225
228
|
|
|
@@ -231,7 +234,7 @@
|
|
|
231
234
|
int expect_list[] = { 9, 1 };
|
|
232
235
|
no_pointers_Expect(1, "silly");
|
|
233
236
|
mixed_ExpectAndReturn(6, expect_list, 7, 13);
|
|
234
|
-
|
|
237
|
+
|
|
235
238
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
236
239
|
}
|
|
237
240
|
|
|
@@ -243,7 +246,7 @@
|
|
|
243
246
|
int expect_list[] = { 1, 2, 3, 4, 6 };
|
|
244
247
|
no_pointers_Expect(1, "silly");
|
|
245
248
|
mixed_ExpectWithArrayAndReturn(6, expect_list, 4, 7, 13);
|
|
246
|
-
|
|
249
|
+
|
|
247
250
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
248
251
|
}
|
|
249
252
|
|
|
@@ -255,7 +258,7 @@
|
|
|
255
258
|
int expect_list[] = { 1, 2, 3, 4, 6 };
|
|
256
259
|
no_pointers_Expect(1, "silly");
|
|
257
260
|
mixed_ExpectWithArrayAndReturn(6, expect_list, 5, 7, 13);
|
|
258
|
-
|
|
261
|
+
|
|
259
262
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
260
263
|
}
|
|
261
264
|
|
|
@@ -264,10 +267,11 @@
|
|
|
264
267
|
:code: |
|
|
265
268
|
test()
|
|
266
269
|
{
|
|
267
|
-
|
|
270
|
+
const char* retval = "This is a\0 silly string";
|
|
271
|
+
bars_ExpectAndReturn((char*)retval);
|
|
268
272
|
foos_ExpectAndThrow("This is a\0 wacky string", 55);
|
|
269
273
|
foos_Expect("err");
|
|
270
|
-
|
|
274
|
+
|
|
271
275
|
function_c();
|
|
272
276
|
}
|
|
273
277
|
|
|
@@ -276,10 +280,11 @@
|
|
|
276
280
|
:code: |
|
|
277
281
|
test()
|
|
278
282
|
{
|
|
279
|
-
|
|
283
|
+
const char* retval = "This is a\0 silly string";
|
|
284
|
+
bars_ExpectAndReturn((char*)retval);
|
|
280
285
|
foos_ExpectAndThrow("This is a\0 wacky string", 55);
|
|
281
286
|
foos_Expect("wrong error");
|
|
282
|
-
|
|
287
|
+
|
|
283
288
|
function_c();
|
|
284
289
|
}
|
|
285
290
|
|
|
@@ -291,7 +296,7 @@
|
|
|
291
296
|
int expect_list[] = { 1, 2, 3, 4, 6 };
|
|
292
297
|
mixed_ExpectWithArrayAndReturn(6, expect_list, 4, 7, 13);
|
|
293
298
|
no_pointers_Expect(1, "silly");
|
|
294
|
-
|
|
299
|
+
|
|
295
300
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
296
301
|
}
|
|
297
302
|
|
|
@@ -303,7 +308,7 @@
|
|
|
303
308
|
int expect_list[] = { 1, 2, 3, 4, 6 };
|
|
304
309
|
mixed_ExpectWithArrayAndReturn(6, expect_list, 4, 7, 13);
|
|
305
310
|
no_pointers_Ignore();
|
|
306
|
-
|
|
311
|
+
|
|
307
312
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
308
313
|
}
|
|
309
314
|
|
|
@@ -314,7 +319,7 @@
|
|
|
314
319
|
{
|
|
315
320
|
mixed_IgnoreAndReturn(13);
|
|
316
321
|
no_pointers_Expect(1, "silly");
|
|
317
|
-
|
|
322
|
+
|
|
318
323
|
TEST_ASSERT_EQUAL(13, function_d());
|
|
319
324
|
}
|
|
320
325
|
|
|
@@ -324,7 +329,7 @@
|
|
|
324
329
|
test()
|
|
325
330
|
{
|
|
326
331
|
foos_Ignore();
|
|
327
|
-
|
|
332
|
+
|
|
328
333
|
function_e();
|
|
329
334
|
}
|
|
330
335
|
|
|
@@ -338,7 +343,7 @@
|
|
|
338
343
|
bar_ExpectAndReturn(&pt1);
|
|
339
344
|
foo_Expect(&pt2);
|
|
340
345
|
foo_StubWithCallback((CMOCK_foo_CALLBACK)my_foo_callback);
|
|
341
|
-
|
|
346
|
+
|
|
342
347
|
function_a();
|
|
343
348
|
}
|
|
344
349
|
|
|
@@ -350,7 +355,7 @@
|
|
|
350
355
|
POINT_T pt = {2, 3};
|
|
351
356
|
bar_ExpectAndReturn(&pt);
|
|
352
357
|
foo_StubWithCallback((CMOCK_foo_CALLBACK)my_foo_callback);
|
|
353
|
-
|
|
358
|
+
|
|
354
359
|
function_a();
|
|
355
360
|
}
|
|
356
361
|
|
|
@@ -364,7 +369,7 @@
|
|
|
364
369
|
bar_ExpectAndReturn(&pt1);
|
|
365
370
|
foo_Expect(&pt2);
|
|
366
371
|
foo_StubWithCallback((CMOCK_foo_CALLBACK)my_foo_callback);
|
|
367
|
-
|
|
372
|
+
|
|
368
373
|
function_a();
|
|
369
374
|
}
|
|
370
375
|
|
|
@@ -377,7 +382,7 @@
|
|
|
377
382
|
bar_ExpectAndReturn(&pt);
|
|
378
383
|
foo_Expect(&pt);
|
|
379
384
|
foo_StubWithCallback((CMOCK_foo_CALLBACK)my_foo_callback);
|
|
380
|
-
|
|
385
|
+
|
|
381
386
|
function_a();
|
|
382
387
|
}
|
|
383
388
|
|