ceedling 0.28.2 → 0.28.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/ceedling +3 -0
- data/assets/ceedling.cmd +1 -0
- data/assets/default_gitignore +5 -0
- data/assets/project_with_guts.yml +1 -0
- data/assets/project_with_guts_gcov.yml +3 -0
- data/assets/test_example_file_verbose.c +12 -0
- data/bin/ceedling +30 -6
- data/docs/CeedlingPacket.md +135 -23
- data/docs/CeedlingPacket.odt +0 -0
- data/examples/blinky/rakefile.rb +2 -1
- data/lib/ceedling/configurator.rb +7 -5
- data/lib/ceedling/configurator_builder.rb +10 -7
- data/lib/ceedling/configurator_plugins.rb +29 -24
- data/lib/ceedling/configurator_setup.rb +0 -1
- data/lib/ceedling/defaults.rb +7 -2
- data/lib/ceedling/dependinator.rb +10 -2
- data/lib/ceedling/file_finder.rb +57 -49
- data/lib/ceedling/file_path_utils.rb +12 -4
- data/lib/ceedling/file_wrapper.rb +4 -0
- data/lib/ceedling/generator.rb +4 -3
- data/lib/ceedling/generator_test_results.rb +15 -13
- data/lib/ceedling/plugin_manager.rb +18 -18
- data/lib/ceedling/plugin_reportinator.rb +3 -2
- data/lib/ceedling/plugin_reportinator_helper.rb +2 -3
- data/lib/ceedling/preprocessinator_extractor.rb +2 -2
- data/lib/ceedling/preprocessinator_includes_handler.rb +5 -0
- data/lib/ceedling/rakefile.rb +1 -0
- data/lib/ceedling/release_invoker_helper.rb +5 -2
- data/lib/ceedling/rules_release.rake +2 -1
- data/lib/ceedling/rules_tests.rake +18 -9
- data/lib/ceedling/rules_tests_deep_dependencies.rake +2 -2
- data/lib/ceedling/task_invoker.rb +15 -3
- data/lib/ceedling/tasks_vendor.rake +3 -3
- data/lib/ceedling/test_invoker.rb +39 -12
- data/lib/ceedling/test_invoker_helper.rb +5 -1
- data/lib/ceedling/tool_executor.rb +8 -4
- data/lib/ceedling/version.rb +1 -1
- data/out.fail +21 -0
- data/plugins/beep/README.md +22 -0
- data/plugins/beep/lib/beep.rb +40 -0
- data/plugins/bullseye/bullseye.rake +43 -36
- data/plugins/bullseye/config/defaults.yml +4 -0
- data/plugins/bullseye/lib/bullseye.rb +27 -5
- data/plugins/command_hooks/lib/command_hooks.rb +3 -0
- data/plugins/gcov/README.md +34 -1
- data/plugins/gcov/config/defaults.yml +3 -3
- data/plugins/gcov/gcov.rake +7 -5
- data/plugins/gcov/lib/gcov.rb +3 -1
- data/plugins/gcov/lib/gcov_constants.rb +2 -0
- data/plugins/junit_tests_report/lib/junit_tests_report.rb +12 -9
- data/plugins/module_generator/lib/module_generator.rb +14 -1
- data/plugins/module_generator/module_generator.rake +21 -4
- data/plugins/raw_output_report/lib/raw_output_report.rb +41 -0
- data/spec/gcov/gcov_deployment_spec.rb +1 -1
- data/spec/gcov/gcov_test_cases_spec.rb +2 -2
- data/spec/generator_test_results_spec.rb +5 -0
- data/spec/preprocessinator_includes_handler_spec.rb +1 -0
- data/spec/spec_system_helper.rb +178 -4
- data/spec/support/test_example.fail +1 -0
- data/spec/support/test_example.pass +1 -0
- data/spec/support/test_example_empty.pass +1 -0
- data/spec/support/test_example_ignore.pass +1 -0
- data/spec/support/test_example_mangled.pass +1 -0
- data/spec/support/test_example_with_time.pass +22 -0
- data/spec/system/deployment_spec.rb +33 -0
- data/vendor/cmock/README.md +4 -3
- data/vendor/cmock/docs/CMock_Summary.md +1 -1
- data/vendor/cmock/lib/cmock_config.rb +4 -0
- data/vendor/cmock/lib/cmock_generator.rb +5 -2
- data/vendor/cmock/lib/cmock_generator_plugin_array.rb +4 -4
- data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +9 -11
- data/vendor/cmock/lib/cmock_generator_plugin_cexception.rb +0 -1
- data/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +2 -3
- data/vendor/cmock/lib/cmock_generator_plugin_ignore_arg.rb +2 -4
- data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +0 -2
- data/vendor/cmock/lib/cmock_generator_utils.rb +16 -3
- data/vendor/cmock/lib/cmock_header_parser.rb +59 -34
- data/vendor/cmock/release/build.info +1 -1
- data/vendor/cmock/release/version.info +1 -1
- data/vendor/cmock/scripts/create_makefile.rb +17 -2
- data/vendor/cmock/src/cmock.c +13 -7
- data/vendor/cmock/test/test_helper.rb +11 -10
- data/vendor/cmock/test/unit/cmock_config_test.rb +4 -2
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +10 -4
- data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +20 -12
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +2 -2
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +2 -2
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +3 -3
- data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +8 -6
- data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +27 -10
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +108 -20
- data/vendor/cmock/vendor/c_exception/Gemfile +4 -0
- data/vendor/cmock/vendor/c_exception/Gemfile.lock +12 -0
- data/vendor/cmock/vendor/c_exception/LICENSE.txt +30 -0
- data/vendor/cmock/vendor/c_exception/README.md +162 -0
- data/vendor/cmock/vendor/c_exception/Rakefile +42 -0
- data/vendor/cmock/vendor/c_exception/docs/CException.md +292 -0
- data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -0
- data/vendor/cmock/vendor/c_exception/lib/CException.c +46 -0
- data/vendor/cmock/vendor/c_exception/lib/CException.h +110 -0
- data/vendor/cmock/vendor/c_exception/makefile +24 -0
- data/vendor/cmock/vendor/c_exception/release/build.info +2 -0
- data/vendor/cmock/vendor/c_exception/release/version.info +2 -0
- data/vendor/cmock/vendor/c_exception/test/CExceptionConfig.h +46 -0
- data/vendor/cmock/vendor/c_exception/test/TestException.c +391 -0
- data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +67 -0
- data/vendor/cmock/vendor/unity/README.md +231 -0
- data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +118 -0
- data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +39 -0
- data/vendor/cmock/vendor/unity/auto/generate_config.yml +36 -0
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +308 -0
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +457 -0
- data/vendor/cmock/vendor/unity/auto/parse_output.rb +323 -0
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +252 -0
- data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +25 -0
- data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +6 -0
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +139 -0
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +136 -0
- data/vendor/cmock/vendor/unity/auto/unity_to_junit.py +146 -0
- data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +206 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf +0 -0
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +779 -0
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +433 -0
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +192 -0
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +260 -0
- data/vendor/cmock/vendor/unity/docs/license.txt +21 -0
- data/vendor/cmock/vendor/unity/examples/example_1/makefile +71 -0
- data/vendor/cmock/vendor/unity/examples/example_1/readme.txt +5 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.c +24 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.h +3 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -0
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -0
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -0
- data/vendor/cmock/vendor/unity/examples/example_2/makefile +70 -0
- data/vendor/cmock/vendor/unity/examples/example_2/readme.txt +5 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.c +24 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.h +3 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -0
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +9 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +11 -0
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -0
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -0
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -0
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +43 -0
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +249 -0
- data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +13 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.c +24 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.h +3 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -0
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -0
- data/vendor/cmock/vendor/unity/examples/example_3/target_gcc_32.yml +46 -0
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -0
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -0
- data/vendor/cmock/vendor/unity/examples/unity_config.h +247 -0
- data/vendor/cmock/vendor/unity/extras/eclipse/error_parsers.txt +26 -0
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +48 -0
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +178 -0
- data/vendor/cmock/vendor/unity/extras/fixture/readme.txt +9 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +436 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +83 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +51 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_malloc_overrides.h +47 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +75 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +22 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +543 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +57 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.c +57 -0
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -0
- data/vendor/cmock/vendor/unity/release/build.info +2 -0
- data/vendor/cmock/vendor/unity/release/version.info +2 -0
- data/vendor/cmock/vendor/unity/src/unity.c +1572 -0
- data/vendor/cmock/vendor/unity/src/unity.h +503 -0
- data/vendor/cmock/vendor/unity/src/unity_internals.h +924 -0
- data/vendor/cmock/vendor/unity/test/Makefile +68 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +61 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +57 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +55 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +15 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +76 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +77 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +67 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +70 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +58 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +67 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +70 -0
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +71 -0
- data/vendor/cmock/vendor/unity/test/rakefile +125 -0
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +260 -0
- 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 +78 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +78 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +49 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +50 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +47 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +59 -0
- data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +47 -0
- data/vendor/cmock/vendor/unity/test/targets/hitech_picc18.yml +101 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v4.yml +90 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5.yml +80 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5_3.yml +80 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +94 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_cortexm3_v5.yml +84 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_msp430.yml +95 -0
- data/vendor/cmock/vendor/unity/test/targets/iar_sh2a_v6.yml +86 -0
- data/vendor/cmock/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/cmock/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/cmock/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/cmock/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c +186 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +70 -0
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +195 -0
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +1252 -0
- data/vendor/cmock/vendor/unity/test/tests/testparameterized.c +113 -0
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +5371 -0
- data/vendor/unity/auto/generate_test_runner.rb +30 -10
- data/vendor/unity/auto/parse_output.rb +212 -109
- data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +9 -10
- data/vendor/unity/docs/UnityAssertionsReference.md +11 -2
- data/vendor/unity/docs/UnityConfigurationGuide.md +90 -55
- data/vendor/unity/docs/UnityGettingStartedGuide.md +6 -5
- data/vendor/unity/docs/UnityHelperScriptsGuide.md +23 -5
- data/vendor/unity/examples/unity_config.h +8 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.c +4 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.h +1 -1
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +2 -2
- data/vendor/unity/release/build.info +1 -1
- data/vendor/unity/release/version.info +1 -1
- data/vendor/unity/src/unity.c +64 -57
- data/vendor/unity/src/unity.h +111 -7
- data/vendor/unity/src/unity_internals.h +173 -73
- data/vendor/unity/test/Makefile +5 -1
- data/vendor/unity/test/testdata/testRunnerGenerator.c +4 -1
- data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +4 -1
- data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +4 -1
- data/vendor/unity/test/tests/testparameterized.c +5 -2
- data/vendor/unity/test/tests/testunity.c +34 -0
- metadata +150 -2
@@ -0,0 +1,86 @@
|
|
1
|
+
tools_root: &tools_root 'C:\Program Files\IAR Systems\Embedded Workbench 6.0\'
|
2
|
+
compiler:
|
3
|
+
path: [*tools_root, 'sh\bin\iccsh.exe']
|
4
|
+
source_path: '..\src\'
|
5
|
+
unit_tests_path: &unit_tests_path 'tests\'
|
6
|
+
build_path: &build_path 'build\'
|
7
|
+
options:
|
8
|
+
- -e
|
9
|
+
- --char_is_signed
|
10
|
+
- -Ol
|
11
|
+
- --no_cse
|
12
|
+
- --no_unroll
|
13
|
+
- --no_inline
|
14
|
+
- --no_code_motion
|
15
|
+
- --no_tbaa
|
16
|
+
- --no_scheduling
|
17
|
+
- --no_clustering
|
18
|
+
- --debug
|
19
|
+
- --dlib_config
|
20
|
+
- [*tools_root, 'sh\inc\DLib_Product.h']
|
21
|
+
- --double=32
|
22
|
+
- --code_model=huge
|
23
|
+
- --data_model=huge
|
24
|
+
- --core=sh2afpu
|
25
|
+
- --warnings_affect_exit_code
|
26
|
+
- --warnings_are_errors
|
27
|
+
- --mfc
|
28
|
+
- --use_unix_directory_separators
|
29
|
+
- --diag_suppress=Pe161
|
30
|
+
includes:
|
31
|
+
prefix: '-I'
|
32
|
+
items:
|
33
|
+
- [*tools_root, 'sh\inc\']
|
34
|
+
- [*tools_root, 'sh\inc\c']
|
35
|
+
- 'src\'
|
36
|
+
- '..\src\'
|
37
|
+
- 'testdata/'
|
38
|
+
- *unit_tests_path
|
39
|
+
- 'vendor\unity\src\'
|
40
|
+
defines:
|
41
|
+
prefix: '-D'
|
42
|
+
items:
|
43
|
+
- UNITY_SUPPORT_64
|
44
|
+
- 'UNITY_SUPPORT_TEST_CASES'
|
45
|
+
object_files:
|
46
|
+
prefix: '-o'
|
47
|
+
extension: '.o'
|
48
|
+
destination: *build_path
|
49
|
+
linker:
|
50
|
+
path: [*tools_root, 'sh\bin\ilinksh.exe']
|
51
|
+
options:
|
52
|
+
- --redirect __Printf=__PrintfSmall
|
53
|
+
- --redirect __Scanf=__ScanfSmall
|
54
|
+
- --config
|
55
|
+
- [*tools_root, 'sh\config\generic.icf']
|
56
|
+
- --config_def _CSTACK_SIZE=0x800
|
57
|
+
- --config_def _HEAP_SIZE=0x800
|
58
|
+
- --config_def _INT_TABLE=0x10
|
59
|
+
- --entry __iar_program_start
|
60
|
+
- --debug_lib
|
61
|
+
object_files:
|
62
|
+
path: *build_path
|
63
|
+
extension: '.o'
|
64
|
+
bin_files:
|
65
|
+
prefix: '-o'
|
66
|
+
extension: '.out'
|
67
|
+
destination: *build_path
|
68
|
+
simulator:
|
69
|
+
path: [*tools_root, 'common\bin\CSpyBat.exe']
|
70
|
+
pre_support:
|
71
|
+
- --silent
|
72
|
+
- [*tools_root, 'sh\bin\shproc.dll']
|
73
|
+
- [*tools_root, 'sh\bin\shsim.dll']
|
74
|
+
post_support:
|
75
|
+
- --plugin
|
76
|
+
- [*tools_root, 'sh\bin\shbat.dll']
|
77
|
+
- --backend
|
78
|
+
- -B
|
79
|
+
- --core sh2afpu
|
80
|
+
- -p
|
81
|
+
- [*tools_root, 'sh\config\debugger\io7264.ddf']
|
82
|
+
- -d
|
83
|
+
- sim
|
84
|
+
colour: true
|
85
|
+
:unity:
|
86
|
+
:plugins: []
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#ifndef CMOCK_H
|
2
|
+
#define CMOCK_H
|
3
|
+
|
4
|
+
int CMockMemFreeFinalCounter = 0;
|
5
|
+
int mockMock_Init_Counter = 0;
|
6
|
+
int mockMock_Verify_Counter = 0;
|
7
|
+
int mockMock_Destroy_Counter = 0;
|
8
|
+
|
9
|
+
void CMock_Guts_MemFreeFinal(void) { CMockMemFreeFinalCounter++; }
|
10
|
+
void mockMock_Init(void) { mockMock_Init_Counter++; }
|
11
|
+
void mockMock_Verify(void) { mockMock_Verify_Counter++; }
|
12
|
+
void mockMock_Destroy(void) { mockMock_Destroy_Counter++; }
|
13
|
+
|
14
|
+
#endif //CMOCK_H
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#ifndef MOCK_MOCK_H
|
2
|
+
#define MOCK_MOCK_H
|
3
|
+
|
4
|
+
extern int mockMock_Init_Counter;
|
5
|
+
extern int mockMock_Verify_Counter;
|
6
|
+
extern int mockMock_Destroy_Counter;
|
7
|
+
extern int CMockMemFreeFinalCounter;
|
8
|
+
|
9
|
+
void mockMock_Init(void);
|
10
|
+
void mockMock_Verify(void);
|
11
|
+
void mockMock_Destroy(void);
|
12
|
+
|
13
|
+
#endif //MOCK_MOCK_H
|
@@ -0,0 +1,186 @@
|
|
1
|
+
/* This Test File Is Used To Verify Many Combinations Of Using the Generate Test Runner Script */
|
2
|
+
|
3
|
+
#include <stdio.h>
|
4
|
+
#include "unity.h"
|
5
|
+
#include "Defs.h"
|
6
|
+
|
7
|
+
#ifdef USE_CEXCEPTION
|
8
|
+
#include "CException.h"
|
9
|
+
#endif
|
10
|
+
|
11
|
+
/* Notes about prefixes:
|
12
|
+
test - normal default prefix. these are "always run" tests for this procedure
|
13
|
+
spec - normal default prefix. required to run default setup/teardown calls.
|
14
|
+
should - normal default prefix.
|
15
|
+
qwiktest - custom prefix for when tests skip all setup/teardown calls.
|
16
|
+
custtest - custom prefix for when tests use custom setup/teardown calls.
|
17
|
+
paratest - custom prefix for when we want to verify parameterized tests.
|
18
|
+
extest - custom prefix only used during cexception
|
19
|
+
suitetest- custom prefix for when we want to use custom suite setup/teardown
|
20
|
+
*/
|
21
|
+
|
22
|
+
/* Support for Meta Test Rig */
|
23
|
+
#define TEST_CASE(a)
|
24
|
+
|
25
|
+
/* Include Passthroughs for Linking Tests */
|
26
|
+
void putcharSpy(int c) { (void)putchar(c);}
|
27
|
+
void flushSpy(void) {}
|
28
|
+
|
29
|
+
/* Global Variables Used During These Tests */
|
30
|
+
int CounterSetup = 0;
|
31
|
+
int CounterTeardown = 0;
|
32
|
+
int CounterSuiteSetup = 0;
|
33
|
+
|
34
|
+
void setUp(void)
|
35
|
+
{
|
36
|
+
CounterSetup = 1;
|
37
|
+
}
|
38
|
+
|
39
|
+
void tearDown(void)
|
40
|
+
{
|
41
|
+
CounterTeardown = 1;
|
42
|
+
}
|
43
|
+
|
44
|
+
void custom_setup(void)
|
45
|
+
{
|
46
|
+
CounterSetup = 2;
|
47
|
+
}
|
48
|
+
|
49
|
+
void custom_teardown(void)
|
50
|
+
{
|
51
|
+
CounterTeardown = 2;
|
52
|
+
}
|
53
|
+
|
54
|
+
/*
|
55
|
+
void test_OldSchoolCommentsShouldBeIgnored(void)
|
56
|
+
{
|
57
|
+
TEST_ASSERT_FAIL("Old-School Comments Should Be Ignored");
|
58
|
+
}
|
59
|
+
*/
|
60
|
+
|
61
|
+
void test_ThisTestAlwaysPasses(void)
|
62
|
+
{
|
63
|
+
TEST_PASS();
|
64
|
+
}
|
65
|
+
|
66
|
+
void test_ThisTestAlwaysFails(void)
|
67
|
+
{
|
68
|
+
TEST_FAIL_MESSAGE("This Test Should Fail");
|
69
|
+
}
|
70
|
+
|
71
|
+
void test_ThisTestAlwaysIgnored(void)
|
72
|
+
{
|
73
|
+
TEST_IGNORE_MESSAGE("This Test Should Be Ignored");
|
74
|
+
}
|
75
|
+
|
76
|
+
void qwiktest_ThisTestPassesWhenNoSetupRan(void)
|
77
|
+
{
|
78
|
+
TEST_ASSERT_EQUAL_MESSAGE(0, CounterSetup, "Setup Was Unexpectedly Run");
|
79
|
+
}
|
80
|
+
|
81
|
+
void qwiktest_ThisTestPassesWhenNoTeardownRan(void)
|
82
|
+
{
|
83
|
+
TEST_ASSERT_EQUAL_MESSAGE(0, CounterTeardown, "Teardown Was Unexpectedly Run");
|
84
|
+
}
|
85
|
+
|
86
|
+
void spec_ThisTestPassesWhenNormalSuiteSetupAndTeardownRan(void)
|
87
|
+
{
|
88
|
+
TEST_ASSERT_EQUAL_MESSAGE(0, CounterSuiteSetup, "Suite Setup Was Unexpectedly Run");
|
89
|
+
}
|
90
|
+
|
91
|
+
void spec_ThisTestPassesWhenNormalSetupRan(void)
|
92
|
+
{
|
93
|
+
TEST_ASSERT_EQUAL_MESSAGE(1, CounterSetup, "Normal Setup Wasn't Run");
|
94
|
+
}
|
95
|
+
|
96
|
+
void spec_ThisTestPassesWhenNormalTeardownRan(void)
|
97
|
+
{
|
98
|
+
TEST_ASSERT_EQUAL_MESSAGE(1, CounterTeardown, "Normal Teardown Wasn't Run");
|
99
|
+
}
|
100
|
+
|
101
|
+
void custtest_ThisTestPassesWhenCustomSetupRan(void)
|
102
|
+
{
|
103
|
+
TEST_ASSERT_EQUAL_MESSAGE(2, CounterSetup, "Custom Setup Wasn't Run");
|
104
|
+
}
|
105
|
+
|
106
|
+
void custtest_ThisTestPassesWhenCustomTeardownRan(void)
|
107
|
+
{
|
108
|
+
TEST_ASSERT_EQUAL_MESSAGE(2, CounterTeardown, "Custom Teardown Wasn't Run");
|
109
|
+
}
|
110
|
+
|
111
|
+
//void test_NewStyleCommentsShouldBeIgnored(void)
|
112
|
+
//{
|
113
|
+
// TEST_ASSERT_FAIL("New Style Comments Should Be Ignored");
|
114
|
+
//}
|
115
|
+
|
116
|
+
void test_NotBeConfusedByLongComplicatedStrings(void)
|
117
|
+
{
|
118
|
+
const char* crazyString = "GET / HTTP/1.1\r\nHost: 127.0.0.1:8081\r\nConnection: keep-alive\r\nCache-Control: no-cache\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36\r\nPostman-Token: 768c7149-c3fb-f704-71a2-63918d9195b2\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate, sdch\r\nAccept-Language: en-GB,en-US;q=0.8,en;q=0.6\r\n\r\n";
|
119
|
+
|
120
|
+
TEST_ASSERT_EQUAL_STRING_MESSAGE(crazyString, crazyString, "These Strings Are The Same");
|
121
|
+
}
|
122
|
+
|
123
|
+
void test_NotDisappearJustBecauseTheTestBeforeAndAfterHaveCrazyStrings(void)
|
124
|
+
{
|
125
|
+
TEST_ASSERT_TRUE_MESSAGE(1, "1 Should be True");
|
126
|
+
}
|
127
|
+
|
128
|
+
void test_StillNotBeConfusedByLongComplicatedStrings(void)
|
129
|
+
{
|
130
|
+
const char* crazyString = "GET / HTTP/1.1\r\nHost: 127.0.0.1:8081\r\nConnection: keep-alive\r\nCache-Control: no-cache\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36\r\nPostman-Token: 768c7149-c3fb-f704-71a2-63918d9195b2\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate, sdch\r\nAccept-Language: en-GB,en-US;q=0.8,en;q=0.6\r\n\r\n";
|
131
|
+
|
132
|
+
TEST_ASSERT_EQUAL_STRING_MESSAGE(crazyString, crazyString, "These Strings Are Still The Same");
|
133
|
+
}
|
134
|
+
|
135
|
+
void should_RunTestsStartingWithShouldByDefault(void)
|
136
|
+
{
|
137
|
+
TEST_ASSERT_TRUE_MESSAGE(1, "1 Should be True");
|
138
|
+
}
|
139
|
+
|
140
|
+
TEST_CASE(25)
|
141
|
+
TEST_CASE(125)
|
142
|
+
TEST_CASE(5)
|
143
|
+
void paratest_ShouldHandleParameterizedTests(int Num)
|
144
|
+
{
|
145
|
+
TEST_ASSERT_EQUAL_MESSAGE(0, (Num % 5), "All The Values Are Divisible By 5");
|
146
|
+
}
|
147
|
+
|
148
|
+
TEST_CASE(7)
|
149
|
+
void paratest_ShouldHandleParameterizedTests2(int Num)
|
150
|
+
{
|
151
|
+
TEST_ASSERT_EQUAL_MESSAGE(7, Num, "The Only Call To This Passes");
|
152
|
+
}
|
153
|
+
|
154
|
+
void paratest_ShouldHandleNonParameterizedTestsWhenParameterizationValid(void)
|
155
|
+
{
|
156
|
+
TEST_PASS();
|
157
|
+
}
|
158
|
+
|
159
|
+
TEST_CASE(17)
|
160
|
+
void paratest_ShouldHandleParameterizedTestsThatFail(int Num)
|
161
|
+
{
|
162
|
+
TEST_ASSERT_EQUAL_MESSAGE(3, Num, "This call should fail");
|
163
|
+
}
|
164
|
+
|
165
|
+
#ifdef USE_CEXCEPTION
|
166
|
+
void extest_ShouldHandleCExceptionInTest(void)
|
167
|
+
{
|
168
|
+
TEST_ASSERT_EQUAL_MESSAGE(1, CEXCEPTION_BEING_USED, "Should be pulling in CException");
|
169
|
+
}
|
170
|
+
#endif
|
171
|
+
|
172
|
+
#ifdef USE_ANOTHER_MAIN
|
173
|
+
int custom_main(void);
|
174
|
+
|
175
|
+
int main(void)
|
176
|
+
{
|
177
|
+
return custom_main();
|
178
|
+
}
|
179
|
+
#endif
|
180
|
+
|
181
|
+
void suitetest_ThisTestPassesWhenCustomSuiteSetupAndTeardownRan(void)
|
182
|
+
{
|
183
|
+
TEST_ASSERT_EQUAL_MESSAGE(1, CounterSuiteSetup, "Suite Setup Should Have Run");
|
184
|
+
}
|
185
|
+
|
186
|
+
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/* This Test File Is Used To Verify Many Combinations Of Using the Generate Test Runner Script */
|
2
|
+
|
3
|
+
#include <stdio.h>
|
4
|
+
#include "unity.h"
|
5
|
+
#include "Defs.h"
|
6
|
+
|
7
|
+
TEST_FILE("some_file.c")
|
8
|
+
|
9
|
+
/* Notes about prefixes:
|
10
|
+
test - normal default prefix. these are "always run" tests for this procedure
|
11
|
+
spec - normal default prefix. required to run default setup/teardown calls.
|
12
|
+
*/
|
13
|
+
|
14
|
+
/* Support for Meta Test Rig */
|
15
|
+
#define TEST_CASE(a)
|
16
|
+
|
17
|
+
/* Include Passthroughs for Linking Tests */
|
18
|
+
void putcharSpy(int c) { (void)putchar(c);}
|
19
|
+
void flushSpy(void) {}
|
20
|
+
|
21
|
+
/* Global Variables Used During These Tests */
|
22
|
+
int CounterSetup = 0;
|
23
|
+
int CounterTeardown = 0;
|
24
|
+
int CounterSuiteSetup = 0;
|
25
|
+
|
26
|
+
void setUp(void)
|
27
|
+
{
|
28
|
+
CounterSetup = 1;
|
29
|
+
}
|
30
|
+
|
31
|
+
void tearDown(void)
|
32
|
+
{
|
33
|
+
CounterTeardown = 1;
|
34
|
+
}
|
35
|
+
|
36
|
+
void custom_setup(void)
|
37
|
+
{
|
38
|
+
CounterSetup = 2;
|
39
|
+
}
|
40
|
+
|
41
|
+
void custom_teardown(void)
|
42
|
+
{
|
43
|
+
CounterTeardown = 2;
|
44
|
+
}
|
45
|
+
|
46
|
+
void test_ThisTestAlwaysPasses(void)
|
47
|
+
{
|
48
|
+
TEST_PASS();
|
49
|
+
}
|
50
|
+
|
51
|
+
void test_ThisTestAlwaysFails(void)
|
52
|
+
{
|
53
|
+
TEST_FAIL_MESSAGE("This Test Should Fail");
|
54
|
+
}
|
55
|
+
|
56
|
+
void test_ThisTestAlwaysIgnored(void)
|
57
|
+
{
|
58
|
+
TEST_IGNORE_MESSAGE("This Test Should Be Ignored");
|
59
|
+
}
|
60
|
+
|
61
|
+
void spec_ThisTestPassesWhenNormalSetupRan(void)
|
62
|
+
{
|
63
|
+
TEST_ASSERT_EQUAL_MESSAGE(1, CounterSetup, "Normal Setup Wasn't Run");
|
64
|
+
}
|
65
|
+
|
66
|
+
void spec_ThisTestPassesWhenNormalTeardownRan(void)
|
67
|
+
{
|
68
|
+
TEST_ASSERT_EQUAL_MESSAGE(1, CounterTeardown, "Normal Teardown Wasn't Run");
|
69
|
+
}
|
70
|
+
|
@@ -0,0 +1,195 @@
|
|
1
|
+
/* This Test File Is Used To Verify Many Combinations Of Using the Generate Test Runner Script */
|
2
|
+
|
3
|
+
#include <stdio.h>
|
4
|
+
#include "unity.h"
|
5
|
+
#include "Defs.h"
|
6
|
+
#include "mockMock.h"
|
7
|
+
|
8
|
+
#ifdef USE_CEXCEPTION
|
9
|
+
#include "CException.h"
|
10
|
+
#endif
|
11
|
+
|
12
|
+
/* Notes about prefixes:
|
13
|
+
test - normal default prefix. these are "always run" tests for this procedure
|
14
|
+
spec - normal default prefix. required to run default setup/teardown calls.
|
15
|
+
should - normal default prefix.
|
16
|
+
qwiktest - custom prefix for when tests skip all setup/teardown calls.
|
17
|
+
custtest - custom prefix for when tests use custom setup/teardown calls.
|
18
|
+
paratest - custom prefix for when we want to verify parameterized tests.
|
19
|
+
extest - custom prefix only used during cexception
|
20
|
+
suitetest- custom prefix for when we want to use custom suite setup/teardown
|
21
|
+
*/
|
22
|
+
|
23
|
+
/* Support for Meta Test Rig */
|
24
|
+
#define TEST_CASE(a)
|
25
|
+
|
26
|
+
/* Include Passthroughs for Linking Tests */
|
27
|
+
void putcharSpy(int c) { (void)putchar(c);}
|
28
|
+
void flushSpy(void) {}
|
29
|
+
|
30
|
+
/* Global Variables Used During These Tests */
|
31
|
+
int CounterSetup = 0;
|
32
|
+
int CounterTeardown = 0;
|
33
|
+
int CounterSuiteSetup = 0;
|
34
|
+
|
35
|
+
void setUp(void)
|
36
|
+
{
|
37
|
+
CounterSetup = 1;
|
38
|
+
}
|
39
|
+
|
40
|
+
void tearDown(void)
|
41
|
+
{
|
42
|
+
CounterTeardown = 1;
|
43
|
+
}
|
44
|
+
|
45
|
+
void custom_setup(void)
|
46
|
+
{
|
47
|
+
CounterSetup = 2;
|
48
|
+
}
|
49
|
+
|
50
|
+
void custom_teardown(void)
|
51
|
+
{
|
52
|
+
CounterTeardown = 2;
|
53
|
+
}
|
54
|
+
|
55
|
+
/*
|
56
|
+
void test_OldSchoolCommentsShouldBeIgnored(void)
|
57
|
+
{
|
58
|
+
TEST_ASSERT_FAIL("Old-School Comments Should Be Ignored");
|
59
|
+
}
|
60
|
+
*/
|
61
|
+
|
62
|
+
void test_ThisTestAlwaysPasses(void)
|
63
|
+
{
|
64
|
+
TEST_PASS();
|
65
|
+
}
|
66
|
+
|
67
|
+
void test_ThisTestAlwaysFails(void)
|
68
|
+
{
|
69
|
+
TEST_FAIL_MESSAGE("This Test Should Fail");
|
70
|
+
}
|
71
|
+
|
72
|
+
void test_ThisTestAlwaysIgnored(void)
|
73
|
+
{
|
74
|
+
TEST_IGNORE_MESSAGE("This Test Should Be Ignored");
|
75
|
+
}
|
76
|
+
|
77
|
+
void qwiktest_ThisTestPassesWhenNoSetupRan(void)
|
78
|
+
{
|
79
|
+
TEST_ASSERT_EQUAL_MESSAGE(0, CounterSetup, "Setup Was Unexpectedly Run");
|
80
|
+
}
|
81
|
+
|
82
|
+
void qwiktest_ThisTestPassesWhenNoTeardownRan(void)
|
83
|
+
{
|
84
|
+
TEST_ASSERT_EQUAL_MESSAGE(0, CounterTeardown, "Teardown Was Unexpectedly Run");
|
85
|
+
}
|
86
|
+
|
87
|
+
void spec_ThisTestPassesWhenNormalSuiteSetupAndTeardownRan(void)
|
88
|
+
{
|
89
|
+
TEST_ASSERT_EQUAL_MESSAGE(0, CounterSuiteSetup, "Suite Setup Was Unexpectedly Run");
|
90
|
+
}
|
91
|
+
|
92
|
+
void spec_ThisTestPassesWhenNormalSetupRan(void)
|
93
|
+
{
|
94
|
+
TEST_ASSERT_EQUAL_MESSAGE(1, CounterSetup, "Normal Setup Wasn't Run");
|
95
|
+
}
|
96
|
+
|
97
|
+
void spec_ThisTestPassesWhenNormalTeardownRan(void)
|
98
|
+
{
|
99
|
+
TEST_ASSERT_EQUAL_MESSAGE(1, CounterTeardown, "Normal Teardown Wasn't Run");
|
100
|
+
}
|
101
|
+
|
102
|
+
void custtest_ThisTestPassesWhenCustomSetupRan(void)
|
103
|
+
{
|
104
|
+
TEST_ASSERT_EQUAL_MESSAGE(2, CounterSetup, "Custom Setup Wasn't Run");
|
105
|
+
}
|
106
|
+
|
107
|
+
void custtest_ThisTestPassesWhenCustomTeardownRan(void)
|
108
|
+
{
|
109
|
+
TEST_ASSERT_EQUAL_MESSAGE(2, CounterTeardown, "Custom Teardown Wasn't Run");
|
110
|
+
}
|
111
|
+
|
112
|
+
//void test_NewStyleCommentsShouldBeIgnored(void)
|
113
|
+
//{
|
114
|
+
// TEST_ASSERT_FAIL("New Style Comments Should Be Ignored");
|
115
|
+
//}
|
116
|
+
|
117
|
+
void test_NotBeConfusedByLongComplicatedStrings(void)
|
118
|
+
{
|
119
|
+
const char* crazyString = "GET / HTTP/1.1\r\nHost: 127.0.0.1:8081\r\nConnection: keep-alive\r\nCache-Control: no-cache\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36\r\nPostman-Token: 768c7149-c3fb-f704-71a2-63918d9195b2\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate, sdch\r\nAccept-Language: en-GB,en-US;q=0.8,en;q=0.6\r\n\r\n";
|
120
|
+
|
121
|
+
TEST_ASSERT_EQUAL_STRING_MESSAGE(crazyString, crazyString, "These Strings Are The Same");
|
122
|
+
}
|
123
|
+
|
124
|
+
void test_NotDisappearJustBecauseTheTestBeforeAndAfterHaveCrazyStrings(void)
|
125
|
+
{
|
126
|
+
TEST_ASSERT_TRUE_MESSAGE(1, "1 Should be True");
|
127
|
+
}
|
128
|
+
|
129
|
+
void test_StillNotBeConfusedByLongComplicatedStrings(void)
|
130
|
+
{
|
131
|
+
const char* crazyString = "GET / HTTP/1.1\r\nHost: 127.0.0.1:8081\r\nConnection: keep-alive\r\nCache-Control: no-cache\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36\r\nPostman-Token: 768c7149-c3fb-f704-71a2-63918d9195b2\r\nAccept: */*\r\nAccept-Encoding: gzip, deflate, sdch\r\nAccept-Language: en-GB,en-US;q=0.8,en;q=0.6\r\n\r\n";
|
132
|
+
|
133
|
+
TEST_ASSERT_EQUAL_STRING_MESSAGE(crazyString, crazyString, "These Strings Are Still The Same");
|
134
|
+
}
|
135
|
+
|
136
|
+
void should_RunTestsStartingWithShouldByDefault(void)
|
137
|
+
{
|
138
|
+
TEST_ASSERT_TRUE_MESSAGE(1, "1 Should be True");
|
139
|
+
}
|
140
|
+
|
141
|
+
TEST_CASE(25)
|
142
|
+
TEST_CASE(125)
|
143
|
+
TEST_CASE(5)
|
144
|
+
void paratest_ShouldHandleParameterizedTests(int Num)
|
145
|
+
{
|
146
|
+
TEST_ASSERT_EQUAL_MESSAGE(0, (Num % 5), "All The Values Are Divisible By 5");
|
147
|
+
}
|
148
|
+
|
149
|
+
TEST_CASE(7)
|
150
|
+
void paratest_ShouldHandleParameterizedTests2(int Num)
|
151
|
+
{
|
152
|
+
TEST_ASSERT_EQUAL_MESSAGE(7, Num, "The Only Call To This Passes");
|
153
|
+
}
|
154
|
+
|
155
|
+
void paratest_ShouldHandleNonParameterizedTestsWhenParameterizationValid(void)
|
156
|
+
{
|
157
|
+
TEST_PASS();
|
158
|
+
}
|
159
|
+
|
160
|
+
TEST_CASE(17)
|
161
|
+
void paratest_ShouldHandleParameterizedTestsThatFail(int Num)
|
162
|
+
{
|
163
|
+
TEST_ASSERT_EQUAL_MESSAGE(3, Num, "This call should fail");
|
164
|
+
}
|
165
|
+
|
166
|
+
#ifdef USE_CEXCEPTION
|
167
|
+
void extest_ShouldHandleCExceptionInTest(void)
|
168
|
+
{
|
169
|
+
TEST_ASSERT_EQUAL_MESSAGE(1, CEXCEPTION_BEING_USED, "Should be pulling in CException");
|
170
|
+
}
|
171
|
+
#endif
|
172
|
+
|
173
|
+
#ifdef USE_ANOTHER_MAIN
|
174
|
+
int custom_main(void);
|
175
|
+
|
176
|
+
int main(void)
|
177
|
+
{
|
178
|
+
return custom_main();
|
179
|
+
}
|
180
|
+
#endif
|
181
|
+
|
182
|
+
void suitetest_ThisTestPassesWhenCustomSuiteSetupAndTeardownRan(void)
|
183
|
+
{
|
184
|
+
TEST_ASSERT_EQUAL_MESSAGE(1, CounterSuiteSetup, "Suite Setup Should Have Run");
|
185
|
+
}
|
186
|
+
|
187
|
+
void test_ShouldCallMockInitAndVerifyFunctionsForEachTest(void)
|
188
|
+
{
|
189
|
+
int passesOrIgnores = (int)(Unity.NumberOfTests - Unity.TestFailures);
|
190
|
+
TEST_ASSERT_EQUAL_MESSAGE(Unity.NumberOfTests, mockMock_Init_Counter, "Mock Init Should Be Called Once Per Test Started");
|
191
|
+
TEST_ASSERT_EQUAL_MESSAGE(passesOrIgnores, mockMock_Verify_Counter, "Mock Verify Should Be Called Once Per Test Passed");
|
192
|
+
TEST_ASSERT_EQUAL_MESSAGE(Unity.NumberOfTests - 1, mockMock_Destroy_Counter, "Mock Destroy Should Be Called Once Per Test Completed");
|
193
|
+
TEST_ASSERT_EQUAL_MESSAGE(0, CMockMemFreeFinalCounter, "Mock MemFreeFinal Should Not Be Called Until End");
|
194
|
+
}
|
195
|
+
|