ceedling 0.28.3 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +16 -16
- data/Gemfile.lock +17 -16
- data/README.md +107 -66
- data/Rakefile +11 -11
- data/assets/ceedling +3 -3
- data/assets/ceedling.cmd +1 -1
- data/assets/default_gitignore +5 -5
- data/assets/example_file.c +5 -5
- data/assets/example_file.h +6 -6
- data/assets/project_as_gem.yml +100 -90
- data/assets/project_with_guts.yml +101 -91
- data/assets/project_with_guts_gcov.yml +101 -91
- data/assets/test_example_file.c +13 -13
- data/assets/test_example_file_boom.c +13 -13
- data/assets/test_example_file_success.c +14 -14
- data/assets/test_example_file_verbose.c +12 -12
- data/bin/ceedling +337 -316
- data/ceedling.gemspec +36 -39
- data/ceedling.sublime-project +25 -0
- data/ceedling.sublime-workspace +1276 -0
- data/config/test_environment.rb +11 -11
- data/docs/CeedlingPacket.md +2119 -2060
- data/docs/ThrowTheSwitchCodingStandard.md +207 -207
- data/examples/blinky/project.yml +99 -98
- data/examples/blinky/rakefile.rb +31 -31
- data/examples/blinky/src/BlinkTask.c +21 -21
- data/examples/blinky/src/BlinkTask.h +6 -6
- data/examples/blinky/src/Configure.c +36 -36
- data/examples/blinky/src/Configure.h +6 -6
- data/examples/blinky/src/main.c +51 -51
- data/examples/blinky/src/main.h +9 -9
- data/examples/blinky/test/support/stub_interrupt.h +347 -347
- data/examples/blinky/test/support/stub_io.h +421 -421
- data/examples/blinky/test/support/stub_iom328p.h +883 -883
- data/examples/blinky/test/support/stub_sfr_defs.h +269 -269
- data/examples/blinky/test/test_BlinkTask.c +42 -42
- data/examples/blinky/test/test_Configure.c +29 -29
- data/examples/blinky/test/test_main.c +60 -60
- data/examples/temp_sensor/project.yml +76 -76
- data/examples/temp_sensor/rakefile.rb +6 -6
- data/examples/temp_sensor/src/AdcConductor.c +42 -42
- data/examples/temp_sensor/src/AdcConductor.h +13 -13
- data/examples/temp_sensor/src/AdcHardware.c +27 -27
- data/examples/temp_sensor/src/AdcHardware.h +11 -11
- data/examples/temp_sensor/src/AdcHardwareConfigurator.c +18 -18
- data/examples/temp_sensor/src/AdcHardwareConfigurator.h +10 -10
- data/examples/temp_sensor/src/AdcModel.c +33 -33
- data/examples/temp_sensor/src/AdcModel.h +13 -13
- data/examples/temp_sensor/src/AdcTemperatureSensor.c +51 -51
- data/examples/temp_sensor/src/AdcTemperatureSensor.h +10 -10
- data/examples/temp_sensor/src/Executor.c +25 -25
- data/examples/temp_sensor/src/Executor.h +9 -9
- data/examples/temp_sensor/src/IntrinsicsWrapper.c +18 -18
- data/examples/temp_sensor/src/IntrinsicsWrapper.h +7 -7
- data/examples/temp_sensor/src/Main.c +46 -46
- data/examples/temp_sensor/src/Main.h +7 -7
- data/examples/temp_sensor/src/Model.c +10 -10
- data/examples/temp_sensor/src/Model.h +8 -8
- data/examples/temp_sensor/src/ModelConfig.h +7 -7
- data/examples/temp_sensor/src/TaskScheduler.c +72 -72
- data/examples/temp_sensor/src/TaskScheduler.h +11 -11
- data/examples/temp_sensor/src/TemperatureCalculator.c +27 -27
- data/examples/temp_sensor/src/TemperatureCalculator.h +8 -8
- data/examples/temp_sensor/src/TemperatureFilter.c +38 -38
- data/examples/temp_sensor/src/TemperatureFilter.h +10 -10
- data/examples/temp_sensor/src/TimerConductor.c +15 -15
- data/examples/temp_sensor/src/TimerConductor.h +9 -9
- data/examples/temp_sensor/src/TimerConfigurator.c +51 -51
- data/examples/temp_sensor/src/TimerConfigurator.h +15 -15
- data/examples/temp_sensor/src/TimerHardware.c +15 -15
- data/examples/temp_sensor/src/TimerHardware.h +8 -8
- data/examples/temp_sensor/src/TimerInterruptConfigurator.c +55 -55
- data/examples/temp_sensor/src/TimerInterruptConfigurator.h +13 -13
- data/examples/temp_sensor/src/TimerInterruptHandler.c +25 -25
- data/examples/temp_sensor/src/TimerInterruptHandler.h +10 -10
- data/examples/temp_sensor/src/TimerModel.c +9 -9
- data/examples/temp_sensor/src/TimerModel.h +8 -8
- data/examples/temp_sensor/src/Types.h +90 -90
- data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +18 -18
- data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +8 -8
- data/examples/temp_sensor/src/UsartConductor.c +21 -21
- data/examples/temp_sensor/src/UsartConductor.h +7 -7
- data/examples/temp_sensor/src/UsartConfigurator.c +39 -39
- data/examples/temp_sensor/src/UsartConfigurator.h +13 -13
- data/examples/temp_sensor/src/UsartHardware.c +22 -22
- data/examples/temp_sensor/src/UsartHardware.h +9 -9
- data/examples/temp_sensor/src/UsartModel.c +34 -34
- data/examples/temp_sensor/src/UsartModel.h +10 -10
- data/examples/temp_sensor/src/UsartPutChar.c +16 -16
- data/examples/temp_sensor/src/UsartPutChar.h +8 -8
- data/examples/temp_sensor/src/UsartTransmitBufferStatus.c +7 -7
- data/examples/temp_sensor/src/UsartTransmitBufferStatus.h +8 -8
- data/examples/temp_sensor/test/TestAdcConductor.c +121 -121
- data/examples/temp_sensor/test/TestAdcHardware.c +44 -44
- data/examples/temp_sensor/test/TestAdcModel.c +33 -33
- data/examples/temp_sensor/test/TestExecutor.c +36 -36
- data/examples/temp_sensor/test/TestMain.c +24 -24
- data/examples/temp_sensor/test/TestModel.c +20 -20
- data/examples/temp_sensor/test/TestTaskScheduler.c +104 -104
- data/examples/temp_sensor/test/TestTemperatureCalculator.c +36 -36
- data/examples/temp_sensor/test/TestTemperatureFilter.c +79 -79
- data/examples/temp_sensor/test/TestTimerConductor.c +32 -32
- data/examples/temp_sensor/test/TestTimerHardware.c +26 -26
- data/examples/temp_sensor/test/TestTimerModel.c +18 -18
- data/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +21 -21
- data/examples/temp_sensor/test/TestUsartConductor.c +40 -40
- data/examples/temp_sensor/test/TestUsartHardware.c +36 -36
- data/examples/temp_sensor/test/TestUsartModel.c +40 -40
- data/examples/temp_sensor/test/support/UnityHelper.c +12 -12
- data/examples/temp_sensor/test/support/UnityHelper.h +12 -12
- data/lib/ceedling.rb +99 -99
- data/lib/ceedling/build_invoker_utils.rb +39 -39
- data/lib/ceedling/cacheinator.rb +47 -42
- data/lib/ceedling/cacheinator_helper.rb +31 -12
- data/lib/ceedling/cmock_builder.rb +15 -15
- data/lib/ceedling/configurator.rb +363 -356
- data/lib/ceedling/configurator_builder.rb +458 -451
- data/lib/ceedling/configurator_plugins.rb +111 -111
- data/lib/ceedling/configurator_setup.rb +127 -127
- data/lib/ceedling/configurator_validator.rb +193 -193
- data/lib/ceedling/constants.rb +97 -97
- data/lib/ceedling/defaults.rb +418 -418
- data/lib/ceedling/dependinator.rb +98 -91
- data/lib/ceedling/erb_wrapper.rb +8 -8
- data/lib/ceedling/file_finder.rb +149 -149
- data/lib/ceedling/file_finder_helper.rb +54 -54
- data/lib/ceedling/file_path_utils.rb +200 -200
- data/lib/ceedling/file_system_utils.rb +69 -69
- data/lib/ceedling/file_system_wrapper.rb +9 -9
- data/lib/ceedling/file_wrapper.rb +83 -83
- data/lib/ceedling/flaginator.rb +74 -74
- data/lib/ceedling/generator.rb +183 -176
- data/lib/ceedling/generator_helper.rb +40 -40
- data/lib/ceedling/generator_test_results.rb +89 -89
- data/lib/ceedling/generator_test_results_sanity_checker.rb +65 -65
- data/lib/ceedling/generator_test_runner.rb +56 -52
- data/lib/ceedling/loginator.rb +31 -31
- data/lib/ceedling/makefile.rb +46 -46
- data/lib/ceedling/objects.yml +310 -307
- data/lib/ceedling/par_map.rb +19 -19
- data/lib/ceedling/plugin.rb +80 -80
- data/lib/ceedling/plugin_builder.rb +52 -52
- data/lib/ceedling/plugin_manager.rb +107 -107
- data/lib/ceedling/plugin_manager_helper.rb +19 -19
- data/lib/ceedling/plugin_reportinator.rb +76 -76
- data/lib/ceedling/plugin_reportinator_helper.rb +51 -51
- data/lib/ceedling/preprocessinator.rb +42 -43
- data/lib/ceedling/preprocessinator_extractor.rb +30 -30
- data/lib/ceedling/preprocessinator_file_handler.rb +21 -21
- data/lib/ceedling/preprocessinator_helper.rb +46 -46
- data/lib/ceedling/preprocessinator_includes_handler.rb +181 -96
- data/lib/ceedling/project_config_manager.rb +46 -37
- data/lib/ceedling/project_file_loader.rb +99 -99
- data/lib/ceedling/rake_utils.rb +17 -17
- data/lib/ceedling/rake_wrapper.rb +33 -33
- data/lib/ceedling/rakefile.rb +86 -86
- data/lib/ceedling/release_invoker.rb +73 -73
- data/lib/ceedling/release_invoker_helper.rb +19 -19
- data/lib/ceedling/reportinator.rb +26 -26
- data/lib/ceedling/rules_cmock.rake +9 -9
- data/lib/ceedling/rules_preprocess.rake +26 -26
- data/lib/ceedling/rules_release.rake +86 -86
- data/lib/ceedling/rules_release_deep_dependencies.rake +15 -15
- data/lib/ceedling/rules_tests.rake +74 -74
- data/lib/ceedling/rules_tests_deep_dependencies.rake +15 -15
- data/lib/ceedling/setupinator.rb +53 -53
- data/lib/ceedling/stream_wrapper.rb +28 -20
- data/lib/ceedling/streaminator.rb +40 -40
- data/lib/ceedling/streaminator_helper.rb +15 -15
- data/lib/ceedling/system_utils.rb +37 -37
- data/lib/ceedling/system_wrapper.rb +80 -80
- data/lib/ceedling/target_loader.rb +38 -38
- data/lib/ceedling/task_invoker.rb +117 -101
- data/lib/ceedling/tasks_base.rake +111 -112
- data/lib/ceedling/tasks_filesystem.rake +103 -100
- data/lib/ceedling/tasks_release.rake +30 -30
- data/lib/ceedling/tasks_release_deep_dependencies.rake +9 -9
- data/lib/ceedling/tasks_tests.rake +60 -55
- data/lib/ceedling/tasks_tests_deep_dependencies.rake +9 -9
- data/lib/ceedling/tasks_vendor.rake +35 -35
- data/lib/ceedling/test_includes_extractor.rb +85 -85
- data/lib/ceedling/test_invoker.rb +188 -164
- data/lib/ceedling/test_invoker_helper.rb +32 -32
- data/lib/ceedling/tool_executor.rb +229 -223
- data/lib/ceedling/tool_executor_helper.rb +164 -164
- data/lib/ceedling/verbosinator.rb +10 -10
- data/lib/ceedling/version.rb +36 -15
- data/lib/ceedling/yaml_wrapper.rb +17 -17
- data/license.txt +31 -31
- data/out.fail +22 -21
- data/plugins/beep/README.md +22 -22
- data/plugins/beep/lib/beep.rb +40 -40
- data/plugins/bullseye/assets/template.erb +15 -15
- data/plugins/bullseye/bullseye.rake +169 -169
- data/plugins/bullseye/config/defaults.yml +57 -57
- data/plugins/bullseye/lib/bullseye.rb +194 -194
- data/plugins/colour_report/lib/colour_report.rb +16 -0
- data/plugins/command_hooks/README.md +53 -52
- data/plugins/command_hooks/lib/command_hooks.rb +92 -75
- data/plugins/fake_function_framework/README.md +250 -250
- data/plugins/fake_function_framework/Rakefile +18 -18
- data/plugins/fake_function_framework/examples/fff_example/project.yml +71 -71
- data/plugins/fake_function_framework/examples/fff_example/rakefile.rb +7 -7
- data/plugins/fake_function_framework/examples/fff_example/src/bar.c +1 -1
- data/plugins/fake_function_framework/examples/fff_example/src/bar.h +14 -14
- data/plugins/fake_function_framework/examples/fff_example/src/custom_types.h +6 -6
- data/plugins/fake_function_framework/examples/fff_example/src/display.c +6 -6
- data/plugins/fake_function_framework/examples/fff_example/src/display.h +16 -16
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.c +93 -93
- data/plugins/fake_function_framework/examples/fff_example/src/event_processor.h +11 -11
- data/plugins/fake_function_framework/examples/fff_example/src/foo.c +16 -16
- data/plugins/fake_function_framework/examples/fff_example/src/foo.h +8 -8
- data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.c +1 -1
- data/plugins/fake_function_framework/examples/fff_example/src/subfolder/zzz.h +6 -6
- data/plugins/fake_function_framework/examples/fff_example/test/test_event_processor.c +155 -155
- data/plugins/fake_function_framework/examples/fff_example/test/test_foo.c +47 -47
- data/plugins/fake_function_framework/lib/fake_function_framework.rb +87 -87
- data/plugins/fake_function_framework/lib/fff_mock_generator.rb +163 -163
- data/plugins/fake_function_framework/spec/fff_mock_header_generator_spec.rb +304 -304
- data/plugins/fake_function_framework/spec/fff_mock_source_generator_spec.rb +148 -148
- data/plugins/fake_function_framework/spec/header_generator.rb +50 -50
- data/plugins/fake_function_framework/spec/spec_helper.rb +96 -96
- data/plugins/fake_function_framework/src/fff_unity_helper.h +32 -32
- data/plugins/gcov/README.md +101 -42
- data/plugins/gcov/assets/template.erb +15 -15
- data/plugins/gcov/config/defaults.yml +73 -66
- data/plugins/gcov/gcov.rake +220 -180
- data/plugins/gcov/lib/gcov.rb +113 -106
- data/plugins/gcov/lib/gcov_constants.rb +19 -18
- data/plugins/junit_tests_report/README.md +36 -0
- data/plugins/junit_tests_report/lib/junit_tests_report.rb +129 -118
- data/plugins/module_generator/config/module_generator.yml +3 -3
- data/plugins/module_generator/lib/module_generator.rb +70 -51
- data/plugins/module_generator/module_generator.rake +47 -43
- data/plugins/raw_output_report/lib/raw_output_report.rb +41 -41
- data/plugins/stdout_gtestlike_tests_report/assets/template.erb +84 -84
- data/plugins/stdout_gtestlike_tests_report/assets/template.erb copy +59 -59
- data/plugins/stdout_gtestlike_tests_report/config/stdout_gtestlike_tests_report.yml +4 -4
- data/plugins/stdout_gtestlike_tests_report/lib/stdout_gtestlike_tests_report.rb +43 -43
- data/plugins/stdout_ide_tests_report/config/stdout_ide_tests_report.yml +4 -4
- data/plugins/stdout_ide_tests_report/lib/stdout_ide_tests_report.rb +44 -44
- data/plugins/stdout_pretty_tests_report/assets/template.erb +59 -59
- data/plugins/stdout_pretty_tests_report/config/stdout_pretty_tests_report.yml +4 -4
- data/plugins/stdout_pretty_tests_report/lib/stdout_pretty_tests_report.rb +47 -47
- data/plugins/subprojects/README.md +63 -63
- data/plugins/subprojects/config/defaults.yml +33 -33
- data/plugins/subprojects/lib/subprojects.rb +92 -92
- data/plugins/subprojects/subprojects.rake +78 -78
- data/plugins/teamcity_tests_report/config/teamcity_tests_report.yml +4 -4
- data/plugins/teamcity_tests_report/lib/teamcity_tests_report.rb +57 -57
- data/plugins/warnings_report/lib/warnings_report.rb +69 -69
- data/plugins/xml_tests_report/README.md +36 -0
- data/plugins/xml_tests_report/lib/xml_tests_report.rb +110 -108
- data/spec/build_invoker_utils_spec.rb +54 -54
- data/spec/ceedling_spec.rb +154 -154
- data/spec/configurator_builder_spec.rb +6 -6
- data/spec/configurator_helper_spec.rb +4 -4
- data/spec/configurator_spec.rb +9 -9
- data/spec/file_finder_helper_spec.rb +53 -53
- data/spec/gcov/gcov_deployment_spec.rb +70 -70
- data/spec/gcov/gcov_test_cases_spec.rb +91 -91
- data/spec/generator_test_results_sanity_checker_spec.rb +88 -88
- data/spec/generator_test_results_spec.rb +107 -107
- data/spec/par_map_spec.rb +57 -57
- data/spec/preprocessinator_extractor_spec.rb +45 -45
- data/spec/preprocessinator_includes_handler_spec.rb +202 -186
- data/spec/reportinator_spec.rb +19 -19
- data/spec/spec_helper.rb +27 -27
- data/spec/spec_system_helper.rb +575 -481
- data/spec/support/test_example.fail +22 -22
- data/spec/support/test_example.pass +22 -22
- data/spec/support/test_example_empty.pass +14 -14
- data/spec/support/test_example_ignore.pass +22 -22
- data/spec/support/test_example_mangled.pass +20 -20
- data/spec/support/test_example_with_time.pass +22 -22
- data/spec/system/deployment_spec.rb +219 -197
- data/spec/system_utils_spec.rb +56 -56
- data/spec/target_loader_spec.rb +30 -30
- data/spec/tool_executor_helper_spec.rb +310 -310
- data/spec/uncatagorized_specs_spec.rb +8 -8
- data/vendor/behaviors/Manifest.txt +9 -9
- data/vendor/behaviors/Rakefile +19 -19
- data/vendor/behaviors/lib/behaviors.rb +76 -76
- data/vendor/behaviors/lib/behaviors/reporttask.rb +158 -158
- data/vendor/behaviors/test/behaviors_tasks_test.rb +73 -73
- data/vendor/behaviors/test/behaviors_test.rb +50 -50
- data/vendor/behaviors/test/tasks_test/Rakefile +19 -19
- data/vendor/behaviors/test/tasks_test/lib/user.rb +2 -2
- data/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -17
- data/vendor/c_exception/Gemfile +4 -4
- data/vendor/c_exception/Gemfile.lock +12 -12
- data/vendor/c_exception/LICENSE.txt +30 -30
- data/vendor/c_exception/README.md +162 -162
- data/vendor/c_exception/Rakefile +42 -42
- data/vendor/c_exception/docs/CException.md +292 -292
- data/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -207
- data/vendor/c_exception/lib/CException.c +46 -46
- data/vendor/c_exception/lib/CException.h +115 -110
- data/vendor/c_exception/makefile +23 -23
- data/vendor/c_exception/test/CExceptionConfig.h +46 -46
- data/vendor/c_exception/test/TestException.c +391 -391
- data/vendor/c_exception/test/TestException_Runner.c +67 -67
- data/vendor/c_exception/vendor/unity/README.md +220 -0
- data/vendor/c_exception/vendor/unity/auto/colour_prompt.rb +118 -0
- data/vendor/c_exception/vendor/unity/auto/colour_reporter.rb +39 -0
- data/vendor/c_exception/vendor/unity/auto/generate_config.yml +36 -0
- data/vendor/c_exception/vendor/unity/auto/generate_module.rb +308 -0
- data/vendor/c_exception/vendor/unity/auto/generate_test_runner.rb +437 -0
- data/vendor/c_exception/vendor/unity/auto/parse_output.rb +220 -0
- data/vendor/c_exception/vendor/unity/auto/stylize_as_junit.rb +252 -0
- data/vendor/c_exception/vendor/unity/auto/test_file_filter.rb +25 -0
- data/vendor/c_exception/vendor/unity/auto/type_sanitizer.rb +6 -0
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.py +139 -0
- data/vendor/c_exception/vendor/unity/auto/unity_test_summary.rb +136 -0
- data/vendor/c_exception/vendor/unity/auto/unity_to_junit.py +146 -0
- 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/{cmock → c_exception}/vendor/unity/docs/license.txt +21 -21
- data/vendor/c_exception/vendor/unity/examples/example_1/makefile +71 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/readme.txt +5 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.c +24 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode.h +3 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -0
- data/vendor/c_exception/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/makefile +70 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/readme.txt +5 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.c +24 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode.h +3 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +9 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +11 -0
- data/vendor/c_exception/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile.rb +43 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/rakefile_helper.rb +249 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/readme.txt +13 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.c +24 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode.h +3 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/target_gcc_32.yml +46 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -0
- data/vendor/c_exception/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -0
- data/vendor/c_exception/vendor/unity/examples/unity_config.h +237 -0
- data/vendor/c_exception/vendor/unity/extras/eclipse/error_parsers.txt +26 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile.rb +48 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/rakefile_helper.rb +178 -0
- data/vendor/{cmock → c_exception}/vendor/unity/extras/fixture/readme.txt +8 -8
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.c +432 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture.h +83 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/src/unity_fixture_internals.h +51 -0
- data/vendor/{unity → c_exception/vendor/unity}/extras/fixture/src/unity_fixture_malloc_overrides.h +47 -47
- data/vendor/c_exception/vendor/unity/extras/fixture/test/Makefile +74 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/main/AllTests.c +22 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_Test.c +543 -0
- data/vendor/c_exception/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +57 -0
- data/vendor/{cmock → c_exception}/vendor/unity/extras/fixture/test/unity_output_Spy.c +57 -57
- data/vendor/{cmock → c_exception}/vendor/unity/extras/fixture/test/unity_output_Spy.h +17 -17
- data/vendor/c_exception/vendor/unity/release/build.info +2 -0
- data/vendor/c_exception/vendor/unity/release/version.info +2 -0
- data/vendor/c_exception/vendor/unity/src/unity.c +1517 -0
- data/vendor/c_exception/vendor/unity/src/unity.h +339 -0
- data/vendor/c_exception/vendor/unity/src/unity_internals.h +784 -0
- data/vendor/c_exception/vendor/unity/test/Makefile +63 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_cmd.c +61 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_def.c +57 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.c +55 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_head1.h +15 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_def.c +76 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_param.c +77 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new1.c +67 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_new2.c +70 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_param.c +58 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run1.c +67 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_run2.c +70 -0
- data/vendor/c_exception/vendor/unity/test/expectdata/testsample_yaml.c +71 -0
- data/vendor/c_exception/vendor/unity/test/rakefile +125 -0
- data/vendor/c_exception/vendor/unity/test/rakefile_helper.rb +260 -0
- 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 +78 -0
- data/vendor/c_exception/vendor/unity/test/targets/clang_strict.yml +78 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_32.yml +49 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_64.yml +50 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_limits.yml +47 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_auto_stdint.yml +59 -0
- data/vendor/c_exception/vendor/unity/test/targets/gcc_manual_math.yml +47 -0
- data/vendor/c_exception/vendor/unity/test/targets/hitech_picc18.yml +101 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v4.yml +90 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5.yml +80 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_arm_v5_3.yml +80 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +94 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_cortexm3_v5.yml +84 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_msp430.yml +95 -0
- data/vendor/c_exception/vendor/unity/test/targets/iar_sh2a_v6.yml +86 -0
- data/vendor/c_exception/vendor/unity/test/testdata/CException.h +11 -0
- data/vendor/c_exception/vendor/unity/test/testdata/Defs.h +8 -0
- data/vendor/c_exception/vendor/unity/test/testdata/cmock.h +14 -0
- data/vendor/c_exception/vendor/unity/test/testdata/mockMock.h +13 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGenerator.c +183 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +67 -0
- data/vendor/c_exception/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +192 -0
- data/vendor/c_exception/vendor/unity/test/tests/test_generate_test_runner.rb +1252 -0
- data/vendor/c_exception/vendor/unity/test/tests/testparameterized.c +110 -0
- data/vendor/c_exception/vendor/unity/test/tests/testunity.c +4993 -0
- data/vendor/cmock/Gemfile +9 -9
- data/vendor/cmock/{docs/license.txt → LICENSE.txt} +18 -18
- data/vendor/cmock/README.md +34 -34
- data/vendor/cmock/config/production_environment.rb +14 -14
- data/vendor/cmock/config/test_environment.rb +16 -16
- data/vendor/cmock/docs/CMock_Summary.md +689 -603
- data/vendor/cmock/docs/ThrowTheSwitchCodingStandard.md +207 -207
- data/vendor/cmock/examples/make_example/Makefile +30 -30
- data/vendor/cmock/examples/make_example/src/foo.c +5 -5
- data/vendor/cmock/examples/make_example/src/foo.h +5 -5
- data/vendor/cmock/examples/make_example/src/main.c +15 -15
- data/vendor/cmock/examples/make_example/test/test_foo.c +17 -17
- data/vendor/cmock/examples/make_example/test/test_main.c +15 -15
- data/vendor/cmock/examples/temp_sensor/gcc.yml +44 -44
- data/vendor/cmock/examples/temp_sensor/iar_v4.yml +92 -92
- data/vendor/cmock/examples/temp_sensor/iar_v5.yml +81 -81
- data/vendor/cmock/examples/temp_sensor/rakefile.rb +42 -42
- data/vendor/cmock/examples/temp_sensor/rakefile_helper.rb +272 -272
- data/vendor/cmock/examples/temp_sensor/src/AT91SAM7X256.h +2556 -2556
- data/vendor/cmock/examples/temp_sensor/src/AdcConductor.c +42 -42
- data/vendor/cmock/examples/temp_sensor/src/AdcConductor.h +11 -11
- data/vendor/cmock/examples/temp_sensor/src/AdcHardware.c +27 -27
- data/vendor/cmock/examples/temp_sensor/src/AdcHardware.h +9 -9
- data/vendor/cmock/examples/temp_sensor/src/AdcHardwareConfigurator.c +18 -18
- data/vendor/cmock/examples/temp_sensor/src/AdcHardwareConfigurator.h +10 -10
- data/vendor/cmock/examples/temp_sensor/src/AdcModel.c +33 -33
- data/vendor/cmock/examples/temp_sensor/src/AdcModel.h +13 -13
- data/vendor/cmock/examples/temp_sensor/src/AdcTemperatureSensor.c +51 -51
- data/vendor/cmock/examples/temp_sensor/src/AdcTemperatureSensor.h +10 -10
- data/vendor/cmock/examples/temp_sensor/src/Executor.c +25 -25
- data/vendor/cmock/examples/temp_sensor/src/Executor.h +9 -9
- data/vendor/cmock/examples/temp_sensor/src/IntrinsicsWrapper.c +18 -18
- data/vendor/cmock/examples/temp_sensor/src/IntrinsicsWrapper.h +7 -7
- data/vendor/cmock/examples/temp_sensor/src/Main.c +46 -46
- data/vendor/cmock/examples/temp_sensor/src/Main.h +7 -7
- data/vendor/cmock/examples/temp_sensor/src/Model.c +10 -10
- data/vendor/cmock/examples/temp_sensor/src/Model.h +8 -8
- data/vendor/cmock/examples/temp_sensor/src/ModelConfig.h +7 -7
- data/vendor/cmock/examples/temp_sensor/src/TaskScheduler.c +72 -72
- data/vendor/cmock/examples/temp_sensor/src/TaskScheduler.h +11 -11
- data/vendor/cmock/examples/temp_sensor/src/TemperatureCalculator.c +27 -27
- data/vendor/cmock/examples/temp_sensor/src/TemperatureCalculator.h +6 -6
- data/vendor/cmock/examples/temp_sensor/src/TemperatureFilter.c +39 -39
- data/vendor/cmock/examples/temp_sensor/src/TemperatureFilter.h +10 -10
- data/vendor/cmock/examples/temp_sensor/src/TimerConductor.c +15 -15
- data/vendor/cmock/examples/temp_sensor/src/TimerConductor.h +9 -9
- data/vendor/cmock/examples/temp_sensor/src/TimerConfigurator.c +51 -51
- data/vendor/cmock/examples/temp_sensor/src/TimerConfigurator.h +15 -15
- data/vendor/cmock/examples/temp_sensor/src/TimerHardware.c +15 -15
- data/vendor/cmock/examples/temp_sensor/src/TimerHardware.h +8 -8
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptConfigurator.c +55 -55
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptConfigurator.h +13 -13
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptHandler.c +25 -25
- data/vendor/cmock/examples/temp_sensor/src/TimerInterruptHandler.h +10 -10
- data/vendor/cmock/examples/temp_sensor/src/TimerModel.c +9 -9
- data/vendor/cmock/examples/temp_sensor/src/TimerModel.h +8 -8
- data/vendor/cmock/examples/temp_sensor/src/Types.h +103 -103
- data/vendor/cmock/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.c +18 -18
- data/vendor/cmock/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +6 -6
- data/vendor/cmock/examples/temp_sensor/src/UsartConductor.c +21 -21
- data/vendor/cmock/examples/temp_sensor/src/UsartConductor.h +7 -7
- data/vendor/cmock/examples/temp_sensor/src/UsartConfigurator.c +39 -39
- data/vendor/cmock/examples/temp_sensor/src/UsartConfigurator.h +13 -13
- data/vendor/cmock/examples/temp_sensor/src/UsartHardware.c +22 -22
- data/vendor/cmock/examples/temp_sensor/src/UsartHardware.h +9 -9
- data/vendor/cmock/examples/temp_sensor/src/UsartModel.c +34 -34
- data/vendor/cmock/examples/temp_sensor/src/UsartModel.h +10 -10
- data/vendor/cmock/examples/temp_sensor/src/UsartPutChar.c +16 -16
- data/vendor/cmock/examples/temp_sensor/src/UsartPutChar.h +8 -8
- data/vendor/cmock/examples/temp_sensor/src/UsartTransmitBufferStatus.c +7 -7
- data/vendor/cmock/examples/temp_sensor/src/UsartTransmitBufferStatus.h +8 -8
- data/vendor/cmock/examples/temp_sensor/test/TestAdcConductor.c +121 -121
- data/vendor/cmock/examples/temp_sensor/test/TestAdcHardware.c +44 -44
- data/vendor/cmock/examples/temp_sensor/test/TestAdcHardwareConfigurator.c +43 -43
- data/vendor/cmock/examples/temp_sensor/test/TestAdcModel.c +33 -33
- data/vendor/cmock/examples/temp_sensor/test/TestAdcTemperatureSensor.c +47 -47
- data/vendor/cmock/examples/temp_sensor/test/TestExecutor.c +36 -36
- data/vendor/cmock/examples/temp_sensor/test/TestMain.c +24 -24
- data/vendor/cmock/examples/temp_sensor/test/TestModel.c +20 -20
- data/vendor/cmock/examples/temp_sensor/test/TestTaskScheduler.c +104 -104
- data/vendor/cmock/examples/temp_sensor/test/TestTemperatureCalculator.c +33 -33
- data/vendor/cmock/examples/temp_sensor/test/TestTemperatureFilter.c +69 -69
- data/vendor/cmock/examples/temp_sensor/test/TestTimerConductor.c +32 -32
- data/vendor/cmock/examples/temp_sensor/test/TestTimerConfigurator.c +112 -112
- data/vendor/cmock/examples/temp_sensor/test/TestTimerHardware.c +26 -26
- data/vendor/cmock/examples/temp_sensor/test/TestTimerInterruptConfigurator.c +78 -78
- data/vendor/cmock/examples/temp_sensor/test/TestTimerInterruptHandler.c +66 -66
- data/vendor/cmock/examples/temp_sensor/test/TestTimerModel.c +18 -18
- data/vendor/cmock/examples/temp_sensor/test/TestUsartBaudRateRegisterCalculator.c +21 -21
- data/vendor/cmock/examples/temp_sensor/test/TestUsartConductor.c +40 -40
- data/vendor/cmock/examples/temp_sensor/test/TestUsartConfigurator.c +77 -77
- data/vendor/cmock/examples/temp_sensor/test/TestUsartHardware.c +37 -37
- data/vendor/cmock/examples/temp_sensor/test/TestUsartModel.c +40 -40
- data/vendor/cmock/examples/temp_sensor/test/TestUsartPutChar.c +43 -43
- data/vendor/cmock/examples/temp_sensor/test/TestUsartTransmitBufferStatus.c +22 -22
- data/vendor/cmock/lib/cmock.rb +86 -86
- data/vendor/cmock/lib/cmock_config.rb +153 -145
- data/vendor/cmock/lib/cmock_file_writer.rb +44 -44
- data/vendor/cmock/lib/cmock_generator.rb +268 -264
- data/vendor/cmock/lib/cmock_generator_plugin_array.rb +63 -63
- data/vendor/cmock/lib/cmock_generator_plugin_callback.rb +88 -98
- data/vendor/cmock/lib/cmock_generator_plugin_cexception.rb +51 -51
- data/vendor/cmock/lib/cmock_generator_plugin_expect.rb +103 -104
- data/vendor/cmock/lib/cmock_generator_plugin_expect_any_args.rb +53 -54
- data/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +75 -75
- data/vendor/cmock/lib/cmock_generator_plugin_ignore_arg.rb +42 -42
- data/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +79 -73
- data/vendor/cmock/lib/cmock_generator_utils.rb +253 -240
- data/vendor/cmock/lib/cmock_header_parser.rb +364 -337
- data/vendor/cmock/lib/cmock_plugin_manager.rb +55 -55
- data/vendor/cmock/lib/cmock_unityhelper_parser.rb +75 -75
- data/vendor/cmock/meson.build +72 -0
- data/vendor/cmock/scripts/create_makefile.rb +202 -202
- data/vendor/cmock/scripts/create_mock.rb +8 -8
- data/vendor/cmock/scripts/create_runner.rb +20 -20
- data/vendor/cmock/scripts/test_summary.rb +19 -19
- data/vendor/cmock/src/cmock.c +216 -210
- data/vendor/cmock/src/cmock.h +40 -38
- data/vendor/cmock/src/cmock_internals.h +91 -89
- data/vendor/cmock/src/meson.build +17 -0
- data/vendor/cmock/test/c/TestCMockC.c +333 -323
- data/vendor/cmock/test/c/TestCMockC.yml +14 -13
- data/vendor/cmock/test/c/TestCMockCDynamic.c +186 -186
- data/vendor/cmock/test/c/TestCMockCDynamic.yml +12 -12
- data/vendor/cmock/test/c/TestCMockCDynamic_Runner.c +36 -36
- data/vendor/cmock/test/c/TestCMockC_Runner.c +41 -39
- data/vendor/cmock/test/iar/iar_v4/Resource/at91SAM7X256_FLASH.xcl +185 -185
- data/vendor/cmock/test/iar/iar_v4/Resource/at91SAM7X256_RAM.xcl +185 -185
- data/vendor/cmock/test/iar/iar_v4/Resource/ioat91sam7x256.ddf +2259 -2259
- data/vendor/cmock/test/iar/iar_v4/cmock_demo.dep +3691 -3691
- data/vendor/cmock/test/iar/iar_v4/cmock_demo.ewp +2581 -2581
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X-EK.h +61 -61
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.inc +2314 -2314
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.rdf +4704 -4704
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256.tcl +3407 -3407
- data/vendor/cmock/test/iar/iar_v4/incIAR/AT91SAM7X256_inc.h +2268 -2268
- data/vendor/cmock/test/iar/iar_v4/incIAR/ioat91sam7x256.h +4380 -4380
- data/vendor/cmock/test/iar/iar_v4/incIAR/lib_AT91SAM7X256.h +4211 -4211
- data/vendor/cmock/test/iar/iar_v4/settings/cmock_demo.cspy.bat +32 -32
- data/vendor/cmock/test/iar/iar_v4/srcIAR/Cstartup.s79 +265 -265
- data/vendor/cmock/test/iar/iar_v4/srcIAR/Cstartup_SAM7.c +98 -98
- data/vendor/cmock/test/iar/iar_v5/Resource/at91SAM7X256_FLASH.icf +43 -43
- data/vendor/cmock/test/iar/iar_v5/Resource/at91SAM7X256_RAM.icf +42 -42
- data/vendor/cmock/test/iar/iar_v5/cmock_demo.dep +4204 -4204
- data/vendor/cmock/test/iar/iar_v5/cmock_demo.ewp +2426 -2426
- data/vendor/cmock/test/iar/iar_v5/incIAR/AT91SAM7X-EK.h +61 -61
- data/vendor/cmock/test/iar/iar_v5/incIAR/AT91SAM7X256_inc.h +2268 -2268
- data/vendor/cmock/test/iar/iar_v5/incIAR/lib_AT91SAM7X256.h +4211 -4211
- data/vendor/cmock/test/iar/iar_v5/incIAR/project.h +30 -30
- data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +33 -33
- data/vendor/cmock/test/iar/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +12 -12
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo.cspy.bat +33 -33
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_Binary.jlink +12 -12
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +12 -12
- data/vendor/cmock/test/iar/iar_v5/settings/cmock_demo_RAM_Debug.jlink +12 -12
- data/vendor/cmock/test/iar/iar_v5/srcIAR/Cstartup.s +299 -299
- data/vendor/cmock/test/iar/iar_v5/srcIAR/Cstartup_SAM7.c +98 -98
- data/vendor/cmock/test/rakefile +106 -106
- data/vendor/cmock/test/rakefile_helper.rb +382 -381
- data/vendor/cmock/test/system/systest_generator.rb +193 -194
- data/vendor/cmock/test/system/test_compilation/callingconv.h +11 -11
- data/vendor/cmock/test/system/test_compilation/config.yml +9 -9
- data/vendor/cmock/test/system/test_compilation/const.h +37 -37
- data/vendor/cmock/test/system/test_compilation/osek.h +275 -275
- data/vendor/cmock/test/system/test_compilation/parsing.h +89 -52
- data/vendor/cmock/test/system/test_interactions/all_plugins_but_other_limits.yml +375 -375
- data/vendor/cmock/test/system/test_interactions/all_plugins_coexist.yml +459 -459
- data/vendor/cmock/test/system/test_interactions/array_and_pointer_handling.yml +446 -446
- data/vendor/cmock/test/system/test_interactions/basic_expect_and_return.yml +124 -124
- data/vendor/cmock/test/system/test_interactions/const_primitives_handling.yml +87 -87
- data/vendor/cmock/test/system/test_interactions/doesnt_leave_details_behind.yml +308 -308
- data/vendor/cmock/test/system/test_interactions/enforce_strict_ordering.yml +247 -247
- data/vendor/cmock/test/system/test_interactions/expect_and_return_custom_types.yml +108 -108
- data/vendor/cmock/test/system/test_interactions/expect_and_return_treat_as.yml +173 -173
- data/vendor/cmock/test/system/test_interactions/expect_and_throw.yml +170 -170
- data/vendor/cmock/test/system/test_interactions/expect_any_args.yml +238 -238
- data/vendor/cmock/test/system/test_interactions/fancy_pointer_handling.yml +210 -210
- data/vendor/cmock/test/system/test_interactions/function_pointer_handling.yml +82 -82
- data/vendor/cmock/test/system/test_interactions/ignore_and_return.yml +329 -329
- data/vendor/cmock/test/system/test_interactions/ignore_strict_mock_calling.yml +37 -37
- data/vendor/cmock/test/system/test_interactions/newer_standards_stuff1.yml +52 -52
- data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_1.yml +91 -91
- data/vendor/cmock/test/system/test_interactions/nonstandard_parsed_stuff_2.yml +59 -59
- data/vendor/cmock/test/system/test_interactions/out_of_memory.yml +65 -65
- data/vendor/cmock/test/system/test_interactions/parsing_challenges.yml +242 -242
- data/vendor/cmock/test/system/test_interactions/return_thru_ptr_and_expect_any_args.yml +235 -235
- data/vendor/cmock/test/system/test_interactions/return_thru_ptr_ignore_arg.yml +231 -231
- data/vendor/cmock/test/system/test_interactions/struct_union_enum_expect_and_return.yml +277 -277
- data/vendor/cmock/test/system/test_interactions/struct_union_enum_expect_and_return_with_plugins.yml +280 -280
- data/vendor/cmock/test/system/test_interactions/stubs_with_callbacks.yml +221 -221
- data/vendor/cmock/test/system/test_interactions/unity_64bit_support.yml +77 -77
- data/vendor/cmock/test/system/test_interactions/unity_ignores.yml +139 -139
- data/vendor/cmock/test/system/test_interactions/unity_void_pointer_compare.yml +91 -0
- data/vendor/cmock/test/targets/clang_strict.yml +90 -90
- data/vendor/cmock/test/targets/gcc.yml +58 -58
- data/vendor/cmock/test/targets/gcc_64.yml +58 -58
- data/vendor/cmock/test/targets/gcc_tiny.yml +80 -80
- data/vendor/cmock/test/targets/iar_arm_v4.yml +110 -110
- data/vendor/cmock/test/targets/iar_arm_v5.yml +95 -95
- data/vendor/cmock/test/test_helper.rb +44 -44
- data/vendor/cmock/test/unit/cmock_config_test.rb +120 -120
- data/vendor/cmock/test/unit/cmock_config_test.yml +5 -5
- data/vendor/cmock/test/unit/cmock_file_writer_test.rb +27 -27
- data/vendor/cmock/test/unit/cmock_generator_main_test.rb +548 -542
- data/vendor/cmock/test/unit/cmock_generator_plugin_array_test.rb +141 -141
- data/vendor/cmock/test/unit/cmock_generator_plugin_callback_test.rb +281 -259
- data/vendor/cmock/test/unit/cmock_generator_plugin_cexception_test.rb +96 -96
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_a_test.rb +183 -186
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_any_args_test.rb +67 -60
- data/vendor/cmock/test/unit/cmock_generator_plugin_expect_b_test.rb +200 -203
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_arg_test.rb +116 -116
- data/vendor/cmock/test/unit/cmock_generator_plugin_ignore_test.rb +105 -105
- data/vendor/cmock/test/unit/cmock_generator_plugin_return_thru_ptr_test.rb +136 -136
- data/vendor/cmock/test/unit/cmock_generator_utils_test.rb +415 -394
- data/vendor/cmock/test/unit/cmock_header_parser_test.rb +1728 -1699
- data/vendor/cmock/test/unit/cmock_plugin_manager_test.rb +100 -91
- data/vendor/cmock/test/unit/cmock_unityhelper_parser_test.rb +223 -223
- data/vendor/cmock/vendor/behaviors/Manifest.txt +9 -9
- data/vendor/cmock/vendor/behaviors/Rakefile +19 -19
- data/vendor/cmock/vendor/behaviors/lib/behaviors.rb +76 -76
- data/vendor/cmock/vendor/behaviors/lib/behaviors/reporttask.rb +158 -158
- data/vendor/cmock/vendor/behaviors/test/behaviors_tasks_test.rb +73 -73
- data/vendor/cmock/vendor/behaviors/test/behaviors_test.rb +50 -50
- data/vendor/cmock/vendor/behaviors/test/tasks_test/Rakefile +19 -19
- data/vendor/cmock/vendor/behaviors/test/tasks_test/lib/user.rb +2 -2
- data/vendor/cmock/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -17
- data/vendor/cmock/vendor/c_exception/Gemfile +4 -4
- data/vendor/cmock/vendor/c_exception/Gemfile.lock +12 -12
- data/vendor/cmock/vendor/c_exception/LICENSE.txt +30 -30
- data/vendor/cmock/vendor/c_exception/README.md +162 -162
- data/vendor/cmock/vendor/c_exception/Rakefile +42 -42
- data/vendor/cmock/vendor/c_exception/docs/CException.md +292 -292
- data/vendor/cmock/vendor/c_exception/docs/ThrowTheSwitchCodingStandard.md +207 -207
- data/vendor/cmock/vendor/c_exception/lib/CException.c +46 -46
- data/vendor/cmock/vendor/c_exception/lib/CException.h +115 -110
- data/vendor/cmock/vendor/c_exception/makefile +23 -23
- data/vendor/cmock/vendor/c_exception/test/CExceptionConfig.h +46 -46
- data/vendor/cmock/vendor/c_exception/test/TestException.c +391 -391
- data/vendor/cmock/vendor/c_exception/test/TestException_Runner.c +67 -67
- data/vendor/cmock/vendor/unity/CMakeLists.txt +31 -0
- data/vendor/{unity/docs/license.txt → cmock/vendor/unity/LICENSE.txt} +21 -21
- data/vendor/cmock/vendor/unity/README.md +191 -231
- data/vendor/cmock/vendor/unity/auto/colour_prompt.rb +119 -118
- data/vendor/cmock/vendor/unity/auto/colour_reporter.rb +39 -39
- data/vendor/cmock/vendor/unity/auto/generate_config.yml +36 -36
- data/vendor/cmock/vendor/unity/auto/generate_module.rb +309 -308
- data/vendor/cmock/vendor/unity/auto/generate_test_runner.rb +495 -457
- data/vendor/cmock/vendor/unity/auto/parse_output.rb +322 -323
- data/vendor/cmock/vendor/unity/auto/run_test.erb +36 -0
- data/vendor/cmock/vendor/unity/auto/stylize_as_junit.rb +251 -252
- data/vendor/cmock/vendor/unity/auto/test_file_filter.rb +25 -25
- data/vendor/cmock/vendor/unity/auto/type_sanitizer.rb +6 -6
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.py +139 -139
- data/vendor/cmock/vendor/unity/auto/unity_test_summary.rb +135 -136
- data/vendor/cmock/vendor/unity/auto/unity_to_junit.py +146 -146
- data/vendor/cmock/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +206 -206
- data/vendor/cmock/vendor/unity/docs/UnityAssertionsReference.md +850 -779
- data/vendor/cmock/vendor/unity/docs/UnityConfigurationGuide.md +541 -433
- data/vendor/cmock/vendor/unity/docs/UnityGettingStartedGuide.md +251 -192
- data/vendor/cmock/vendor/unity/docs/UnityHelperScriptsGuide.md +266 -260
- data/vendor/cmock/vendor/unity/examples/example_1/makefile +72 -71
- data/vendor/cmock/vendor/unity/examples/example_1/readme.txt +4 -4
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.c +24 -24
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode.h +3 -3
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -11
- data/vendor/cmock/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -2
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -62
- data/vendor/cmock/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -31
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -53
- data/vendor/cmock/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -57
- data/vendor/cmock/vendor/unity/examples/example_2/makefile +71 -70
- data/vendor/cmock/vendor/unity/examples/example_2/readme.txt +4 -4
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.c +24 -24
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode.h +3 -3
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -11
- data/vendor/cmock/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -2
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -64
- data/vendor/cmock/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -33
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +8 -8
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +10 -10
- data/vendor/cmock/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -12
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -10
- data/vendor/cmock/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -12
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile.rb +38 -43
- data/vendor/cmock/vendor/unity/examples/example_3/rakefile_helper.rb +250 -249
- data/vendor/cmock/vendor/unity/examples/example_3/readme.txt +13 -13
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.c +24 -24
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode.h +3 -3
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -11
- data/vendor/cmock/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -2
- data/vendor/cmock/vendor/unity/examples/example_3/target_gcc_32.yml +47 -46
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -62
- data/vendor/cmock/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -31
- data/vendor/cmock/vendor/unity/examples/example_4/meson.build +17 -0
- data/vendor/cmock/vendor/unity/examples/example_4/readme.txt +15 -0
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode.c +24 -0
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode.h +3 -0
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode2.c +11 -0
- data/vendor/cmock/vendor/unity/examples/example_4/src/ProductionCode2.h +2 -0
- data/vendor/cmock/vendor/unity/examples/example_4/src/meson.build +21 -0
- data/vendor/cmock/vendor/unity/examples/example_4/subprojects/unity.wrap +4 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/TestProductionCode.c +63 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/TestProductionCode2.c +35 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/meson.build +12 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +53 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +57 -0
- data/vendor/cmock/vendor/unity/examples/example_4/test/test_runners/meson.build +16 -0
- data/vendor/cmock/vendor/unity/examples/unity_config.h +263 -247
- data/vendor/cmock/vendor/unity/extras/eclipse/error_parsers.txt +26 -26
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile.rb +44 -48
- data/vendor/cmock/vendor/unity/extras/fixture/rakefile_helper.rb +183 -178
- data/vendor/cmock/vendor/unity/extras/fixture/readme.md +17 -0
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.c +275 -436
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture.h +83 -83
- data/vendor/cmock/vendor/unity/extras/fixture/src/unity_fixture_internals.h +50 -51
- data/vendor/cmock/vendor/unity/extras/fixture/test/Makefile +72 -75
- data/vendor/cmock/vendor/unity/extras/fixture/test/main/AllTests.c +20 -22
- data/vendor/cmock/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -39
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_Test.c +245 -543
- data/vendor/cmock/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +32 -57
- data/vendor/cmock/vendor/unity/extras/memory/rakefile.rb +45 -0
- data/vendor/cmock/vendor/unity/extras/memory/rakefile_helper.rb +187 -0
- data/vendor/cmock/vendor/unity/extras/memory/readme.md +49 -0
- data/vendor/cmock/vendor/unity/extras/memory/src/unity_memory.c +202 -0
- data/vendor/cmock/vendor/unity/extras/{fixture/src/unity_fixture_malloc_overrides.h → memory/src/unity_memory.h} +60 -47
- data/vendor/cmock/vendor/unity/extras/memory/test/Makefile +78 -0
- data/vendor/cmock/vendor/unity/extras/memory/test/unity_memory_Test.c +325 -0
- data/vendor/cmock/vendor/unity/extras/memory/test/unity_memory_TestRunner.c +49 -0
- data/vendor/{unity/extras/fixture → cmock/vendor/unity/extras/memory}/test/unity_output_Spy.c +56 -57
- data/vendor/{unity/extras/fixture → cmock/vendor/unity/extras/memory}/test/unity_output_Spy.h +16 -17
- data/vendor/cmock/vendor/unity/meson.build +69 -0
- data/vendor/cmock/vendor/unity/src/CMakeLists.txt +22 -0
- data/vendor/cmock/vendor/unity/src/meson.build +16 -0
- data/vendor/cmock/vendor/unity/src/unity.c +2085 -1572
- data/vendor/cmock/vendor/unity/src/unity.h +617 -503
- data/vendor/cmock/vendor/unity/src/unity_internals.h +1002 -924
- data/vendor/cmock/vendor/unity/test/Makefile +67 -68
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_cmd.c +61 -61
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_def.c +57 -57
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.c +55 -55
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_head1.h +15 -15
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -80
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_def.c +76 -76
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -75
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -13
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_param.c +77 -77
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -89
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -90
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new1.c +67 -67
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_new2.c +70 -70
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_param.c +58 -58
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run1.c +67 -67
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_run2.c +70 -70
- data/vendor/cmock/vendor/unity/test/expectdata/testsample_yaml.c +71 -71
- data/vendor/cmock/vendor/unity/test/rakefile +124 -125
- data/vendor/cmock/vendor/unity/test/rakefile_helper.rb +269 -260
- data/vendor/cmock/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -158
- data/vendor/cmock/vendor/unity/test/targets/ansi.yml +49 -0
- data/vendor/cmock/vendor/unity/test/targets/clang_file.yml +78 -78
- data/vendor/cmock/vendor/unity/test/targets/clang_strict.yml +78 -78
- data/vendor/cmock/vendor/unity/test/targets/gcc_32.yml +49 -49
- data/vendor/cmock/vendor/unity/test/targets/gcc_64.yml +50 -50
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_limits.yml +47 -47
- data/vendor/cmock/vendor/unity/test/targets/gcc_auto_stdint.yml +59 -59
- data/vendor/cmock/vendor/unity/test/targets/gcc_manual_math.yml +47 -47
- data/vendor/cmock/vendor/unity/test/targets/hitech_picc18.yml +101 -101
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v4.yml +90 -90
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5.yml +80 -80
- data/vendor/cmock/vendor/unity/test/targets/iar_arm_v5_3.yml +80 -80
- data/vendor/cmock/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +94 -94
- data/vendor/cmock/vendor/unity/test/targets/iar_cortexm3_v5.yml +84 -84
- data/vendor/cmock/vendor/unity/test/targets/iar_msp430.yml +95 -95
- data/vendor/cmock/vendor/unity/test/targets/iar_sh2a_v6.yml +86 -86
- data/vendor/cmock/vendor/unity/test/testdata/CException.h +11 -11
- data/vendor/cmock/vendor/unity/test/testdata/Defs.h +8 -8
- data/vendor/cmock/vendor/unity/test/testdata/cmock.h +14 -14
- data/vendor/cmock/vendor/unity/test/testdata/mockMock.h +13 -13
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGenerator.c +189 -186
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +70 -70
- data/vendor/cmock/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +197 -195
- data/vendor/cmock/vendor/unity/test/tests/test_generate_test_runner.rb +1268 -1252
- data/vendor/cmock/vendor/unity/test/tests/testparameterized.c +171 -113
- data/vendor/cmock/vendor/unity/test/tests/testunity.c +8168 -5371
- data/vendor/deep_merge/MIT-LICENSE +20 -20
- data/vendor/deep_merge/README +94 -94
- data/vendor/deep_merge/Rakefile +28 -28
- data/vendor/deep_merge/lib/deep_merge.rb +211 -211
- data/vendor/deep_merge/test/test_deep_merge.rb +553 -553
- data/vendor/diy/History.txt +28 -28
- data/vendor/diy/README.rdoc +233 -233
- data/vendor/diy/Rakefile +33 -33
- data/vendor/diy/TODO.txt +9 -9
- data/vendor/diy/diy.gemspec +131 -131
- data/vendor/diy/lib/diy.rb +403 -403
- data/vendor/diy/lib/diy/factory.rb +36 -36
- data/vendor/diy/sample_code/car.rb +7 -7
- data/vendor/diy/sample_code/chassis.rb +5 -5
- data/vendor/diy/sample_code/diy_example.rb +26 -26
- data/vendor/diy/sample_code/engine.rb +5 -5
- data/vendor/diy/sample_code/objects.yml +10 -10
- data/vendor/diy/test/constructor.rb +119 -119
- data/vendor/diy/test/diy_test.rb +608 -608
- data/vendor/diy/test/factory_test.rb +79 -79
- data/vendor/diy/test/files/broken_construction.yml +7 -7
- data/vendor/diy/test/files/cat/cat.rb +3 -3
- data/vendor/diy/test/files/cat/extra_conflict.yml +5 -5
- data/vendor/diy/test/files/cat/heritage.rb +2 -2
- data/vendor/diy/test/files/cat/needs_input.yml +3 -3
- data/vendor/diy/test/files/cat/the_cat_lineage.rb +1 -1
- data/vendor/diy/test/files/dog/dog_model.rb +3 -3
- data/vendor/diy/test/files/dog/dog_presenter.rb +3 -3
- data/vendor/diy/test/files/dog/dog_view.rb +2 -2
- data/vendor/diy/test/files/dog/file_resolver.rb +2 -2
- data/vendor/diy/test/files/dog/other_thing.rb +2 -2
- data/vendor/diy/test/files/dog/simple.yml +11 -11
- data/vendor/diy/test/files/donkey/foo.rb +8 -8
- data/vendor/diy/test/files/donkey/foo/bar/qux.rb +7 -7
- data/vendor/diy/test/files/factory/beef.rb +5 -5
- data/vendor/diy/test/files/factory/dog.rb +6 -6
- data/vendor/diy/test/files/factory/factory.yml +19 -19
- data/vendor/diy/test/files/factory/farm/llama.rb +7 -7
- data/vendor/diy/test/files/factory/farm/pork.rb +7 -7
- data/vendor/diy/test/files/factory/kitten.rb +13 -13
- data/vendor/diy/test/files/fud/objects.yml +13 -13
- data/vendor/diy/test/files/fud/toy.rb +14 -14
- data/vendor/diy/test/files/functions/attached_things_builder.rb +1 -1
- data/vendor/diy/test/files/functions/invalid_method.yml +4 -4
- data/vendor/diy/test/files/functions/method_extractor.rb +2 -2
- data/vendor/diy/test/files/functions/nonsingleton_objects.yml +5 -5
- data/vendor/diy/test/files/functions/objects.yml +21 -21
- data/vendor/diy/test/files/functions/thing.rb +2 -2
- data/vendor/diy/test/files/functions/thing_builder.rb +24 -24
- data/vendor/diy/test/files/functions/things_builder.rb +2 -2
- data/vendor/diy/test/files/gnu/objects.yml +14 -14
- data/vendor/diy/test/files/gnu/thinger.rb +7 -7
- data/vendor/diy/test/files/goat/base.rb +8 -8
- data/vendor/diy/test/files/goat/can.rb +6 -6
- data/vendor/diy/test/files/goat/goat.rb +6 -6
- data/vendor/diy/test/files/goat/objects.yml +12 -12
- data/vendor/diy/test/files/goat/paper.rb +6 -6
- data/vendor/diy/test/files/goat/plane.rb +7 -7
- data/vendor/diy/test/files/goat/shirt.rb +6 -6
- data/vendor/diy/test/files/goat/wings.rb +8 -8
- data/vendor/diy/test/files/horse/holder_thing.rb +3 -3
- data/vendor/diy/test/files/horse/objects.yml +7 -7
- data/vendor/diy/test/files/namespace/animal/bird.rb +5 -5
- data/vendor/diy/test/files/namespace/animal/cat.rb +5 -5
- data/vendor/diy/test/files/namespace/animal/reptile/hardshell/turtle.rb +8 -8
- data/vendor/diy/test/files/namespace/animal/reptile/lizard.rb +7 -7
- data/vendor/diy/test/files/namespace/bad_module_specified.yml +8 -8
- data/vendor/diy/test/files/namespace/class_name_combine.yml +8 -8
- data/vendor/diy/test/files/namespace/no_module_specified.yml +8 -8
- data/vendor/diy/test/files/namespace/objects.yml +21 -21
- data/vendor/diy/test/files/namespace/road.rb +2 -2
- data/vendor/diy/test/files/namespace/sky.rb +2 -2
- data/vendor/diy/test/files/namespace/subcontext.yml +22 -22
- data/vendor/diy/test/files/non_singleton/air.rb +2 -2
- data/vendor/diy/test/files/non_singleton/fat_cat.rb +3 -3
- data/vendor/diy/test/files/non_singleton/objects.yml +19 -19
- data/vendor/diy/test/files/non_singleton/pig.rb +3 -3
- data/vendor/diy/test/files/non_singleton/thread_spinner.rb +3 -3
- data/vendor/diy/test/files/non_singleton/tick.rb +3 -3
- data/vendor/diy/test/files/non_singleton/yard.rb +2 -2
- data/vendor/diy/test/files/yak/core_model.rb +3 -3
- data/vendor/diy/test/files/yak/core_presenter.rb +3 -3
- data/vendor/diy/test/files/yak/core_view.rb +1 -1
- data/vendor/diy/test/files/yak/data_source.rb +1 -1
- data/vendor/diy/test/files/yak/fringe_model.rb +3 -3
- data/vendor/diy/test/files/yak/fringe_presenter.rb +3 -3
- data/vendor/diy/test/files/yak/fringe_view.rb +1 -1
- data/vendor/diy/test/files/yak/giant_squid.rb +3 -3
- data/vendor/diy/test/files/yak/krill.rb +2 -2
- data/vendor/diy/test/files/yak/my_objects.yml +21 -21
- data/vendor/diy/test/files/yak/sub_sub_context_test.yml +27 -27
- data/vendor/diy/test/test_helper.rb +55 -55
- data/vendor/hardmock/CHANGES +78 -78
- data/vendor/hardmock/LICENSE +7 -7
- data/vendor/hardmock/README +70 -70
- data/vendor/hardmock/Rakefile +8 -8
- data/vendor/hardmock/config/environment.rb +12 -12
- data/vendor/hardmock/lib/assert_error.rb +23 -23
- data/vendor/hardmock/lib/extend_test_unit.rb +14 -14
- data/vendor/hardmock/lib/hardmock.rb +86 -86
- data/vendor/hardmock/lib/hardmock/errors.rb +22 -22
- data/vendor/hardmock/lib/hardmock/expectation.rb +229 -229
- data/vendor/hardmock/lib/hardmock/expectation_builder.rb +9 -9
- data/vendor/hardmock/lib/hardmock/expector.rb +26 -26
- data/vendor/hardmock/lib/hardmock/method_cleanout.rb +33 -33
- data/vendor/hardmock/lib/hardmock/mock.rb +180 -180
- data/vendor/hardmock/lib/hardmock/mock_control.rb +53 -53
- data/vendor/hardmock/lib/hardmock/stubbing.rb +210 -210
- data/vendor/hardmock/lib/hardmock/trapper.rb +31 -31
- data/vendor/hardmock/lib/hardmock/utils.rb +9 -9
- data/vendor/hardmock/lib/test_unit_before_after.rb +169 -169
- data/vendor/hardmock/rake_tasks/rdoc.rake +19 -19
- data/vendor/hardmock/rake_tasks/rdoc_options.rb +4 -4
- data/vendor/hardmock/rake_tasks/test.rake +22 -22
- data/vendor/hardmock/test/functional/assert_error_test.rb +52 -52
- data/vendor/hardmock/test/functional/auto_verify_test.rb +178 -178
- data/vendor/hardmock/test/functional/direct_mock_usage_test.rb +396 -396
- data/vendor/hardmock/test/functional/hardmock_test.rb +434 -434
- data/vendor/hardmock/test/functional/stubbing_test.rb +479 -479
- data/vendor/hardmock/test/test_helper.rb +43 -43
- data/vendor/hardmock/test/unit/expectation_builder_test.rb +19 -19
- data/vendor/hardmock/test/unit/expectation_test.rb +372 -372
- data/vendor/hardmock/test/unit/expector_test.rb +57 -57
- data/vendor/hardmock/test/unit/method_cleanout_test.rb +36 -36
- data/vendor/hardmock/test/unit/mock_control_test.rb +175 -175
- data/vendor/hardmock/test/unit/mock_test.rb +279 -279
- data/vendor/hardmock/test/unit/test_unit_before_after_test.rb +452 -452
- data/vendor/hardmock/test/unit/trapper_test.rb +62 -62
- data/vendor/hardmock/test/unit/verify_error_test.rb +40 -40
- data/vendor/unity/CMakeLists.txt +31 -0
- data/vendor/unity/LICENSE.txt +21 -0
- data/vendor/unity/README.md +191 -231
- data/vendor/unity/auto/colour_prompt.rb +119 -118
- data/vendor/unity/auto/colour_reporter.rb +39 -39
- data/vendor/unity/auto/generate_config.yml +36 -36
- data/vendor/unity/auto/generate_module.rb +309 -308
- data/vendor/unity/auto/generate_test_runner.rb +495 -457
- data/vendor/unity/auto/parse_output.rb +322 -323
- data/vendor/unity/auto/run_test.erb +36 -0
- data/vendor/unity/auto/stylize_as_junit.rb +251 -252
- data/vendor/unity/auto/test_file_filter.rb +25 -25
- data/vendor/unity/auto/type_sanitizer.rb +6 -6
- data/vendor/unity/auto/unity_test_summary.py +139 -139
- data/vendor/unity/auto/unity_test_summary.rb +135 -136
- data/vendor/unity/auto/unity_to_junit.py +146 -146
- data/vendor/unity/docs/ThrowTheSwitchCodingStandard.md +206 -206
- data/vendor/unity/docs/UnityAssertionsReference.md +850 -779
- data/vendor/unity/docs/UnityConfigurationGuide.md +541 -433
- data/vendor/unity/docs/UnityGettingStartedGuide.md +251 -192
- data/vendor/unity/docs/UnityHelperScriptsGuide.md +266 -260
- data/vendor/unity/examples/example_1/makefile +72 -71
- data/vendor/unity/examples/example_1/readme.txt +4 -4
- data/vendor/unity/examples/example_1/src/ProductionCode.c +24 -24
- data/vendor/unity/examples/example_1/src/ProductionCode.h +3 -3
- data/vendor/unity/examples/example_1/src/ProductionCode2.c +11 -11
- data/vendor/unity/examples/example_1/src/ProductionCode2.h +2 -2
- data/vendor/unity/examples/example_1/test/TestProductionCode.c +62 -62
- data/vendor/unity/examples/example_1/test/TestProductionCode2.c +31 -31
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode2_Runner.c +53 -53
- data/vendor/unity/examples/example_1/test/test_runners/TestProductionCode_Runner.c +57 -57
- data/vendor/unity/examples/example_2/makefile +71 -70
- data/vendor/unity/examples/example_2/readme.txt +4 -4
- data/vendor/unity/examples/example_2/src/ProductionCode.c +24 -24
- data/vendor/unity/examples/example_2/src/ProductionCode.h +3 -3
- data/vendor/unity/examples/example_2/src/ProductionCode2.c +11 -11
- data/vendor/unity/examples/example_2/src/ProductionCode2.h +2 -2
- data/vendor/unity/examples/example_2/test/TestProductionCode.c +64 -64
- data/vendor/unity/examples/example_2/test/TestProductionCode2.c +33 -33
- data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode2_Runner.c +8 -8
- data/vendor/unity/examples/example_2/test/test_runners/TestProductionCode_Runner.c +10 -10
- data/vendor/unity/examples/example_2/test/test_runners/all_tests.c +12 -12
- data/vendor/unity/examples/example_3/helper/UnityHelper.c +10 -10
- data/vendor/unity/examples/example_3/helper/UnityHelper.h +12 -12
- data/vendor/unity/examples/example_3/rakefile.rb +38 -43
- data/vendor/unity/examples/example_3/rakefile_helper.rb +250 -249
- data/vendor/unity/examples/example_3/readme.txt +13 -13
- data/vendor/unity/examples/example_3/src/ProductionCode.c +24 -24
- data/vendor/unity/examples/example_3/src/ProductionCode.h +3 -3
- data/vendor/unity/examples/example_3/src/ProductionCode2.c +11 -11
- data/vendor/unity/examples/example_3/src/ProductionCode2.h +2 -2
- data/vendor/unity/examples/example_3/target_gcc_32.yml +47 -46
- data/vendor/unity/examples/example_3/test/TestProductionCode.c +62 -62
- data/vendor/unity/examples/example_3/test/TestProductionCode2.c +31 -31
- data/vendor/unity/examples/example_4/meson.build +17 -0
- data/vendor/unity/examples/example_4/readme.txt +15 -0
- data/vendor/unity/examples/example_4/src/ProductionCode.c +24 -0
- data/vendor/unity/examples/example_4/src/ProductionCode.h +3 -0
- data/vendor/unity/examples/example_4/src/ProductionCode2.c +11 -0
- data/vendor/unity/examples/example_4/src/ProductionCode2.h +2 -0
- data/vendor/unity/examples/example_4/src/meson.build +21 -0
- data/vendor/unity/examples/example_4/subprojects/unity.wrap +4 -0
- data/vendor/unity/examples/example_4/test/TestProductionCode.c +63 -0
- data/vendor/unity/examples/example_4/test/TestProductionCode2.c +35 -0
- data/vendor/unity/examples/example_4/test/meson.build +12 -0
- data/vendor/unity/examples/example_4/test/test_runners/TestProductionCode2_Runner.c +53 -0
- data/vendor/unity/examples/example_4/test/test_runners/TestProductionCode_Runner.c +57 -0
- data/vendor/unity/examples/example_4/test/test_runners/meson.build +16 -0
- data/vendor/unity/examples/unity_config.h +263 -247
- data/vendor/unity/extras/eclipse/error_parsers.txt +26 -26
- data/vendor/unity/extras/fixture/rakefile.rb +44 -48
- data/vendor/unity/extras/fixture/rakefile_helper.rb +183 -178
- data/vendor/unity/extras/fixture/readme.md +17 -0
- data/vendor/unity/extras/fixture/src/unity_fixture.c +275 -436
- data/vendor/unity/extras/fixture/src/unity_fixture.h +83 -83
- data/vendor/unity/extras/fixture/src/unity_fixture_internals.h +50 -51
- data/vendor/unity/extras/fixture/test/Makefile +72 -75
- data/vendor/unity/extras/fixture/test/main/AllTests.c +20 -22
- data/vendor/unity/extras/fixture/test/template_fixture_tests.c +39 -39
- data/vendor/unity/extras/fixture/test/unity_fixture_Test.c +245 -543
- data/vendor/unity/extras/fixture/test/unity_fixture_TestRunner.c +32 -57
- data/vendor/unity/extras/memory/rakefile.rb +45 -0
- data/vendor/unity/extras/memory/rakefile_helper.rb +187 -0
- data/vendor/unity/extras/memory/readme.md +49 -0
- data/vendor/unity/extras/memory/src/unity_memory.c +202 -0
- data/vendor/unity/extras/memory/src/unity_memory.h +60 -0
- data/vendor/unity/extras/memory/test/Makefile +78 -0
- data/vendor/unity/extras/memory/test/unity_memory_Test.c +325 -0
- data/vendor/unity/extras/memory/test/unity_memory_TestRunner.c +49 -0
- data/vendor/unity/extras/memory/test/unity_output_Spy.c +56 -0
- data/vendor/unity/extras/memory/test/unity_output_Spy.h +16 -0
- data/vendor/unity/meson.build +69 -0
- data/vendor/unity/src/CMakeLists.txt +22 -0
- data/vendor/unity/src/meson.build +16 -0
- data/vendor/unity/src/unity.c +2085 -1572
- data/vendor/unity/src/unity.h +617 -503
- data/vendor/unity/src/unity_internals.h +1002 -924
- data/vendor/unity/test/Makefile +67 -68
- data/vendor/unity/test/expectdata/testsample_cmd.c +61 -61
- data/vendor/unity/test/expectdata/testsample_def.c +57 -57
- data/vendor/unity/test/expectdata/testsample_head1.c +55 -55
- data/vendor/unity/test/expectdata/testsample_head1.h +15 -15
- data/vendor/unity/test/expectdata/testsample_mock_cmd.c +80 -80
- data/vendor/unity/test/expectdata/testsample_mock_def.c +76 -76
- data/vendor/unity/test/expectdata/testsample_mock_head1.c +75 -75
- data/vendor/unity/test/expectdata/testsample_mock_head1.h +13 -13
- data/vendor/unity/test/expectdata/testsample_mock_new1.c +89 -89
- data/vendor/unity/test/expectdata/testsample_mock_new2.c +89 -89
- data/vendor/unity/test/expectdata/testsample_mock_param.c +77 -77
- data/vendor/unity/test/expectdata/testsample_mock_run1.c +89 -89
- data/vendor/unity/test/expectdata/testsample_mock_run2.c +89 -89
- data/vendor/unity/test/expectdata/testsample_mock_yaml.c +90 -90
- data/vendor/unity/test/expectdata/testsample_new1.c +67 -67
- data/vendor/unity/test/expectdata/testsample_new2.c +70 -70
- data/vendor/unity/test/expectdata/testsample_param.c +58 -58
- data/vendor/unity/test/expectdata/testsample_run1.c +67 -67
- data/vendor/unity/test/expectdata/testsample_run2.c +70 -70
- data/vendor/unity/test/expectdata/testsample_yaml.c +71 -71
- data/vendor/unity/test/rakefile +124 -125
- data/vendor/unity/test/rakefile_helper.rb +269 -260
- data/vendor/unity/test/spec/generate_module_existing_file_spec.rb +158 -158
- data/vendor/unity/test/targets/ansi.yml +49 -0
- data/vendor/unity/test/targets/clang_file.yml +78 -78
- data/vendor/unity/test/targets/clang_strict.yml +78 -78
- data/vendor/unity/test/targets/gcc_32.yml +49 -49
- data/vendor/unity/test/targets/gcc_64.yml +50 -50
- data/vendor/unity/test/targets/gcc_auto_limits.yml +47 -47
- data/vendor/unity/test/targets/gcc_auto_stdint.yml +59 -59
- data/vendor/unity/test/targets/gcc_manual_math.yml +47 -47
- data/vendor/unity/test/targets/hitech_picc18.yml +101 -101
- data/vendor/unity/test/targets/iar_arm_v4.yml +90 -90
- data/vendor/unity/test/targets/iar_arm_v5.yml +80 -80
- data/vendor/unity/test/targets/iar_arm_v5_3.yml +80 -80
- data/vendor/unity/test/targets/iar_armcortex_LM3S9B92_v5_4.yml +94 -94
- data/vendor/unity/test/targets/iar_cortexm3_v5.yml +84 -84
- data/vendor/unity/test/targets/iar_msp430.yml +95 -95
- data/vendor/unity/test/targets/iar_sh2a_v6.yml +86 -86
- data/vendor/unity/test/testdata/CException.h +11 -11
- data/vendor/unity/test/testdata/Defs.h +8 -8
- data/vendor/unity/test/testdata/cmock.h +14 -14
- data/vendor/unity/test/testdata/mockMock.h +13 -13
- data/vendor/unity/test/testdata/testRunnerGenerator.c +189 -186
- data/vendor/unity/test/testdata/testRunnerGeneratorSmall.c +70 -70
- data/vendor/unity/test/testdata/testRunnerGeneratorWithMocks.c +197 -195
- data/vendor/unity/test/tests/test_generate_test_runner.rb +1268 -1252
- data/vendor/unity/test/tests/testparameterized.c +171 -113
- data/vendor/unity/test/tests/testunity.c +8168 -5371
- metadata +201 -27
- data/lib/ceedling/version.rb.erb +0 -15
- data/vendor/c_exception/release/build.info +0 -2
- data/vendor/c_exception/release/version.info +0 -2
- data/vendor/cmock/release/build.info +0 -2
- data/vendor/cmock/release/version.info +0 -2
- 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/unity/release/build.info +0 -2
- data/vendor/cmock/vendor/unity/release/version.info +0 -2
- data/vendor/unity/extras/fixture/readme.txt +0 -9
- data/vendor/unity/release/build.info +0 -2
- data/vendor/unity/release/version.info +0 -2
@@ -1,1699 +1,1728 @@
|
|
1
|
-
# ==========================================
|
2
|
-
# CMock Project - Automatic Mock Generation for C
|
3
|
-
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
-
# [Released under MIT License. Please refer to license.txt for details]
|
5
|
-
# ==========================================
|
6
|
-
|
7
|
-
$ThisIsOnlyATest = true
|
8
|
-
|
9
|
-
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
10
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_header_parser'
|
11
|
-
|
12
|
-
describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
13
|
-
|
14
|
-
before do
|
15
|
-
create_mocks :config
|
16
|
-
@test_name = 'test_file.h'
|
17
|
-
@config.expect :strippables, ["STRIPPABLE"]
|
18
|
-
@config.expect :attributes, ['__ramfunc', 'funky_attrib', 'SQLITE_API']
|
19
|
-
@config.expect :c_calling_conventions, ['__stdcall']
|
20
|
-
@config.expect :treat_as_void, ['MY_FUNKY_VOID']
|
21
|
-
@config.expect :treat_as, { "BANJOS" => "INT", "TUBAS" => "HEX16"}
|
22
|
-
@config.expect :
|
23
|
-
@config.expect :
|
24
|
-
@config.expect :
|
25
|
-
|
26
|
-
@
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
"
|
59
|
-
"//
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"// */\n" +
|
63
|
-
"
|
64
|
-
"
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
68
|
-
"
|
69
|
-
"
|
70
|
-
"
|
71
|
-
"
|
72
|
-
"
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
"
|
80
|
-
"
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
"
|
92
|
-
"
|
93
|
-
" STRIPPABLE;\n" +
|
94
|
-
"
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
"
|
112
|
-
"
|
113
|
-
" __attribute__
|
114
|
-
"
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
"
|
144
|
-
"
|
145
|
-
"
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
"
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
"int
|
186
|
-
" typedef
|
187
|
-
"
|
188
|
-
"
|
189
|
-
"typedef
|
190
|
-
"
|
191
|
-
"
|
192
|
-
"
|
193
|
-
"
|
194
|
-
"
|
195
|
-
"
|
196
|
-
"
|
197
|
-
"
|
198
|
-
"
|
199
|
-
" char_ptr
|
200
|
-
"
|
201
|
-
"
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
"
|
220
|
-
"
|
221
|
-
"
|
222
|
-
"
|
223
|
-
"
|
224
|
-
" THING2
|
225
|
-
"
|
226
|
-
"
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
"
|
238
|
-
"
|
239
|
-
"
|
240
|
-
"
|
241
|
-
"
|
242
|
-
" char b;\n" +
|
243
|
-
"
|
244
|
-
"
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
"
|
256
|
-
"
|
257
|
-
"
|
258
|
-
"
|
259
|
-
"
|
260
|
-
"
|
261
|
-
"struct
|
262
|
-
"
|
263
|
-
"
|
264
|
-
"
|
265
|
-
"
|
266
|
-
"
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
"extern
|
278
|
-
"
|
279
|
-
"
|
280
|
-
"void
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
"uint32
|
297
|
-
"{\n" +
|
298
|
-
"
|
299
|
-
"
|
300
|
-
"
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
"uint32
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
"
|
319
|
-
"
|
320
|
-
"
|
321
|
-
"
|
322
|
-
"}\n" +
|
323
|
-
"
|
324
|
-
"
|
325
|
-
"
|
326
|
-
"
|
327
|
-
"
|
328
|
-
"
|
329
|
-
"
|
330
|
-
"
|
331
|
-
"
|
332
|
-
"
|
333
|
-
"
|
334
|
-
"
|
335
|
-
"
|
336
|
-
"
|
337
|
-
"
|
338
|
-
"
|
339
|
-
"
|
340
|
-
"
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
"uint32
|
348
|
-
"uint32
|
349
|
-
"uint32
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
"{" +
|
361
|
-
"
|
362
|
-
"
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
"
|
385
|
-
"
|
386
|
-
"
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
"
|
409
|
-
"
|
410
|
-
"
|
411
|
-
"
|
412
|
-
"
|
413
|
-
"
|
414
|
-
"
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
"extern
|
437
|
-
"
|
438
|
-
"
|
439
|
-
"void
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
"
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
"#
|
460
|
-
"
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
:
|
495
|
-
:
|
496
|
-
:
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
:
|
502
|
-
:
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
:
|
515
|
-
:
|
516
|
-
:
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
:
|
522
|
-
:
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
:
|
535
|
-
:
|
536
|
-
:
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
:
|
542
|
-
:
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
"
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
:
|
634
|
-
:
|
635
|
-
:
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
:
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
:
|
656
|
-
:
|
657
|
-
:
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
:
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
:
|
680
|
-
:
|
681
|
-
:
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
:
|
687
|
-
:
|
688
|
-
:
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
:
|
701
|
-
:
|
702
|
-
:
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
:
|
708
|
-
|
709
|
-
|
710
|
-
:
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
:
|
724
|
-
:
|
725
|
-
:
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
:
|
731
|
-
:
|
732
|
-
|
733
|
-
|
734
|
-
:
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
:
|
750
|
-
:
|
751
|
-
:
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
:
|
757
|
-
|
758
|
-
|
759
|
-
:
|
760
|
-
|
761
|
-
|
762
|
-
:
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
:
|
767
|
-
:
|
768
|
-
:
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
:
|
774
|
-
|
775
|
-
|
776
|
-
:
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
:
|
794
|
-
:
|
795
|
-
:
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
:
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
:
|
822
|
-
:
|
823
|
-
:
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
:
|
829
|
-
:
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
:
|
851
|
-
:
|
852
|
-
:
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
:
|
858
|
-
:
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
:
|
877
|
-
:
|
878
|
-
:
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
:
|
884
|
-
:
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
:
|
900
|
-
:
|
901
|
-
:
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
:
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
{ :type=>"int
|
911
|
-
{ :type=>"int*",
|
912
|
-
{ :type=>"int",
|
913
|
-
{ :type=>"int",
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
:
|
932
|
-
:
|
933
|
-
:
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
:
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
{ :type=>"int
|
943
|
-
{ :type=>"int*",
|
944
|
-
{ :type=>"int",
|
945
|
-
{ :type=>"int",
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
expected = [{ :
|
960
|
-
:
|
961
|
-
:return => { :type
|
962
|
-
:name
|
963
|
-
:
|
964
|
-
:
|
965
|
-
:
|
966
|
-
:
|
967
|
-
:
|
968
|
-
},
|
969
|
-
:
|
970
|
-
:
|
971
|
-
|
972
|
-
:args_string=>"
|
973
|
-
:args_call=>"
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
:
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
:
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
:
|
1007
|
-
:
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
:
|
1014
|
-
:
|
1015
|
-
|
1016
|
-
|
1017
|
-
:
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
:
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
:
|
1035
|
-
:
|
1036
|
-
:
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
:name=>"
|
1042
|
-
:
|
1043
|
-
:
|
1044
|
-
|
1045
|
-
|
1046
|
-
:
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
:
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
:
|
1108
|
-
:
|
1109
|
-
:
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
:
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
{:type=>"
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
:
|
1134
|
-
:
|
1135
|
-
:
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
:
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
:
|
1160
|
-
:
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
:
|
1185
|
-
:
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
:
|
1210
|
-
:
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
:
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
expected
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
:
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
:
|
1242
|
-
:
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
expected
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
:
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
:
|
1266
|
-
:
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
:
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
:
|
1290
|
-
:
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
:
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
:
|
1314
|
-
:
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
:
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
:
|
1363
|
-
:
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
:
|
1379
|
-
:
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
:
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
:
|
1404
|
-
:
|
1405
|
-
:
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
:
|
1411
|
-
|
1412
|
-
:
|
1413
|
-
:
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
:
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
:
|
1437
|
-
:
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
:
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
:
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
expected
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1492
|
-
expected
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
:
|
1508
|
-
:
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
assert_equal(
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
expected
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
:
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
:
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
:
|
1629
|
-
:
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
[ "
|
1672
|
-
[ "const
|
1673
|
-
[ "
|
1674
|
-
[ "
|
1675
|
-
[ "
|
1676
|
-
[ "
|
1677
|
-
[ "
|
1678
|
-
[ "
|
1679
|
-
[ "
|
1680
|
-
[ "
|
1681
|
-
[ "const
|
1682
|
-
[ "
|
1683
|
-
[ "
|
1684
|
-
[ "const
|
1685
|
-
[ "
|
1686
|
-
[ "
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
[
|
1691
|
-
[
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
|
1
|
+
# ==========================================
|
2
|
+
# CMock Project - Automatic Mock Generation for C
|
3
|
+
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
+
# [Released under MIT License. Please refer to license.txt for details]
|
5
|
+
# ==========================================
|
6
|
+
|
7
|
+
$ThisIsOnlyATest = true
|
8
|
+
|
9
|
+
require File.expand_path(File.dirname(__FILE__)) + "/../test_helper"
|
10
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../lib/cmock_header_parser'
|
11
|
+
|
12
|
+
describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
13
|
+
|
14
|
+
before do
|
15
|
+
create_mocks :config
|
16
|
+
@test_name = 'test_file.h'
|
17
|
+
@config.expect :strippables, ["STRIPPABLE"]
|
18
|
+
@config.expect :attributes, ['__ramfunc', 'funky_attrib', 'SQLITE_API']
|
19
|
+
@config.expect :c_calling_conventions, ['__stdcall']
|
20
|
+
@config.expect :treat_as_void, ['MY_FUNKY_VOID']
|
21
|
+
@config.expect :treat_as, { "BANJOS" => "INT", "TUBAS" => "HEX16"}
|
22
|
+
@config.expect :treat_as_array, {"IntArray" => "int", "Book" => "Page"}
|
23
|
+
@config.expect :when_no_prototypes, :error
|
24
|
+
@config.expect :verbosity, 1
|
25
|
+
@config.expect :treat_externs, :exclude
|
26
|
+
@config.expect :array_size_type, ['int', 'size_t']
|
27
|
+
@config.expect :array_size_name, 'size|len'
|
28
|
+
|
29
|
+
@parser = CMockHeaderParser.new(@config)
|
30
|
+
end
|
31
|
+
|
32
|
+
after do
|
33
|
+
end
|
34
|
+
|
35
|
+
it "create and initialize variables to defaults appropriately" do
|
36
|
+
assert_equal([], @parser.funcs)
|
37
|
+
assert_equal(['const', '__ramfunc', 'funky_attrib', 'SQLITE_API'], @parser.c_attributes)
|
38
|
+
assert_equal(['void','MY_FUNKY_VOID'], @parser.treat_as_void)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "strip out line comments" do
|
42
|
+
source =
|
43
|
+
" abcd;\n" +
|
44
|
+
"// hello;\n" +
|
45
|
+
"who // is you\n"
|
46
|
+
|
47
|
+
expected =
|
48
|
+
[
|
49
|
+
"abcd",
|
50
|
+
"who"
|
51
|
+
]
|
52
|
+
|
53
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
54
|
+
end
|
55
|
+
|
56
|
+
it "remove block comments" do
|
57
|
+
source =
|
58
|
+
" no_comments;\n" +
|
59
|
+
"// basic_line_comment;\n" +
|
60
|
+
"/* basic_block_comment;*/\n" +
|
61
|
+
"pre_block; /* start_of_block_comment;\n" +
|
62
|
+
"// embedded_line_comment_in_block_comment; */\n" +
|
63
|
+
"// /* commented_out_block_comment_line\n" +
|
64
|
+
"shown_because_block_comment_invalid_from_line_comment;\n" +
|
65
|
+
"// */\n" +
|
66
|
+
"//* shorter_commented_out_block_comment_line; \n" +
|
67
|
+
"shown_because_block_comment_invalid_from_shorter_line_comment;\n" +
|
68
|
+
"/*/\n" +
|
69
|
+
"not_shown_because_line_above_started_comment;\n" +
|
70
|
+
"//*/\n" +
|
71
|
+
"/* \n" +
|
72
|
+
"not_shown_because_block_comment_started_this_time;\n" +
|
73
|
+
"/*/\n" +
|
74
|
+
"shown_because_line_above_ended_comment_this_time;\n" +
|
75
|
+
"//*/\n"
|
76
|
+
|
77
|
+
expected =
|
78
|
+
[
|
79
|
+
"no_comments",
|
80
|
+
"pre_block",
|
81
|
+
"shown_because_block_comment_invalid_from_line_comment",
|
82
|
+
"shown_because_block_comment_invalid_from_shorter_line_comment",
|
83
|
+
"shown_because_line_above_ended_comment_this_time"
|
84
|
+
]
|
85
|
+
|
86
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
87
|
+
end
|
88
|
+
|
89
|
+
it "remove strippables from the beginning or end of function declarations" do
|
90
|
+
source =
|
91
|
+
"void* my_calloc(size_t, size_t) STRIPPABLE;\n" +
|
92
|
+
"void\n" +
|
93
|
+
" my_realloc(void*, size_t) STRIPPABLE;\n" +
|
94
|
+
"extern int\n" +
|
95
|
+
" my_printf (void *my_object, const char *my_format, ...)\n" +
|
96
|
+
" STRIPPABLE;\n" +
|
97
|
+
" void STRIPPABLE universal_handler ();\n"
|
98
|
+
|
99
|
+
expected =
|
100
|
+
[
|
101
|
+
"void* my_calloc(size_t, size_t)",
|
102
|
+
"void my_realloc(void*, size_t)",
|
103
|
+
"void universal_handler()"
|
104
|
+
]
|
105
|
+
|
106
|
+
assert_equal(expected, @parser.import_source(source))
|
107
|
+
end
|
108
|
+
|
109
|
+
it "remove gcc's function __attribute__'s" do
|
110
|
+
source =
|
111
|
+
"void* my_calloc(size_t, size_t) __attribute__((alloc_size(1,2)));\n" +
|
112
|
+
"void\n" +
|
113
|
+
" my_realloc(void*, size_t) __attribute__((alloc_size(2)));\n" +
|
114
|
+
"extern int\n" +
|
115
|
+
" my_printf (void *my_object, const char *my_format, ...)\n" +
|
116
|
+
" __attribute__ ((format (printf, 2, 3)));\n" +
|
117
|
+
" void __attribute__ ((interrupt)) universal_handler ();\n"
|
118
|
+
|
119
|
+
expected =
|
120
|
+
[
|
121
|
+
"void* my_calloc(size_t, size_t)",
|
122
|
+
"void my_realloc(void*, size_t)",
|
123
|
+
"void universal_handler()"
|
124
|
+
]
|
125
|
+
|
126
|
+
assert_equal(expected, @parser.import_source(source))
|
127
|
+
end
|
128
|
+
|
129
|
+
it "remove preprocessor directives" do
|
130
|
+
source =
|
131
|
+
"#when stuff_happens\n" +
|
132
|
+
"#ifdef _TEST\n" +
|
133
|
+
"#pragma stack_switch"
|
134
|
+
|
135
|
+
expected = []
|
136
|
+
|
137
|
+
assert_equal(expected, @parser.import_source(source))
|
138
|
+
end
|
139
|
+
|
140
|
+
|
141
|
+
it "remove assembler pragma sections" do
|
142
|
+
source =
|
143
|
+
" #pragma\tasm\n" +
|
144
|
+
" .foo\n" +
|
145
|
+
" lda %m\n" +
|
146
|
+
" nop\n" +
|
147
|
+
"# pragma endasm \n" +
|
148
|
+
"foo"
|
149
|
+
|
150
|
+
expected = ["foo"]
|
151
|
+
|
152
|
+
assert_equal(expected, @parser.import_source(source))
|
153
|
+
end
|
154
|
+
|
155
|
+
|
156
|
+
it "smush lines together that contain continuation characters" do
|
157
|
+
source =
|
158
|
+
"hoo hah \\\n" +
|
159
|
+
"when \\ \n"
|
160
|
+
|
161
|
+
expected =
|
162
|
+
[
|
163
|
+
"hoo hah when"
|
164
|
+
]
|
165
|
+
|
166
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
167
|
+
end
|
168
|
+
|
169
|
+
|
170
|
+
it "remove C macro definitions" do
|
171
|
+
source =
|
172
|
+
"#define this is the first line\\\n" +
|
173
|
+
"and the second\\\n" +
|
174
|
+
"and the third that should be removed\n" +
|
175
|
+
"but I'm here\n"
|
176
|
+
|
177
|
+
expected = ["but I'm here"]
|
178
|
+
|
179
|
+
assert_equal(expected, @parser.import_source(source))
|
180
|
+
end
|
181
|
+
|
182
|
+
|
183
|
+
it "remove typedef statements" do
|
184
|
+
source =
|
185
|
+
"typedef uint32 (unsigned int);\n" +
|
186
|
+
"const typedef int INT;\n" +
|
187
|
+
"int notatypedef;\n" +
|
188
|
+
"int typedef_isnt_me;\n" +
|
189
|
+
" typedef who cares what really comes here \n" + # exercise multiline typedef
|
190
|
+
" continuation;\n" +
|
191
|
+
"this should remain!;\n" +
|
192
|
+
"typedef blah bleh;\n" +
|
193
|
+
"typedef struct shell_command_struct {\n" +
|
194
|
+
" char_ptr COMMAND;\n" +
|
195
|
+
" int_32 (*SHELL_FUNC)(int_32 argc);\n" +
|
196
|
+
"} SHELL_COMMAND_STRUCT, * SHELL_COMMAND_PTR;\n" +
|
197
|
+
"typedef struct shell_command_struct {\n" +
|
198
|
+
" char_ptr COMMAND;\n" +
|
199
|
+
" int_32 (*SHELL_FUNC)(int_32 argc, char_ptr argv[]);\n" +
|
200
|
+
"} SHELL_COMMAND_STRUCT, * SHELL_COMMAND_PTR;\n" +
|
201
|
+
"typedef struct shell_command_struct {\n" +
|
202
|
+
" char_ptr COMMAND;\n" +
|
203
|
+
" int_32 (*SHELL_FUNC)(int_32 argc);\n" +
|
204
|
+
"};\n"
|
205
|
+
|
206
|
+
expected =
|
207
|
+
[
|
208
|
+
"int notatypedef",
|
209
|
+
"int typedef_isnt_me",
|
210
|
+
"this should remain!"
|
211
|
+
]
|
212
|
+
|
213
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
214
|
+
end
|
215
|
+
|
216
|
+
|
217
|
+
it "remove enum statements" do
|
218
|
+
source =
|
219
|
+
"enum _NamedEnum {\n" +
|
220
|
+
" THING1 = (0x0001),\n" +
|
221
|
+
" THING2 = (0x0001 << 5),\n" +
|
222
|
+
"}ListOValues;\n\n" +
|
223
|
+
"don't delete me!!\n" +
|
224
|
+
" modifier_str enum _NamedEnum {THING1 = (0x0001), THING2 = (0x0001 << 5)} ListOValues;\n\n" +
|
225
|
+
"typedef enum {\n" +
|
226
|
+
" THING1,\n" +
|
227
|
+
" THING2,\n" +
|
228
|
+
"} Thinger;\n" +
|
229
|
+
"or me!!\n"
|
230
|
+
|
231
|
+
assert_equal(["don't delete me!! or me!!"], @parser.import_source(source).map!{|s|s.strip})
|
232
|
+
end
|
233
|
+
|
234
|
+
|
235
|
+
it "remove union statements" do
|
236
|
+
source =
|
237
|
+
"union _NamedDoohicky {\n" +
|
238
|
+
" unsigned int a;\n" +
|
239
|
+
" char b;\n" +
|
240
|
+
"} Doohicky;\n\n" +
|
241
|
+
"I want to live!!\n" +
|
242
|
+
"some_modifier union { unsigned int a; char b;} Whatever;\n" +
|
243
|
+
"typedef union {\n" +
|
244
|
+
" unsigned int a;\n" +
|
245
|
+
" char b;\n" +
|
246
|
+
"} Whatever;\n" +
|
247
|
+
"me too!!\n"
|
248
|
+
|
249
|
+
assert_equal(["I want to live!! me too!!"], @parser.import_source(source).map!{|s|s.strip})
|
250
|
+
end
|
251
|
+
|
252
|
+
|
253
|
+
it "remove struct statements" do
|
254
|
+
source =
|
255
|
+
"struct _NamedStruct1 {\n" +
|
256
|
+
" unsigned int a;\n" +
|
257
|
+
" signed long int b;\n" +
|
258
|
+
"} Thing ;\n\n" +
|
259
|
+
"extern struct ForwardDeclared_t TestDataType1;\n" +
|
260
|
+
"void foo(void);\n" +
|
261
|
+
"struct\n"+
|
262
|
+
" MultilineForwardDeclared_t\n" +
|
263
|
+
" TestDataType2;\n" +
|
264
|
+
"struct THINGER foo(void);\n" +
|
265
|
+
"typedef struct {\n" +
|
266
|
+
" unsigned int a;\n" +
|
267
|
+
" signed char b;\n" +
|
268
|
+
"}Thinger;\n" +
|
269
|
+
"I want to live!!\n"
|
270
|
+
|
271
|
+
assert_equal(["void foo(void)", "struct THINGER foo(void)", "I want to live!!"],
|
272
|
+
@parser.import_source(source).map!{|s|s.strip})
|
273
|
+
end
|
274
|
+
|
275
|
+
it "remove externed and inline functions" do
|
276
|
+
source =
|
277
|
+
" extern uint32 foobar(unsigned int);\n" +
|
278
|
+
"uint32 extern_name_func(unsigned int);\n" +
|
279
|
+
"uint32 funcinline(unsigned int);\n" +
|
280
|
+
"extern void bar(unsigned int);\n" +
|
281
|
+
"inline void bar(unsigned int);\n" +
|
282
|
+
"extern\n" +
|
283
|
+
"void kinda_ugly_on_the_next_line(unsigned int);\n"
|
284
|
+
|
285
|
+
expected =
|
286
|
+
[
|
287
|
+
"uint32 extern_name_func(unsigned int)",
|
288
|
+
"uint32 funcinline(unsigned int)"
|
289
|
+
]
|
290
|
+
|
291
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
292
|
+
end
|
293
|
+
|
294
|
+
it "remove function definitions but keep function declarations" do
|
295
|
+
source =
|
296
|
+
"uint32 func_with_decl_a(unsigned int);\n" +
|
297
|
+
"uint32 func_with_decl_a(unsigned int a) { return a; }\n" +
|
298
|
+
"uint32 func_with_decl_b(unsigned int);\n" +
|
299
|
+
"uint32 func_with_decl_b(unsigned int a)\n" +
|
300
|
+
"{\n" +
|
301
|
+
" bar((unsigned int) a);\n" +
|
302
|
+
" stripme(a);\n" +
|
303
|
+
"}\n"
|
304
|
+
|
305
|
+
expected =
|
306
|
+
[
|
307
|
+
"uint32 func_with_decl_a(unsigned int)",
|
308
|
+
"uint32 func_with_decl_a", #okay. it's not going to be interpretted as another function
|
309
|
+
"uint32 func_with_decl_b(unsigned int)",
|
310
|
+
"uint32 func_with_decl_b", #okay. it's not going to be interpretted as another function
|
311
|
+
]
|
312
|
+
|
313
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
314
|
+
end
|
315
|
+
|
316
|
+
it "remove function definitions with nested braces but keep function declarations" do
|
317
|
+
source =
|
318
|
+
"uint32 func_with_decl_a(unsigned int);\n" +
|
319
|
+
"uint32 func_with_decl_a(unsigned int a) {\n" +
|
320
|
+
" while (stuff) {\n" +
|
321
|
+
" not_a_definition1(void);\n" +
|
322
|
+
" }\n" +
|
323
|
+
" not_a_definition2(blah, bleh);\n" +
|
324
|
+
" return a;\n" +
|
325
|
+
"}\n" +
|
326
|
+
"uint32 func_with_decl_b(unsigned int);\n" +
|
327
|
+
"uint32 func_with_decl_b(unsigned int a)\n" +
|
328
|
+
"{\n" +
|
329
|
+
" bar((unsigned int) a);\n" +
|
330
|
+
" stripme(a);\n" +
|
331
|
+
"}\n" +
|
332
|
+
"uint32 func_with_decl_c(unsigned int);\n" +
|
333
|
+
"uint32 func_with_decl_c(unsigned int a)\n" +
|
334
|
+
"{\n" +
|
335
|
+
" if(a > 0)\n" +
|
336
|
+
" {\n" +
|
337
|
+
" return 1;\n" +
|
338
|
+
" }\n" +
|
339
|
+
" else\n"+
|
340
|
+
" {\n" +
|
341
|
+
" return 2;\n" +
|
342
|
+
" }\n" +
|
343
|
+
"}\n"
|
344
|
+
|
345
|
+
expected =
|
346
|
+
[
|
347
|
+
"uint32 func_with_decl_a(unsigned int)",
|
348
|
+
"uint32 func_with_decl_a", #okay. it's not going to be interpretted as another function
|
349
|
+
"uint32 func_with_decl_b(unsigned int)",
|
350
|
+
"uint32 func_with_decl_b", #okay. it's not going to be interpretted as another function
|
351
|
+
"uint32 func_with_decl_c(unsigned int)",
|
352
|
+
"uint32 func_with_decl_c", #okay. it's not going to be interpretted as another function
|
353
|
+
]
|
354
|
+
|
355
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
356
|
+
end
|
357
|
+
|
358
|
+
it "remove a fully defined inline function" do
|
359
|
+
source =
|
360
|
+
"inline void foo(unsigned int a) { oranges = a; }\n" +
|
361
|
+
"inline void bar(unsigned int a) { apples = a; };\n" +
|
362
|
+
"inline void bar(unsigned int a)\n" +
|
363
|
+
"{" +
|
364
|
+
" bananas = a;\n" +
|
365
|
+
"}"
|
366
|
+
|
367
|
+
# ensure it's expected type of exception
|
368
|
+
assert_raises RuntimeError do
|
369
|
+
@parser.parse("module", source)
|
370
|
+
end
|
371
|
+
|
372
|
+
assert_equal([], @parser.funcs)
|
373
|
+
|
374
|
+
# verify exception message
|
375
|
+
begin
|
376
|
+
@parser.parse("module", source)
|
377
|
+
rescue RuntimeError => e
|
378
|
+
assert_equal("ERROR: No function prototypes found!", e.message)
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
it "remove a fully defined inline function that is multiple lines" do
|
383
|
+
source =
|
384
|
+
"inline void bar(unsigned int a)\n" +
|
385
|
+
"{" +
|
386
|
+
" bananas = a;\n" +
|
387
|
+
" grapes = a;\n" +
|
388
|
+
" apples(bananas, grapes);\n" +
|
389
|
+
"}"
|
390
|
+
|
391
|
+
# ensure it's expected type of exception
|
392
|
+
assert_raises RuntimeError do
|
393
|
+
@parser.parse("module", source)
|
394
|
+
end
|
395
|
+
|
396
|
+
assert_equal([], @parser.funcs)
|
397
|
+
|
398
|
+
# verify exception message
|
399
|
+
begin
|
400
|
+
@parser.parse("module", source)
|
401
|
+
rescue RuntimeError => e
|
402
|
+
assert_equal("ERROR: No function prototypes found!", e.message)
|
403
|
+
end
|
404
|
+
end
|
405
|
+
|
406
|
+
it "remove a fully defined inline function that contains nested braces" do
|
407
|
+
source =
|
408
|
+
"inline void bar(unsigned int a)\n" +
|
409
|
+
"{" +
|
410
|
+
" apples(bananas, grapes);\n" +
|
411
|
+
" if (bananas == a)\n" +
|
412
|
+
" {\n" +
|
413
|
+
" oranges(a);\n" +
|
414
|
+
" grapes = a;\n" +
|
415
|
+
" }\n" +
|
416
|
+
" grapefruit(bananas, grapes);\n" +
|
417
|
+
"}"
|
418
|
+
|
419
|
+
# ensure it's expected type of exception
|
420
|
+
assert_raises RuntimeError do
|
421
|
+
@parser.parse("module", source)
|
422
|
+
end
|
423
|
+
|
424
|
+
assert_equal([], @parser.funcs)
|
425
|
+
|
426
|
+
# verify exception message
|
427
|
+
begin
|
428
|
+
@parser.parse("module", source)
|
429
|
+
rescue RuntimeError => e
|
430
|
+
assert_equal("ERROR: No function prototypes found!", e.message)
|
431
|
+
end
|
432
|
+
end
|
433
|
+
|
434
|
+
it "remove just inline functions if externs to be included" do
|
435
|
+
source =
|
436
|
+
" extern uint32 foobar(unsigned int);\n" +
|
437
|
+
"uint32 extern_name_func(unsigned int);\n" +
|
438
|
+
"uint32 funcinline(unsigned int);\n" +
|
439
|
+
"extern void bar(unsigned int);\n" +
|
440
|
+
"inline void bar(unsigned int);\n" +
|
441
|
+
"extern\n" +
|
442
|
+
"void kinda_ugly_on_the_next_line(unsigned int);\n"
|
443
|
+
|
444
|
+
expected =
|
445
|
+
[ "extern uint32 foobar(unsigned int)",
|
446
|
+
"uint32 extern_name_func(unsigned int)",
|
447
|
+
"uint32 funcinline(unsigned int)",
|
448
|
+
"extern void bar(unsigned int)",
|
449
|
+
"extern void kinda_ugly_on_the_next_line(unsigned int)"
|
450
|
+
]
|
451
|
+
|
452
|
+
@parser.treat_externs = :include
|
453
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
454
|
+
end
|
455
|
+
|
456
|
+
|
457
|
+
it "remove defines" do
|
458
|
+
source =
|
459
|
+
"#define whatever you feel like defining\n" +
|
460
|
+
"void hello(void);\n" +
|
461
|
+
"#DEFINE I JUST DON'T CARE\n" +
|
462
|
+
"#deFINE\n" +
|
463
|
+
"#define get_foo() \\\n ((Thing)foo.bar)" # exercise multiline define
|
464
|
+
|
465
|
+
expected =
|
466
|
+
[
|
467
|
+
"void hello(void)",
|
468
|
+
]
|
469
|
+
|
470
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
471
|
+
end
|
472
|
+
|
473
|
+
|
474
|
+
it "remove keywords that would keep things from going smoothly in the future" do
|
475
|
+
source =
|
476
|
+
"const int TheMatrix(register int Trinity, unsigned int *restrict Neo)"
|
477
|
+
|
478
|
+
expected =
|
479
|
+
[
|
480
|
+
"const int TheMatrix(int Trinity, unsigned int * Neo)",
|
481
|
+
]
|
482
|
+
|
483
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
484
|
+
end
|
485
|
+
|
486
|
+
|
487
|
+
# some code actually typedef's void even though it's not ANSI C and is, frankly, weird
|
488
|
+
# since cmock treats void specially, we can't let void be obfuscated
|
489
|
+
it "handle odd case of typedef'd void returned" do
|
490
|
+
source = "MY_FUNKY_VOID FunkyVoidReturned(int a)"
|
491
|
+
expected = { :var_arg=>nil,
|
492
|
+
:name=>"FunkyVoidReturned",
|
493
|
+
:return=>{ :type => "void",
|
494
|
+
:name => 'cmock_to_return',
|
495
|
+
:ptr? => false,
|
496
|
+
:const? => false,
|
497
|
+
:const_ptr? => false,
|
498
|
+
:str => "void cmock_to_return",
|
499
|
+
:void? => true
|
500
|
+
},
|
501
|
+
:modifier=>"",
|
502
|
+
:contains_ptr? => false,
|
503
|
+
:args=>[{:type=>"int", :name=>"a", :ptr? => false, :const? => false, :const_ptr? => false}],
|
504
|
+
:args_string=>"int a",
|
505
|
+
:args_call=>"a"}
|
506
|
+
assert_equal(expected, @parser.parse_declaration(source))
|
507
|
+
end
|
508
|
+
|
509
|
+
it "handle odd case of typedef'd void as arg" do
|
510
|
+
source = "int FunkyVoidAsArg(MY_FUNKY_VOID)"
|
511
|
+
expected = { :var_arg=>nil,
|
512
|
+
:name=>"FunkyVoidAsArg",
|
513
|
+
:return=>{ :type => "int",
|
514
|
+
:name => 'cmock_to_return',
|
515
|
+
:ptr? => false,
|
516
|
+
:const? => false,
|
517
|
+
:const_ptr? => false,
|
518
|
+
:str => "int cmock_to_return",
|
519
|
+
:void? => false
|
520
|
+
},
|
521
|
+
:modifier=>"",
|
522
|
+
:contains_ptr? => false,
|
523
|
+
:args=>[],
|
524
|
+
:args_string=>"void",
|
525
|
+
:args_call=>"" }
|
526
|
+
assert_equal(expected, @parser.parse_declaration(source))
|
527
|
+
end
|
528
|
+
|
529
|
+
it "handle odd case of typedef'd void as arg pointer" do
|
530
|
+
source = "char FunkyVoidPointer(MY_FUNKY_VOID* bluh)"
|
531
|
+
expected = { :var_arg=>nil,
|
532
|
+
:name=>"FunkyVoidPointer",
|
533
|
+
:return=>{ :type => "char",
|
534
|
+
:name => 'cmock_to_return',
|
535
|
+
:ptr? => false,
|
536
|
+
:const? => false,
|
537
|
+
:const_ptr? => false,
|
538
|
+
:str => "char cmock_to_return",
|
539
|
+
:void? => false
|
540
|
+
},
|
541
|
+
:modifier=>"",
|
542
|
+
:contains_ptr? => true,
|
543
|
+
:args=>[{:type=>"MY_FUNKY_VOID*", :name=>"bluh", :ptr? => true, :const? => false, :const_ptr? => false}],
|
544
|
+
:args_string=>"MY_FUNKY_VOID* bluh",
|
545
|
+
:args_call=>"bluh" }
|
546
|
+
assert_equal(expected, @parser.parse_declaration(source))
|
547
|
+
end
|
548
|
+
|
549
|
+
|
550
|
+
it "strip default values from function parameter lists" do
|
551
|
+
source =
|
552
|
+
"void Foo(int a = 57, float b=37.52, char c= 'd', char* e=\"junk\");\n"
|
553
|
+
|
554
|
+
expected =
|
555
|
+
[
|
556
|
+
"void Foo(int a, float b, char c, char* e)"
|
557
|
+
]
|
558
|
+
|
559
|
+
assert_equal(expected, @parser.import_source(source).map!{|s|s.strip})
|
560
|
+
end
|
561
|
+
|
562
|
+
|
563
|
+
it "raise upon empty file" do
|
564
|
+
source = ''
|
565
|
+
|
566
|
+
# ensure it's expected type of exception
|
567
|
+
assert_raises RuntimeError do
|
568
|
+
@parser.parse("module", source)
|
569
|
+
end
|
570
|
+
|
571
|
+
assert_equal([], @parser.funcs)
|
572
|
+
|
573
|
+
# verify exception message
|
574
|
+
begin
|
575
|
+
@parser.parse("module", source)
|
576
|
+
rescue RuntimeError => e
|
577
|
+
assert_equal("ERROR: No function prototypes found!", e.message)
|
578
|
+
end
|
579
|
+
end
|
580
|
+
|
581
|
+
it "clean up module names that contain spaces, dashes, and such" do
|
582
|
+
source = 'void meh(int (*func)(int));'
|
583
|
+
|
584
|
+
retval = @parser.parse("C:\Ugly Module-Name", source)
|
585
|
+
assert (retval[:typedefs][0] =~ /CUglyModuleName/)
|
586
|
+
end
|
587
|
+
|
588
|
+
it "raise upon no function prototypes found in file" do
|
589
|
+
source =
|
590
|
+
"typedef void SILLY_VOID_TYPE1;\n" +
|
591
|
+
"typedef (void) SILLY_VOID_TYPE2 ;\n" +
|
592
|
+
"typedef ( void ) (*FUNCPTR)(void);\n\n" +
|
593
|
+
"#define get_foo() \\\n ((Thing)foo.bar)"
|
594
|
+
|
595
|
+
# ensure it's expected type of exception
|
596
|
+
assert_raises(RuntimeError) do
|
597
|
+
@parser.parse("module", source)
|
598
|
+
end
|
599
|
+
|
600
|
+
assert_equal([], @parser.funcs)
|
601
|
+
|
602
|
+
# verify exception message
|
603
|
+
begin
|
604
|
+
@parser.parse("module", source)
|
605
|
+
rescue RuntimeError => e
|
606
|
+
assert_equal("ERROR: No function prototypes found!", e.message)
|
607
|
+
end
|
608
|
+
end
|
609
|
+
|
610
|
+
|
611
|
+
it "raise upon prototype parsing failure" do
|
612
|
+
source = "void (int, )"
|
613
|
+
|
614
|
+
# ensure it's expected type of exception
|
615
|
+
assert_raises(RuntimeError) do
|
616
|
+
@parser.parse("module", source)
|
617
|
+
end
|
618
|
+
|
619
|
+
# verify exception message
|
620
|
+
begin
|
621
|
+
@parser.parse("module", source)
|
622
|
+
rescue RuntimeError => e
|
623
|
+
assert(e.message.include?("Failed Parsing Declaration Prototype!"))
|
624
|
+
end
|
625
|
+
end
|
626
|
+
|
627
|
+
it "extract and return function declarations with retval and args" do
|
628
|
+
|
629
|
+
source = "int Foo(int a, unsigned int b)"
|
630
|
+
expected = { :var_arg=>nil,
|
631
|
+
:name=>"Foo",
|
632
|
+
:return=>{ :type => "int",
|
633
|
+
:name => 'cmock_to_return',
|
634
|
+
:ptr? => false,
|
635
|
+
:const? => false,
|
636
|
+
:const_ptr? => false,
|
637
|
+
:str => "int cmock_to_return",
|
638
|
+
:void? => false
|
639
|
+
},
|
640
|
+
:modifier=>"",
|
641
|
+
:contains_ptr? => false,
|
642
|
+
:args=>[ {:type=>"int", :name=>"a", :ptr? => false, :const? => false, :const_ptr? => false},
|
643
|
+
{:type=>"unsigned int", :name=>"b", :ptr? => false, :const? => false, :const_ptr? => false}
|
644
|
+
],
|
645
|
+
:args_string=>"int a, unsigned int b",
|
646
|
+
:args_call=>"a, b" }
|
647
|
+
assert_equal(expected, @parser.parse_declaration(source))
|
648
|
+
end
|
649
|
+
|
650
|
+
it "extract and return function declarations with no retval" do
|
651
|
+
|
652
|
+
source = "void FunkyChicken( uint la, int de, bool da)"
|
653
|
+
expected = { :var_arg=>nil,
|
654
|
+
:return=>{ :type => "void",
|
655
|
+
:name => 'cmock_to_return',
|
656
|
+
:ptr? => false,
|
657
|
+
:const? => false,
|
658
|
+
:const_ptr? => false,
|
659
|
+
:str => "void cmock_to_return",
|
660
|
+
:void? => true
|
661
|
+
},
|
662
|
+
:name=>"FunkyChicken",
|
663
|
+
:modifier=>"",
|
664
|
+
:contains_ptr? => false,
|
665
|
+
:args=>[ {:type=>"uint", :name=>"la", :ptr? => false, :const? => false, :const_ptr? => false},
|
666
|
+
{:type=>"int", :name=>"de", :ptr? => false, :const? => false, :const_ptr? => false},
|
667
|
+
{:type=>"bool", :name=>"da", :ptr? => false, :const? => false, :const_ptr? => false}
|
668
|
+
],
|
669
|
+
:args_string=>"uint la, int de, bool da",
|
670
|
+
:args_call=>"la, de, da" }
|
671
|
+
assert_equal(expected, @parser.parse_declaration(source))
|
672
|
+
end
|
673
|
+
|
674
|
+
it "extract and return function declarations with implied voids" do
|
675
|
+
|
676
|
+
source = "void tat()"
|
677
|
+
expected = { :var_arg=>nil,
|
678
|
+
:return=>{ :type => "void",
|
679
|
+
:name => 'cmock_to_return',
|
680
|
+
:ptr? => false,
|
681
|
+
:const? => false,
|
682
|
+
:const_ptr? => false,
|
683
|
+
:str => "void cmock_to_return",
|
684
|
+
:void? => true
|
685
|
+
},
|
686
|
+
:name=>"tat",
|
687
|
+
:modifier=>"",
|
688
|
+
:contains_ptr? => false,
|
689
|
+
:args=>[ ],
|
690
|
+
:args_string=>"void",
|
691
|
+
:args_call=>"" }
|
692
|
+
assert_equal(expected, @parser.parse_declaration(source))
|
693
|
+
end
|
694
|
+
|
695
|
+
it "extract modifiers properly" do
|
696
|
+
|
697
|
+
source = "const int TheMatrix(int Trinity, unsigned int * Neo)"
|
698
|
+
expected = { :var_arg=>nil,
|
699
|
+
:return=>{ :type => "int",
|
700
|
+
:name => 'cmock_to_return',
|
701
|
+
:ptr? => false,
|
702
|
+
:const? => true,
|
703
|
+
:const_ptr? => false,
|
704
|
+
:str => "int cmock_to_return",
|
705
|
+
:void? => false
|
706
|
+
},
|
707
|
+
:name=>"TheMatrix",
|
708
|
+
:modifier=>"const",
|
709
|
+
:contains_ptr? => true,
|
710
|
+
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :const? => false, :const_ptr? => false},
|
711
|
+
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :const? => false, :const_ptr? => false}
|
712
|
+
],
|
713
|
+
:args_string=>"int Trinity, unsigned int* Neo",
|
714
|
+
:args_call=>"Trinity, Neo" }
|
715
|
+
assert_equal(expected, @parser.parse_declaration(source))
|
716
|
+
end
|
717
|
+
|
718
|
+
it "extract c calling conventions properly" do
|
719
|
+
|
720
|
+
source = "const int __stdcall TheMatrix(int Trinity, unsigned int * Neo)"
|
721
|
+
expected = { :var_arg=>nil,
|
722
|
+
:return=>{ :type => "int",
|
723
|
+
:name => 'cmock_to_return',
|
724
|
+
:ptr? => false,
|
725
|
+
:const? => true,
|
726
|
+
:const_ptr? => false,
|
727
|
+
:str => "int cmock_to_return",
|
728
|
+
:void? => false
|
729
|
+
},
|
730
|
+
:name=>"TheMatrix",
|
731
|
+
:modifier=>"const",
|
732
|
+
:c_calling_convention=>"__stdcall",
|
733
|
+
:contains_ptr? => true,
|
734
|
+
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :const? => false, :const_ptr? => false},
|
735
|
+
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :const? => false, :const_ptr? => false}
|
736
|
+
],
|
737
|
+
:args_string=>"int Trinity, unsigned int* Neo",
|
738
|
+
:args_call=>"Trinity, Neo" }
|
739
|
+
assert_equal(expected, @parser.parse_declaration(source))
|
740
|
+
end
|
741
|
+
|
742
|
+
it "fully parse multiple prototypes" do
|
743
|
+
|
744
|
+
source = "const int TheMatrix(int Trinity, unsigned int * Neo);\n" +
|
745
|
+
"int Morpheus(int, unsigned int*);\n"
|
746
|
+
|
747
|
+
expected = [{ :var_arg=>nil,
|
748
|
+
:return=> { :type => "int",
|
749
|
+
:name => 'cmock_to_return',
|
750
|
+
:ptr? => false,
|
751
|
+
:const? => true,
|
752
|
+
:const_ptr? => false,
|
753
|
+
:str => "int cmock_to_return",
|
754
|
+
:void? => false
|
755
|
+
},
|
756
|
+
:name=>"TheMatrix",
|
757
|
+
:modifier=>"const",
|
758
|
+
:contains_ptr? => true,
|
759
|
+
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :const? => false, :const_ptr? => false},
|
760
|
+
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :const? => false, :const_ptr? => false}
|
761
|
+
],
|
762
|
+
:args_string=>"int Trinity, unsigned int* Neo",
|
763
|
+
:args_call=>"Trinity, Neo" },
|
764
|
+
{ :var_arg=>nil,
|
765
|
+
:return=> { :type => "int",
|
766
|
+
:name => 'cmock_to_return',
|
767
|
+
:ptr? => false,
|
768
|
+
:const? => false,
|
769
|
+
:const_ptr? => false,
|
770
|
+
:str => "int cmock_to_return",
|
771
|
+
:void? => false
|
772
|
+
},
|
773
|
+
:name=>"Morpheus",
|
774
|
+
:modifier=>"",
|
775
|
+
:contains_ptr? => true,
|
776
|
+
:args=>[ {:type=>"int", :name=>"cmock_arg1", :ptr? => false, :const? => false, :const_ptr? => false},
|
777
|
+
{:type=>"unsigned int*", :name=>"cmock_arg2", :ptr? => true, :const? => false, :const_ptr? => false}
|
778
|
+
],
|
779
|
+
:args_string=>"int cmock_arg1, unsigned int* cmock_arg2",
|
780
|
+
:args_call=>"cmock_arg1, cmock_arg2"
|
781
|
+
}]
|
782
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
783
|
+
end
|
784
|
+
|
785
|
+
it "not extract for mocking multiply defined prototypes" do
|
786
|
+
|
787
|
+
source = "const int TheMatrix(int Trinity, unsigned int * Neo);\n" +
|
788
|
+
"const int TheMatrix(int, unsigned int*);\n"
|
789
|
+
|
790
|
+
expected = [{ :var_arg=>nil,
|
791
|
+
:name=>"TheMatrix",
|
792
|
+
:return=> { :type => "int",
|
793
|
+
:name => 'cmock_to_return',
|
794
|
+
:ptr? => false,
|
795
|
+
:const? => true,
|
796
|
+
:const_ptr? => false,
|
797
|
+
:str => "int cmock_to_return",
|
798
|
+
:void? => false
|
799
|
+
},
|
800
|
+
:modifier=>"const",
|
801
|
+
:contains_ptr? => true,
|
802
|
+
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :const? => false, :const_ptr? => false},
|
803
|
+
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :const? => false, :const_ptr? => false}
|
804
|
+
],
|
805
|
+
:args_string=>"int Trinity, unsigned int* Neo",
|
806
|
+
:args_call=>"Trinity, Neo"
|
807
|
+
}]
|
808
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
809
|
+
end
|
810
|
+
|
811
|
+
it "should properly handle const before return type" do
|
812
|
+
sources = [
|
813
|
+
"const int * PorkRoast(void);\n",
|
814
|
+
"const int* PorkRoast(void);\n",
|
815
|
+
"const int *PorkRoast(void);\n"
|
816
|
+
]
|
817
|
+
|
818
|
+
expected = [{ :var_arg => nil,
|
819
|
+
:name => "PorkRoast",
|
820
|
+
:return => { :type => "const int*",
|
821
|
+
:name => 'cmock_to_return',
|
822
|
+
:ptr? => true,
|
823
|
+
:const? => true,
|
824
|
+
:const_ptr? => false,
|
825
|
+
:str => "const int* cmock_to_return",
|
826
|
+
:void? => false
|
827
|
+
},
|
828
|
+
:modifier => "",
|
829
|
+
:contains_ptr? => false,
|
830
|
+
:args => [],
|
831
|
+
:args_string => "void",
|
832
|
+
:args_call => ""
|
833
|
+
}]
|
834
|
+
|
835
|
+
sources.each do |source|
|
836
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
837
|
+
end
|
838
|
+
end
|
839
|
+
|
840
|
+
it "should properly handle const before return type" do
|
841
|
+
sources = [
|
842
|
+
"int const * PorkRoast(void);\n",
|
843
|
+
"int const* PorkRoast(void);\n",
|
844
|
+
"int const *PorkRoast(void);\n"
|
845
|
+
]
|
846
|
+
|
847
|
+
expected = [{ :var_arg => nil,
|
848
|
+
:name => "PorkRoast",
|
849
|
+
:return => { :type => "int const*",
|
850
|
+
:name => 'cmock_to_return',
|
851
|
+
:ptr? => true,
|
852
|
+
:const? => true,
|
853
|
+
:const_ptr? => false,
|
854
|
+
:str => "int const* cmock_to_return",
|
855
|
+
:void? => false
|
856
|
+
},
|
857
|
+
:modifier => "",
|
858
|
+
:contains_ptr? => false,
|
859
|
+
:args => [],
|
860
|
+
:args_string => "void",
|
861
|
+
:args_call => ""
|
862
|
+
}]
|
863
|
+
|
864
|
+
sources.each do |source|
|
865
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
866
|
+
end
|
867
|
+
end
|
868
|
+
|
869
|
+
it "should properly handle const applied after asterisk in return type (not legal C, but sometimes used)" do
|
870
|
+
|
871
|
+
source = "int * const PorkRoast(void);\n"
|
872
|
+
|
873
|
+
expected = [{ :var_arg=>nil,
|
874
|
+
:name=>"PorkRoast",
|
875
|
+
:return=> { :type => "int*",
|
876
|
+
:name => 'cmock_to_return',
|
877
|
+
:ptr? => true,
|
878
|
+
:const? => false,
|
879
|
+
:const_ptr? => true,
|
880
|
+
:str => "int* cmock_to_return",
|
881
|
+
:void? => false
|
882
|
+
},
|
883
|
+
:modifier=>"const",
|
884
|
+
:contains_ptr? => false,
|
885
|
+
:args=>[],
|
886
|
+
:args_string=>"void",
|
887
|
+
:args_call=>""
|
888
|
+
}]
|
889
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
890
|
+
end
|
891
|
+
|
892
|
+
it "properly parse const and pointer argument types with no arg names" do
|
893
|
+
|
894
|
+
source = "void foo(int const*, int*const, const int*, const int*const, int const*const, int*, int, const int);\n"
|
895
|
+
|
896
|
+
expected = [{ :name => "foo",
|
897
|
+
:modifier => "",
|
898
|
+
:return => { :type => "void",
|
899
|
+
:name => "cmock_to_return",
|
900
|
+
:str => "void cmock_to_return",
|
901
|
+
:void? => true,
|
902
|
+
:ptr? => false,
|
903
|
+
:const? => false,
|
904
|
+
:const_ptr? => false
|
905
|
+
},
|
906
|
+
:var_arg => nil,
|
907
|
+
:args_string => "int const* cmock_arg1, int* const cmock_arg2, const int* cmock_arg3, const int* const cmock_arg4, " +
|
908
|
+
"int const* const cmock_arg5, int* cmock_arg6, int cmock_arg7, const int cmock_arg8",
|
909
|
+
:args => [{ :type=>"int const*", :name => "cmock_arg1", :ptr? => true, :const? => true, :const_ptr? => false },
|
910
|
+
{ :type=>"int*", :name => "cmock_arg2", :ptr? => true, :const? => false, :const_ptr? => true },
|
911
|
+
{ :type=>"const int*", :name => "cmock_arg3", :ptr? => true, :const? => true, :const_ptr? => false },
|
912
|
+
{ :type=>"const int*", :name => "cmock_arg4", :ptr? => true, :const? => true, :const_ptr? => true },
|
913
|
+
{ :type=>"int const*", :name => "cmock_arg5", :ptr? => true, :const? => true, :const_ptr? => true },
|
914
|
+
{ :type=>"int*", :name => "cmock_arg6", :ptr? => true, :const? => false, :const_ptr? => false },
|
915
|
+
{ :type=>"int", :name => "cmock_arg7", :ptr? => false, :const? => false, :const_ptr? => false },
|
916
|
+
{ :type=>"int", :name => "cmock_arg8", :ptr? => false, :const? => true, :const_ptr? => false }],
|
917
|
+
:args_call => "cmock_arg1, cmock_arg2, cmock_arg3, cmock_arg4, cmock_arg5, cmock_arg6, cmock_arg7, cmock_arg8",
|
918
|
+
:contains_ptr? => true
|
919
|
+
}]
|
920
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
921
|
+
end
|
922
|
+
|
923
|
+
it "properly parse const and pointer argument types with arg names" do
|
924
|
+
|
925
|
+
source = "void bar(int const* param1, int*const param2, const int* param3, const int*const param4,\n" +
|
926
|
+
" int const*const param5, int*param6, int param7, const int param8);\n"
|
927
|
+
|
928
|
+
expected = [{ :name => "bar",
|
929
|
+
:modifier => "",
|
930
|
+
:return => { :type => "void",
|
931
|
+
:name => "cmock_to_return",
|
932
|
+
:str => "void cmock_to_return",
|
933
|
+
:void? => true,
|
934
|
+
:ptr? => false,
|
935
|
+
:const? => false,
|
936
|
+
:const_ptr? => false
|
937
|
+
},
|
938
|
+
:var_arg => nil,
|
939
|
+
:args_string => "int const* param1, int* const param2, const int* param3, const int* const param4, " +
|
940
|
+
"int const* const param5, int* param6, int param7, const int param8",
|
941
|
+
:args => [{ :type=>"int const*", :name => "param1", :ptr? => true, :const? => true, :const_ptr? => false },
|
942
|
+
{ :type=>"int*", :name => "param2", :ptr? => true, :const? => false, :const_ptr? => true },
|
943
|
+
{ :type=>"const int*", :name => "param3", :ptr? => true, :const? => true, :const_ptr? => false },
|
944
|
+
{ :type=>"const int*", :name => "param4", :ptr? => true, :const? => true, :const_ptr? => true },
|
945
|
+
{ :type=>"int const*", :name => "param5", :ptr? => true, :const? => true, :const_ptr? => true },
|
946
|
+
{ :type=>"int*", :name => "param6", :ptr? => true, :const? => false, :const_ptr? => false },
|
947
|
+
{ :type=>"int", :name => "param7", :ptr? => false, :const? => false, :const_ptr? => false },
|
948
|
+
{ :type=>"int", :name => "param8", :ptr? => false, :const? => true, :const_ptr? => false }],
|
949
|
+
:args_call => "param1, param2, param3, param4, param5, param6, param7, param8",
|
950
|
+
:contains_ptr? => true
|
951
|
+
}]
|
952
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
953
|
+
end
|
954
|
+
|
955
|
+
it "converts typedef'd array arguments to pointers" do
|
956
|
+
|
957
|
+
source = "Book AddToBook(Book book, const IntArray values);\n"
|
958
|
+
|
959
|
+
expected = [{ :name => "AddToBook",
|
960
|
+
:modifier=>"",
|
961
|
+
:return => { :type => "Book",
|
962
|
+
:name => "cmock_to_return",
|
963
|
+
:str => "Book cmock_to_return",
|
964
|
+
:void? => false,
|
965
|
+
:ptr? => false,
|
966
|
+
:const? => false,
|
967
|
+
:const_ptr? => false
|
968
|
+
},
|
969
|
+
:var_arg => nil,
|
970
|
+
:args => [{ :type => "Page*", :name => "book", :ptr? => true, :const? => false, :const_ptr? => false },
|
971
|
+
{ :type => "const int*", :name => "values", :ptr? => true, :const? => true, :const_ptr? => false }],
|
972
|
+
:args_string => "Book book, const IntArray values",
|
973
|
+
:args_call => "book, values",
|
974
|
+
:contains_ptr? => true
|
975
|
+
}]
|
976
|
+
|
977
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
978
|
+
|
979
|
+
end
|
980
|
+
|
981
|
+
it "properly detect typedef'd variants of void and use those" do
|
982
|
+
|
983
|
+
source = "typedef (void) FUNKY_VOID_T;\n" +
|
984
|
+
"typedef void CHUNKY_VOID_T;\n" +
|
985
|
+
"FUNKY_VOID_T DrHorrible(int SingAlong);\n" +
|
986
|
+
"int CaptainHammer(CHUNKY_VOID_T);\n"
|
987
|
+
|
988
|
+
expected = [{ :var_arg=>nil,
|
989
|
+
:name=>"DrHorrible",
|
990
|
+
:return => { :type => "void",
|
991
|
+
:name => 'cmock_to_return',
|
992
|
+
:ptr? => false,
|
993
|
+
:const? => false,
|
994
|
+
:const_ptr? => false,
|
995
|
+
:str => "void cmock_to_return",
|
996
|
+
:void? => true
|
997
|
+
},
|
998
|
+
:modifier=>"",
|
999
|
+
:contains_ptr? => false,
|
1000
|
+
:args=>[ {:type=>"int", :name=>"SingAlong", :ptr? => false, :const? => false, :const_ptr? => false} ],
|
1001
|
+
:args_string=>"int SingAlong",
|
1002
|
+
:args_call=>"SingAlong"
|
1003
|
+
},
|
1004
|
+
{ :var_arg=>nil,
|
1005
|
+
:return=> { :type => "int",
|
1006
|
+
:name => 'cmock_to_return',
|
1007
|
+
:ptr? => false,
|
1008
|
+
:const? => false,
|
1009
|
+
:const_ptr? => false,
|
1010
|
+
:str => "int cmock_to_return",
|
1011
|
+
:void? => false
|
1012
|
+
},
|
1013
|
+
:name=>"CaptainHammer",
|
1014
|
+
:modifier=>"",
|
1015
|
+
:contains_ptr? => false,
|
1016
|
+
:args=>[ ],
|
1017
|
+
:args_string=>"void",
|
1018
|
+
:args_call=>""
|
1019
|
+
}]
|
1020
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
it "be ok with structs inside of function declarations" do
|
1024
|
+
|
1025
|
+
source = "int DrHorrible(struct SingAlong Blog);\n" +
|
1026
|
+
"void Penny(struct const _KeepYourHeadUp_ * const BillyBuddy);\n" +
|
1027
|
+
"struct TheseArentTheHammer CaptainHammer(void);\n"
|
1028
|
+
|
1029
|
+
expected = [{ :var_arg=>nil,
|
1030
|
+
:return =>{ :type => "int",
|
1031
|
+
:name => 'cmock_to_return',
|
1032
|
+
:ptr? => false,
|
1033
|
+
:const? => false,
|
1034
|
+
:const_ptr? => false,
|
1035
|
+
:str => "int cmock_to_return",
|
1036
|
+
:void? => false
|
1037
|
+
},
|
1038
|
+
:name=>"DrHorrible",
|
1039
|
+
:modifier=>"",
|
1040
|
+
:contains_ptr? => false,
|
1041
|
+
:args=>[ {:type=>"struct SingAlong", :name=>"Blog", :ptr? => false, :const? => false, :const_ptr? => false} ],
|
1042
|
+
:args_string=>"struct SingAlong Blog",
|
1043
|
+
:args_call=>"Blog"
|
1044
|
+
},
|
1045
|
+
{ :var_arg=>nil,
|
1046
|
+
:return=> { :type => "void",
|
1047
|
+
:name => 'cmock_to_return',
|
1048
|
+
:ptr? => false,
|
1049
|
+
:const? => false,
|
1050
|
+
:const_ptr? => false,
|
1051
|
+
:str => "void cmock_to_return",
|
1052
|
+
:void? => true
|
1053
|
+
},
|
1054
|
+
:name=>"Penny",
|
1055
|
+
:modifier=>"",
|
1056
|
+
:contains_ptr? => true,
|
1057
|
+
:args=>[ {:type=>"struct const _KeepYourHeadUp_*", :name=>"BillyBuddy", :ptr? => true, :const? => true, :const_ptr? => true} ],
|
1058
|
+
:args_string=>"struct const _KeepYourHeadUp_* const BillyBuddy",
|
1059
|
+
:args_call=>"BillyBuddy"
|
1060
|
+
},
|
1061
|
+
{ :var_arg=>nil,
|
1062
|
+
:return=> { :type => "struct TheseArentTheHammer",
|
1063
|
+
:name => 'cmock_to_return',
|
1064
|
+
:ptr? => false,
|
1065
|
+
:const? => false,
|
1066
|
+
:const_ptr? => false,
|
1067
|
+
:str => "struct TheseArentTheHammer cmock_to_return",
|
1068
|
+
:void? => false
|
1069
|
+
},
|
1070
|
+
:name=>"CaptainHammer",
|
1071
|
+
:modifier=>"",
|
1072
|
+
:contains_ptr? => false,
|
1073
|
+
:args=>[ ],
|
1074
|
+
:args_string=>"void",
|
1075
|
+
:args_call=>""
|
1076
|
+
}]
|
1077
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
it "extract functions containing unions with union specifier" do
|
1081
|
+
source = "void OrangePeel(union STARS_AND_STRIPES * a, union AFL_CIO b)"
|
1082
|
+
expected = [{ :var_arg=>nil,
|
1083
|
+
:return=>{ :type => "void",
|
1084
|
+
:name => 'cmock_to_return',
|
1085
|
+
:ptr? => false,
|
1086
|
+
:const? => false,
|
1087
|
+
:const_ptr? => false,
|
1088
|
+
:str => "void cmock_to_return",
|
1089
|
+
:void? => true
|
1090
|
+
},
|
1091
|
+
:name=>"OrangePeel",
|
1092
|
+
:modifier=>"",
|
1093
|
+
:contains_ptr? => true,
|
1094
|
+
:args=>[ {:type=>"union STARS_AND_STRIPES*", :name=>"a", :ptr? => true, :const? => false, :const_ptr? => false},
|
1095
|
+
{:type=>"union AFL_CIO", :name=>"b", :ptr? => false, :const? => false, :const_ptr? => false}
|
1096
|
+
],
|
1097
|
+
:args_string=>"union STARS_AND_STRIPES* a, union AFL_CIO b",
|
1098
|
+
:args_call=>"a, b" }]
|
1099
|
+
result = @parser.parse("module", source)
|
1100
|
+
assert_equal(expected, result[:functions])
|
1101
|
+
end
|
1102
|
+
|
1103
|
+
it "not be thwarted by variables named with primitive types as part of the name" do
|
1104
|
+
source = "void ApplePeel(const unsigned int const_param, int int_param, int integer, char character, int* const constant)"
|
1105
|
+
expected = [{ :var_arg=>nil,
|
1106
|
+
:return=>{ :type => "void",
|
1107
|
+
:name => 'cmock_to_return',
|
1108
|
+
:ptr? => false,
|
1109
|
+
:const? => false,
|
1110
|
+
:const_ptr? => false,
|
1111
|
+
:str => "void cmock_to_return",
|
1112
|
+
:void? => true
|
1113
|
+
},
|
1114
|
+
:name=>"ApplePeel",
|
1115
|
+
:modifier=>"",
|
1116
|
+
:contains_ptr? => true,
|
1117
|
+
:args=>[ {:type=> "unsigned int", :name=>"const_param", :ptr? => false, :const? => true, :const_ptr? => false},
|
1118
|
+
{:type=>"int", :name=>"int_param", :ptr? => false, :const? => false, :const_ptr? => false},
|
1119
|
+
{:type=>"int", :name=>"integer", :ptr? => false, :const? => false, :const_ptr? => false},
|
1120
|
+
{:type=>"char", :name=>"character", :ptr? => false, :const? => false, :const_ptr? => false},
|
1121
|
+
{:type=>"int*", :name=>"constant", :ptr? => true, :const? => false, :const_ptr? => true}
|
1122
|
+
],
|
1123
|
+
:args_string=>"const unsigned int const_param, int int_param, int integer, char character, int* const constant",
|
1124
|
+
:args_call=>"const_param, int_param, integer, character, constant" }]
|
1125
|
+
result = @parser.parse("module", source)
|
1126
|
+
assert_equal(expected, result[:functions])
|
1127
|
+
end
|
1128
|
+
|
1129
|
+
it "not be thwarted by custom types named similarly to primitive types" do
|
1130
|
+
source = "void LemonPeel(integer param, character thing, longint * junk, constant value, int32_t const number)"
|
1131
|
+
expected = [{:var_arg=>nil,
|
1132
|
+
:return=>{ :type => "void",
|
1133
|
+
:name => 'cmock_to_return',
|
1134
|
+
:ptr? => false,
|
1135
|
+
:const? => false,
|
1136
|
+
:const_ptr? => false,
|
1137
|
+
:str => "void cmock_to_return",
|
1138
|
+
:void? => true
|
1139
|
+
},
|
1140
|
+
:name=>"LemonPeel",
|
1141
|
+
:modifier=>"",
|
1142
|
+
:contains_ptr? => true,
|
1143
|
+
:args=>[ {:type=>"integer", :name=>"param", :ptr? => false, :const? => false, :const_ptr? => false},
|
1144
|
+
{:type=>"character", :name=>"thing", :ptr? => false, :const? => false, :const_ptr? => false},
|
1145
|
+
{:type=>"longint*", :name=>"junk", :ptr? => true, :const? => false, :const_ptr? => false},
|
1146
|
+
{:type=>"constant", :name=>"value", :ptr? => false, :const? => false, :const_ptr? => false},
|
1147
|
+
{:type=>"int32_t", :name=>"number", :ptr? => false, :const? => true, :const_ptr? => false}
|
1148
|
+
],
|
1149
|
+
:args_string=>"integer param, character thing, longint* junk, constant value, int32_t const number",
|
1150
|
+
:args_call=>"param, thing, junk, value, number" }]
|
1151
|
+
result = @parser.parse("module", source)
|
1152
|
+
assert_equal(expected, result[:functions])
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
it "handle some of those chains of C name specifiers naturally" do
|
1156
|
+
source = "void CoinOperated(signed char abc, const unsigned long int xyz_123, unsigned int const abc_123, long long arm_of_the_law)"
|
1157
|
+
expected = [{:var_arg=>nil,
|
1158
|
+
:return=>{ :type => "void",
|
1159
|
+
:name => 'cmock_to_return',
|
1160
|
+
:ptr? => false,
|
1161
|
+
:const? => false,
|
1162
|
+
:const_ptr? => false,
|
1163
|
+
:str => "void cmock_to_return",
|
1164
|
+
:void? => true
|
1165
|
+
},
|
1166
|
+
:name=>"CoinOperated",
|
1167
|
+
:modifier=>"",
|
1168
|
+
:contains_ptr? => false,
|
1169
|
+
:args=>[ {:type=>"signed char", :name=>"abc", :ptr? => false, :const? => false, :const_ptr? => false},
|
1170
|
+
{:type=>"unsigned long int", :name=>"xyz_123", :ptr? => false, :const? => true, :const_ptr? => false},
|
1171
|
+
{:type=>"unsigned int", :name=>"abc_123", :ptr? => false, :const? => true, :const_ptr? => false},
|
1172
|
+
{:type=>"long long", :name=>"arm_of_the_law", :ptr? => false, :const? => false, :const_ptr? => false}
|
1173
|
+
],
|
1174
|
+
:args_string=>"signed char abc, const unsigned long int xyz_123, unsigned int const abc_123, long long arm_of_the_law",
|
1175
|
+
:args_call=>"abc, xyz_123, abc_123, arm_of_the_law" }]
|
1176
|
+
result = @parser.parse("module", source)
|
1177
|
+
assert_equal(expected, result[:functions])
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
it "handle custom types of various formats" do
|
1181
|
+
source = "void CardOperated(CUSTOM_TYPE abc, CUSTOM_TYPE* xyz_123, CUSTOM_TYPE const abcxyz, struct CUSTOM_TYPE const * const abc123)"
|
1182
|
+
expected = [{:var_arg=>nil,
|
1183
|
+
:return=>{ :type => "void",
|
1184
|
+
:name => 'cmock_to_return',
|
1185
|
+
:ptr? => false,
|
1186
|
+
:const? => false,
|
1187
|
+
:const_ptr? => false,
|
1188
|
+
:str => "void cmock_to_return",
|
1189
|
+
:void? => true
|
1190
|
+
},
|
1191
|
+
:name=>"CardOperated",
|
1192
|
+
:modifier=>"",
|
1193
|
+
:contains_ptr? => true,
|
1194
|
+
:args=>[ {:type=>"CUSTOM_TYPE", :name=>"abc", :ptr? => false, :const? => false, :const_ptr? => false},
|
1195
|
+
{:type=>"CUSTOM_TYPE*", :name=>"xyz_123", :ptr? => true, :const? => false, :const_ptr? => false},
|
1196
|
+
{:type=>"CUSTOM_TYPE", :name=>"abcxyz", :ptr? => false, :const? => true, :const_ptr? => false},
|
1197
|
+
{:type=>"struct CUSTOM_TYPE const*", :name=>"abc123", :ptr? => true, :const? => true, :const_ptr? => true}
|
1198
|
+
],
|
1199
|
+
:args_string=>"CUSTOM_TYPE abc, CUSTOM_TYPE* xyz_123, CUSTOM_TYPE const abcxyz, struct CUSTOM_TYPE const* const abc123",
|
1200
|
+
:args_call=>"abc, xyz_123, abcxyz, abc123" }]
|
1201
|
+
result = @parser.parse("module", source)
|
1202
|
+
assert_equal(expected, result[:functions])
|
1203
|
+
end
|
1204
|
+
|
1205
|
+
it "handle arrays and treat them as pointers or strings" do
|
1206
|
+
source = "void KeyOperated(CUSTOM_TYPE thing1[], int thing2 [ ], char thing3 [][2 ][ 3], int* thing4[4])"
|
1207
|
+
expected = [{:var_arg=>nil,
|
1208
|
+
:return=>{ :type => "void",
|
1209
|
+
:name => 'cmock_to_return',
|
1210
|
+
:ptr? => false,
|
1211
|
+
:const? => false,
|
1212
|
+
:const_ptr? => false,
|
1213
|
+
:str => "void cmock_to_return",
|
1214
|
+
:void? => true
|
1215
|
+
},
|
1216
|
+
:name=>"KeyOperated",
|
1217
|
+
:modifier=>"",
|
1218
|
+
:contains_ptr? => true,
|
1219
|
+
:args=>[ {:type=>"CUSTOM_TYPE*", :name=>"thing1", :ptr? => true, :const? => false, :const_ptr? => false},
|
1220
|
+
{:type=>"int*", :name=>"thing2", :ptr? => true, :const? => false, :const_ptr? => false},
|
1221
|
+
{:type=>"char*", :name=>"thing3", :ptr? => false, :const? => false, :const_ptr? => false}, #THIS one will likely change in the future when we improve multidimensional array support
|
1222
|
+
{:type=>"int**", :name=>"thing4", :ptr? => true, :const? => false, :const_ptr? => false} #THIS one will likely change in the future when we improve multidimensional array support
|
1223
|
+
],
|
1224
|
+
:args_string=>"CUSTOM_TYPE* thing1, int* thing2, char* thing3, int** thing4",
|
1225
|
+
:args_call=>"thing1, thing2, thing3, thing4" }]
|
1226
|
+
result = @parser.parse("module", source)
|
1227
|
+
assert_equal(expected, result[:functions])
|
1228
|
+
end
|
1229
|
+
|
1230
|
+
it "give a reasonable guess when dealing with weird combinations of custom types and modifiers" do
|
1231
|
+
source = "void Cheese(unsigned CUSTOM_TYPE abc, unsigned xyz, CUSTOM_TYPE1 CUSTOM_TYPE2 pdq)"
|
1232
|
+
expected = [{:var_arg=>nil,
|
1233
|
+
:return=>{ :type => "void",
|
1234
|
+
:name => 'cmock_to_return',
|
1235
|
+
:ptr? => false,
|
1236
|
+
:const? => false,
|
1237
|
+
:const_ptr? => false,
|
1238
|
+
:str => "void cmock_to_return",
|
1239
|
+
:void? => true
|
1240
|
+
},
|
1241
|
+
:name=>"Cheese",
|
1242
|
+
:modifier=>"",
|
1243
|
+
:contains_ptr? => false,
|
1244
|
+
:args=>[ {:type=>"unsigned CUSTOM_TYPE", :name=>"abc", :ptr? => false, :const? => false, :const_ptr? => false},
|
1245
|
+
{:type=>"unsigned", :name=>"xyz", :ptr? => false, :const? => false, :const_ptr? => false},
|
1246
|
+
{:type=>"CUSTOM_TYPE1 CUSTOM_TYPE2", :name=>"pdq", :ptr? => false, :const? => false, :const_ptr? => false}
|
1247
|
+
],
|
1248
|
+
:args_string=>"unsigned CUSTOM_TYPE abc, unsigned xyz, CUSTOM_TYPE1 CUSTOM_TYPE2 pdq",
|
1249
|
+
:args_call=>"abc, xyz, pdq" }]
|
1250
|
+
result = @parser.parse("module", source)
|
1251
|
+
assert_equal(expected, result[:functions])
|
1252
|
+
end
|
1253
|
+
|
1254
|
+
it "extract functions containing a function pointer" do
|
1255
|
+
source = "void FunkyTurkey(unsigned int (*func_ptr)(int, char))"
|
1256
|
+
expected = [{ :var_arg=>nil,
|
1257
|
+
:return=>{ :type => "void",
|
1258
|
+
:name => 'cmock_to_return',
|
1259
|
+
:ptr? => false,
|
1260
|
+
:const? => false,
|
1261
|
+
:const_ptr? => false,
|
1262
|
+
:str => "void cmock_to_return",
|
1263
|
+
:void? => true
|
1264
|
+
},
|
1265
|
+
:name=>"FunkyTurkey",
|
1266
|
+
:modifier=>"",
|
1267
|
+
:contains_ptr? => false,
|
1268
|
+
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => false, :const_ptr? => false}
|
1269
|
+
],
|
1270
|
+
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
1271
|
+
:args_call=>"func_ptr" }]
|
1272
|
+
typedefs = ["typedef unsigned int(*cmock_module_func_ptr1)(int, char);"]
|
1273
|
+
result = @parser.parse("module", source)
|
1274
|
+
assert_equal(expected, result[:functions])
|
1275
|
+
assert_equal(typedefs, result[:typedefs])
|
1276
|
+
end
|
1277
|
+
|
1278
|
+
it "extract functions containing a function pointer with a void" do
|
1279
|
+
source = "void FunkyTurkey(void (*func_ptr)(void))"
|
1280
|
+
expected = [{ :var_arg=>nil,
|
1281
|
+
:return=>{ :type => "void",
|
1282
|
+
:name => 'cmock_to_return',
|
1283
|
+
:ptr? => false,
|
1284
|
+
:const? => false,
|
1285
|
+
:const_ptr? => false,
|
1286
|
+
:str => "void cmock_to_return",
|
1287
|
+
:void? => true
|
1288
|
+
},
|
1289
|
+
:name=>"FunkyTurkey",
|
1290
|
+
:modifier=>"",
|
1291
|
+
:contains_ptr? => false,
|
1292
|
+
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => false, :const_ptr? => false}
|
1293
|
+
],
|
1294
|
+
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
1295
|
+
:args_call=>"func_ptr" }]
|
1296
|
+
typedefs = ["typedef void(*cmock_module_func_ptr1)(void);"]
|
1297
|
+
result = @parser.parse("module", source)
|
1298
|
+
assert_equal(expected, result[:functions])
|
1299
|
+
assert_equal(typedefs, result[:typedefs])
|
1300
|
+
end
|
1301
|
+
|
1302
|
+
it "extract functions containing a function pointer with an implied void" do
|
1303
|
+
source = "void FunkyTurkey(unsigned int (*func_ptr)())"
|
1304
|
+
expected = [{ :var_arg=>nil,
|
1305
|
+
:return=>{ :type => "void",
|
1306
|
+
:name => 'cmock_to_return',
|
1307
|
+
:ptr? => false,
|
1308
|
+
:const? => false,
|
1309
|
+
:const_ptr? => false,
|
1310
|
+
:str => "void cmock_to_return",
|
1311
|
+
:void? => true
|
1312
|
+
},
|
1313
|
+
:name=>"FunkyTurkey",
|
1314
|
+
:modifier=>"",
|
1315
|
+
:contains_ptr? => false,
|
1316
|
+
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => false, :const_ptr? => false}
|
1317
|
+
],
|
1318
|
+
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
1319
|
+
:args_call=>"func_ptr" }]
|
1320
|
+
typedefs = ["typedef unsigned int(*cmock_module_func_ptr1)();"]
|
1321
|
+
result = @parser.parse("module", source)
|
1322
|
+
assert_equal(expected, result[:functions])
|
1323
|
+
assert_equal(typedefs, result[:typedefs])
|
1324
|
+
end
|
1325
|
+
|
1326
|
+
it "extract functions containing a constant function pointer and a pointer in the nested arg list" do
|
1327
|
+
source = "void FunkyChicken(unsigned int (* const func_ptr)(unsigned long int * , char))"
|
1328
|
+
expected = [{ :var_arg=>nil,
|
1329
|
+
:return=>{ :type => "void",
|
1330
|
+
:name => 'cmock_to_return',
|
1331
|
+
:ptr? => false,
|
1332
|
+
:const? => false,
|
1333
|
+
:const_ptr? => false,
|
1334
|
+
:str => "void cmock_to_return",
|
1335
|
+
:void? => true
|
1336
|
+
},
|
1337
|
+
:name=>"FunkyChicken",
|
1338
|
+
:modifier=>"",
|
1339
|
+
:contains_ptr? => false,
|
1340
|
+
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => true, :const_ptr? => false}
|
1341
|
+
],
|
1342
|
+
:args_string=>"cmock_module_func_ptr1 const func_ptr",
|
1343
|
+
:args_call=>"func_ptr" }]
|
1344
|
+
typedefs = ["typedef unsigned int(*cmock_module_func_ptr1)(unsigned long int* , char);"]
|
1345
|
+
result = @parser.parse("module", source)
|
1346
|
+
assert_equal(expected, result[:functions])
|
1347
|
+
assert_equal(typedefs, result[:typedefs])
|
1348
|
+
end
|
1349
|
+
|
1350
|
+
# it "extract functions containing a function pointer taking a vararg" do
|
1351
|
+
# source = "void FunkyParrot(unsigned int (*func_ptr)(int, char, ...))"
|
1352
|
+
# expected = [{ :var_arg=>nil,
|
1353
|
+
# :return=>{ :type => "void",
|
1354
|
+
# :name => 'cmock_to_return',
|
1355
|
+
# :ptr? => false,
|
1356
|
+
# :const? => false,
|
1357
|
+
# :const_ptr? => false,
|
1358
|
+
# :str => "void cmock_to_return",
|
1359
|
+
# :void? => true
|
1360
|
+
# },
|
1361
|
+
# :name=>"FunkyParrot",
|
1362
|
+
# :modifier=>"",
|
1363
|
+
# :contains_ptr? => false,
|
1364
|
+
# :args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => false, :const_ptr? => false}
|
1365
|
+
# ],
|
1366
|
+
# :args_string=>"cmock_module_func_ptr1 func_ptr",
|
1367
|
+
# :args_call=>"func_ptr" }]
|
1368
|
+
# typedefs = ["typedef unsigned int(*cmock_module_func_ptr1)(int, char, ...);"]
|
1369
|
+
# result = @parser.parse("module", source)
|
1370
|
+
# assert_equal(expected, result[:functions])
|
1371
|
+
# assert_equal(typedefs, result[:typedefs])
|
1372
|
+
# end
|
1373
|
+
|
1374
|
+
it "extract functions containing a function pointer with extra parenthesis and two sets" do
|
1375
|
+
source = "void FunkyBudgie(int (((* func_ptr1)(int, char))), void (*func_ptr2)(void))"
|
1376
|
+
expected = [{ :var_arg=>nil,
|
1377
|
+
:return=>{ :type => "void",
|
1378
|
+
:name => 'cmock_to_return',
|
1379
|
+
:ptr? => false,
|
1380
|
+
:const? => false,
|
1381
|
+
:const_ptr? => false,
|
1382
|
+
:str => "void cmock_to_return",
|
1383
|
+
:void? => true
|
1384
|
+
},
|
1385
|
+
:name=>"FunkyBudgie",
|
1386
|
+
:modifier=>"",
|
1387
|
+
:contains_ptr? => false,
|
1388
|
+
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr1", :ptr? => false, :const? => false, :const_ptr? => false},
|
1389
|
+
{:type=>"cmock_module_func_ptr2", :name=>"func_ptr2", :ptr? => false, :const? => false, :const_ptr? => false}
|
1390
|
+
],
|
1391
|
+
:args_string=>"cmock_module_func_ptr1 func_ptr1, cmock_module_func_ptr2 func_ptr2",
|
1392
|
+
:args_call=>"func_ptr1, func_ptr2" }]
|
1393
|
+
typedefs = ["typedef int(*cmock_module_func_ptr1)(int, char);", "typedef void(*cmock_module_func_ptr2)(void);"]
|
1394
|
+
result = @parser.parse("module", source)
|
1395
|
+
assert_equal(expected, result[:functions])
|
1396
|
+
assert_equal(typedefs, result[:typedefs])
|
1397
|
+
end
|
1398
|
+
|
1399
|
+
it "extract functions containing a function pointers, structs and other things" do
|
1400
|
+
source = "struct mytype *FunkyRobin(uint16_t num1, uint16_t num2, void (*func_ptr1)(uint16_t num3, struct mytype2 *s));"
|
1401
|
+
expected = [{ :var_arg=>nil,
|
1402
|
+
:return=>{ :type => "struct mytype*",
|
1403
|
+
:name => 'cmock_to_return',
|
1404
|
+
:ptr? => true,
|
1405
|
+
:const? => false,
|
1406
|
+
:const_ptr? => false,
|
1407
|
+
:str => "struct mytype* cmock_to_return",
|
1408
|
+
:void? => false
|
1409
|
+
},
|
1410
|
+
:name=>"FunkyRobin",
|
1411
|
+
:modifier=>"",
|
1412
|
+
:contains_ptr? => false,
|
1413
|
+
:args=>[ {:type=>"uint16_t", :name=>"num1", :ptr? => false, :const? => false, :const_ptr? => false},
|
1414
|
+
{:type=>"uint16_t", :name=>"num2", :ptr? => false, :const? => false, :const_ptr? => false},
|
1415
|
+
{:type=>"cmock_module_func_ptr1", :name=>"func_ptr1", :ptr? => false, :const? => false, :const_ptr? => false}
|
1416
|
+
],
|
1417
|
+
:args_string=>"uint16_t num1, uint16_t num2, cmock_module_func_ptr1 func_ptr1",
|
1418
|
+
:args_call=>"num1, num2, func_ptr1" }]
|
1419
|
+
typedefs = ["typedef void(*cmock_module_func_ptr1)(uint16_t num3, struct mytype2* s);"]
|
1420
|
+
result = @parser.parse("module", source)
|
1421
|
+
assert_equal(expected, result[:functions])
|
1422
|
+
assert_equal(typedefs, result[:typedefs])
|
1423
|
+
end
|
1424
|
+
|
1425
|
+
it "extract functions containing an anonymous function pointer" do
|
1426
|
+
source = "void FunkyFowl(unsigned int (* const)(int, char))"
|
1427
|
+
expected = [{ :var_arg=>nil,
|
1428
|
+
:return=>{ :type => "void",
|
1429
|
+
:name => 'cmock_to_return',
|
1430
|
+
:ptr? => false,
|
1431
|
+
:const? => false,
|
1432
|
+
:const_ptr? => false,
|
1433
|
+
:str => "void cmock_to_return",
|
1434
|
+
:void? => true
|
1435
|
+
},
|
1436
|
+
:name=>"FunkyFowl",
|
1437
|
+
:modifier=>"",
|
1438
|
+
:contains_ptr? => false,
|
1439
|
+
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"cmock_arg1", :ptr? => false, :const? => true, :const_ptr? => false}
|
1440
|
+
],
|
1441
|
+
:args_string=>"cmock_module_func_ptr1 const cmock_arg1",
|
1442
|
+
:args_call=>"cmock_arg1" }]
|
1443
|
+
typedefs = ["typedef unsigned int(*cmock_module_func_ptr1)(int, char);"]
|
1444
|
+
result = @parser.parse("module", source)
|
1445
|
+
assert_equal(expected, result[:functions])
|
1446
|
+
assert_equal(typedefs, result[:typedefs])
|
1447
|
+
end
|
1448
|
+
|
1449
|
+
it "extract functions returning a function pointer" do
|
1450
|
+
source = "unsigned short (*FunkyPidgeon( const char op_code ))( int, long int )"
|
1451
|
+
expected = [{ :var_arg=>nil,
|
1452
|
+
:return=>{ :type => "cmock_module_func_ptr1",
|
1453
|
+
:name => 'cmock_to_return',
|
1454
|
+
:ptr? => false,
|
1455
|
+
:const? => false,
|
1456
|
+
:const_ptr? => false,
|
1457
|
+
:str => "cmock_module_func_ptr1 cmock_to_return",
|
1458
|
+
:void? => false
|
1459
|
+
},
|
1460
|
+
:name=>"FunkyPidgeon",
|
1461
|
+
:modifier=>"",
|
1462
|
+
:contains_ptr? => false,
|
1463
|
+
:args=>[ {:type=>"char", :name=>"op_code", :ptr? => false, :const? => true, :const_ptr? => false}
|
1464
|
+
],
|
1465
|
+
:args_string=>"const char op_code",
|
1466
|
+
:args_call=>"op_code" }]
|
1467
|
+
typedefs = ["typedef unsigned short(*cmock_module_func_ptr1)( int, long int );"]
|
1468
|
+
result = @parser.parse("module", source)
|
1469
|
+
assert_equal(expected, result[:functions])
|
1470
|
+
assert_equal(typedefs, result[:typedefs])
|
1471
|
+
end
|
1472
|
+
|
1473
|
+
it "extract functions returning a function pointer with implied void" do
|
1474
|
+
source = "unsigned short (*FunkyTweetie())()"
|
1475
|
+
expected = [{ :var_arg=>nil,
|
1476
|
+
:return=>{ :type => "cmock_module_func_ptr1",
|
1477
|
+
:name => 'cmock_to_return',
|
1478
|
+
:ptr? => false,
|
1479
|
+
:const? => false,
|
1480
|
+
:const_ptr? => false,
|
1481
|
+
:str => "cmock_module_func_ptr1 cmock_to_return",
|
1482
|
+
:void? => false
|
1483
|
+
},
|
1484
|
+
:name=>"FunkyTweetie",
|
1485
|
+
:modifier=>"",
|
1486
|
+
:contains_ptr? => false,
|
1487
|
+
:args=>[],
|
1488
|
+
:args_string=>"void",
|
1489
|
+
:args_call=>"" }]
|
1490
|
+
typedefs = ["typedef unsigned short(*cmock_module_func_ptr1)();"]
|
1491
|
+
result = @parser.parse("module", source)
|
1492
|
+
assert_equal(expected, result[:functions])
|
1493
|
+
assert_equal(typedefs, result[:typedefs])
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
it "extract functions returning a function pointer where everything is a void" do
|
1497
|
+
source = "void (* FunkySeaGull(void))(void)"
|
1498
|
+
expected = [{ :var_arg=>nil,
|
1499
|
+
:return=>{ :type => "cmock_module_func_ptr1",
|
1500
|
+
:name => 'cmock_to_return',
|
1501
|
+
:ptr? => false,
|
1502
|
+
:const? => false,
|
1503
|
+
:const_ptr? => false,
|
1504
|
+
:str => "cmock_module_func_ptr1 cmock_to_return",
|
1505
|
+
:void? => false
|
1506
|
+
},
|
1507
|
+
:name=>"FunkySeaGull",
|
1508
|
+
:modifier=>"",
|
1509
|
+
:contains_ptr? => false,
|
1510
|
+
:args=>[],
|
1511
|
+
:args_string=>"void",
|
1512
|
+
:args_call=>"" }]
|
1513
|
+
typedefs = ["typedef void(*cmock_module_func_ptr1)(void);"]
|
1514
|
+
result = @parser.parse("module", source)
|
1515
|
+
assert_equal(expected, result[:functions])
|
1516
|
+
assert_equal(typedefs, result[:typedefs])
|
1517
|
+
end
|
1518
|
+
|
1519
|
+
it "extract functions returning a function pointer with some pointer nonsense" do
|
1520
|
+
source = "unsigned int * (* FunkyMacaw(double* foo, THING *bar))(unsigned int)"
|
1521
|
+
expected = [{ :var_arg=>nil,
|
1522
|
+
:return=>{ :type => "cmock_module_func_ptr1",
|
1523
|
+
:name => 'cmock_to_return',
|
1524
|
+
:ptr? => false,
|
1525
|
+
:const? => false,
|
1526
|
+
:const_ptr? => false,
|
1527
|
+
:str => "cmock_module_func_ptr1 cmock_to_return",
|
1528
|
+
:void? => false
|
1529
|
+
},
|
1530
|
+
:name=>"FunkyMacaw",
|
1531
|
+
:modifier=>"",
|
1532
|
+
:contains_ptr? => true,
|
1533
|
+
:args=>[ {:type=>"double*", :name=>"foo", :ptr? => true, :const? => false, :const_ptr? => false},
|
1534
|
+
{:type=>"THING*", :name=>"bar", :ptr? => true, :const? => false, :const_ptr? => false}
|
1535
|
+
],
|
1536
|
+
:args_string=>"double* foo, THING* bar",
|
1537
|
+
:args_call=>"foo, bar" }]
|
1538
|
+
typedefs = ["typedef unsigned int *(*cmock_module_func_ptr1)(unsigned int);"]
|
1539
|
+
result = @parser.parse("module", source)
|
1540
|
+
assert_equal(expected, result[:functions])
|
1541
|
+
assert_equal(typedefs, result[:typedefs])
|
1542
|
+
end
|
1543
|
+
|
1544
|
+
it "extract this SQLite3 function with an anonymous function pointer arg (regression test)" do
|
1545
|
+
source = "SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*))"
|
1546
|
+
expected = [{ :var_arg=>nil,
|
1547
|
+
:return=>{ :type => "int",
|
1548
|
+
:name => "cmock_to_return",
|
1549
|
+
:ptr? => false,
|
1550
|
+
:const? => false,
|
1551
|
+
:const_ptr? => false,
|
1552
|
+
:str => "int cmock_to_return",
|
1553
|
+
:void? => false
|
1554
|
+
},
|
1555
|
+
:name=>"sqlite3_bind_text",
|
1556
|
+
:modifier=>"SQLITE_API",
|
1557
|
+
:contains_ptr? => true,
|
1558
|
+
:args=>[ {:type=>"sqlite3_stmt*", :name=>"cmock_arg2", :ptr? => true, :const? => false, :const_ptr? => false},
|
1559
|
+
{:type=>"int", :name=>"cmock_arg3", :ptr? => false, :const? => false, :const_ptr? => false},
|
1560
|
+
{:type=>"const char*", :name=>"cmock_arg4", :ptr? => false, :const? => true, :const_ptr? => false},
|
1561
|
+
{:type=>"int", :name=>"n", :ptr? => false, :const? => false, :const_ptr? => false},
|
1562
|
+
{:type=>"cmock_module_func_ptr1", :name=>"cmock_arg1", :ptr? => false, :const? => false, :const_ptr? => false}
|
1563
|
+
],
|
1564
|
+
:args_string=>"sqlite3_stmt* cmock_arg2, int cmock_arg3, const char* cmock_arg4, int n, cmock_module_func_ptr1 cmock_arg1",
|
1565
|
+
:args_call=>"cmock_arg2, cmock_arg3, cmock_arg4, n, cmock_arg1" }]
|
1566
|
+
typedefs = ["typedef void(*cmock_module_func_ptr1)(void*);"]
|
1567
|
+
result = @parser.parse("module", source)
|
1568
|
+
assert_equal(expected, result[:functions])
|
1569
|
+
assert_equal(typedefs, result[:typedefs])
|
1570
|
+
end
|
1571
|
+
|
1572
|
+
it "extract functions with varargs" do
|
1573
|
+
source = "int XFiles(int Scully, int Mulder, ...);\n"
|
1574
|
+
expected = [{ :var_arg=>"...",
|
1575
|
+
:return=> { :type => "int",
|
1576
|
+
:name => 'cmock_to_return',
|
1577
|
+
:ptr? => false,
|
1578
|
+
:const? => false,
|
1579
|
+
:const_ptr? => false,
|
1580
|
+
:str => "int cmock_to_return",
|
1581
|
+
:void? => false
|
1582
|
+
},
|
1583
|
+
:name=>"XFiles",
|
1584
|
+
:modifier=>"",
|
1585
|
+
:contains_ptr? => false,
|
1586
|
+
:args=>[ {:type=>"int", :name=>"Scully", :ptr? => false, :const? => false, :const_ptr? => false},
|
1587
|
+
{:type=>"int", :name=>"Mulder", :ptr? => false, :const? => false, :const_ptr? => false}
|
1588
|
+
],
|
1589
|
+
:args_string=>"int Scully, int Mulder",
|
1590
|
+
:args_call=>"Scully, Mulder"
|
1591
|
+
}]
|
1592
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
1593
|
+
end
|
1594
|
+
|
1595
|
+
it "extract functions with void pointers" do
|
1596
|
+
source = "void* MoreSillySongs(void* stuff);\n"
|
1597
|
+
expected = [{ :var_arg=>nil,
|
1598
|
+
:return=> { :type => "void*",
|
1599
|
+
:name => 'cmock_to_return',
|
1600
|
+
:ptr? => true,
|
1601
|
+
:const? => false,
|
1602
|
+
:const_ptr? => false,
|
1603
|
+
:str => "void* cmock_to_return",
|
1604
|
+
:void? => false
|
1605
|
+
},
|
1606
|
+
:name=>"MoreSillySongs",
|
1607
|
+
:modifier=>"",
|
1608
|
+
:contains_ptr? => true,
|
1609
|
+
:args=>[ {:type=>"void*", :name=>"stuff", :ptr? => true, :const? => false, :const_ptr? => false}
|
1610
|
+
],
|
1611
|
+
:args_string=>"void* stuff",
|
1612
|
+
:args_call=>"stuff"
|
1613
|
+
}]
|
1614
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
1615
|
+
end
|
1616
|
+
|
1617
|
+
it "extract functions with strippable confusing junk like gcc attributes" do
|
1618
|
+
source = "int LaverneAndShirley(int Lenny, int Squiggy) __attribute__((weak)) __attribute__ ((deprecated));\n"
|
1619
|
+
expected = [{ :var_arg=>nil,
|
1620
|
+
:return=> { :type => "int",
|
1621
|
+
:name => 'cmock_to_return',
|
1622
|
+
:ptr? => false,
|
1623
|
+
:const? => false,
|
1624
|
+
:const_ptr? => false,
|
1625
|
+
:str => "int cmock_to_return",
|
1626
|
+
:void? => false
|
1627
|
+
},
|
1628
|
+
:name=>"LaverneAndShirley",
|
1629
|
+
:modifier=>"",
|
1630
|
+
:contains_ptr? => false,
|
1631
|
+
:args=>[ {:type=>"int", :name=>"Lenny", :ptr? => false, :const? => false, :const_ptr? => false},
|
1632
|
+
{:type=>"int", :name=>"Squiggy", :ptr? => false, :const? => false, :const_ptr? => false}
|
1633
|
+
],
|
1634
|
+
:args_string=>"int Lenny, int Squiggy",
|
1635
|
+
:args_call=>"Lenny, Squiggy"
|
1636
|
+
}]
|
1637
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
1638
|
+
end
|
1639
|
+
|
1640
|
+
it "extract functions with strippable confusing junk like gcc attributes with parenthesis" do
|
1641
|
+
source = "int TheCosbyShow(int Cliff, int Claire) __attribute__((weak, alias (\"__f\"));\n"
|
1642
|
+
expected = [{ :var_arg=>nil,
|
1643
|
+
:return=> { :type => "int",
|
1644
|
+
:name => 'cmock_to_return',
|
1645
|
+
:ptr? => false,
|
1646
|
+
:const? => false,
|
1647
|
+
:const_ptr? => false,
|
1648
|
+
:str => "int cmock_to_return",
|
1649
|
+
:void? => false
|
1650
|
+
},
|
1651
|
+
:name=>"TheCosbyShow",
|
1652
|
+
:modifier=>"",
|
1653
|
+
:contains_ptr? => false,
|
1654
|
+
:args=>[ {:type=>"int", :name=>"Cliff", :ptr? => false, :const? => false, :const_ptr? => false},
|
1655
|
+
{:type=>"int", :name=>"Claire", :ptr? => false, :const? => false, :const_ptr? => false}
|
1656
|
+
],
|
1657
|
+
:args_string=>"int Cliff, int Claire",
|
1658
|
+
:args_call=>"Cliff, Claire"
|
1659
|
+
}]
|
1660
|
+
assert_equal(expected, @parser.parse("module", source)[:functions])
|
1661
|
+
end
|
1662
|
+
|
1663
|
+
it "divines all permutations of ptr, const, and const_ptr correctly" do
|
1664
|
+
truth_table = [
|
1665
|
+
# argument ptr const const_ptr
|
1666
|
+
[ "constNOTconst constNOTconst", false, false, false ],
|
1667
|
+
[ "const constNOTconst constNOTconst", false, true, false ],
|
1668
|
+
[ "constNOTconst const constNOTconst", false, true, false ],
|
1669
|
+
[ "constNOTconst *constNOTconst", true, false, false ],
|
1670
|
+
[ "const constNOTconst *constNOTconst", true, true, false ],
|
1671
|
+
[ "constNOTconst const *constNOTconst", true, true, false ],
|
1672
|
+
[ "constNOTconst *const constNOTconst", true, false, true ],
|
1673
|
+
[ "const constNOTconst *const constNOTconst", true, true, true ],
|
1674
|
+
[ "constNOTconst const *const constNOTconst", true, true, true ],
|
1675
|
+
[ "constNOTconst **constNOTconst", true, false, false ],
|
1676
|
+
[ "const constNOTconst **constNOTconst", true, false, false ],
|
1677
|
+
[ "constNOTconst const **constNOTconst", true, false, false ],
|
1678
|
+
[ "constNOTconst *const *constNOTconst", true, true, false ],
|
1679
|
+
[ "const constNOTconst *const *constNOTconst", true, true, false ],
|
1680
|
+
[ "constNOTconst const *const *constNOTconst", true, true, false ],
|
1681
|
+
[ "constNOTconst **const constNOTconst", true, false, true ],
|
1682
|
+
[ "const constNOTconst **const constNOTconst", true, false, true ],
|
1683
|
+
[ "constNOTconst const **const constNOTconst", true, false, true ],
|
1684
|
+
[ "constNOTconst *const *const constNOTconst", true, true, true ],
|
1685
|
+
[ "const constNOTconst *const *const constNOTconst", true, true, true ],
|
1686
|
+
[ "constNOTconst const *const *const constNOTconst", true, true, true ]
|
1687
|
+
]
|
1688
|
+
|
1689
|
+
truth_table.each do |entry|
|
1690
|
+
assert_equal(@parser.divine_ptr(entry[0]), entry[1])
|
1691
|
+
assert_equal(@parser.divine_const(entry[0]), entry[2])
|
1692
|
+
assert_equal(@parser.divine_ptr_and_const(entry[0]),
|
1693
|
+
{ ptr?: entry[1], const?: entry[2], const_ptr?: entry[3] })
|
1694
|
+
end
|
1695
|
+
end
|
1696
|
+
|
1697
|
+
it "divines ptr correctly for string types" do
|
1698
|
+
truth_table = [
|
1699
|
+
# argument ptr
|
1700
|
+
[ "char s", false ],
|
1701
|
+
[ "const char s", false ],
|
1702
|
+
[ "char const s", false ],
|
1703
|
+
[ "char *s", false ],
|
1704
|
+
[ "const char *s", false ],
|
1705
|
+
[ "char const *s", false ],
|
1706
|
+
[ "char *const s", false ],
|
1707
|
+
[ "const char *const s", false ],
|
1708
|
+
[ "char const *const s", false ],
|
1709
|
+
[ "char **s", true ],
|
1710
|
+
[ "const char **s", true ],
|
1711
|
+
[ "char const **s", true ],
|
1712
|
+
[ "char *const *s", true ],
|
1713
|
+
[ "const char *const *s", true ],
|
1714
|
+
[ "char const *const *s", true ],
|
1715
|
+
[ "char **const s", true ],
|
1716
|
+
[ "const char **const s", true ],
|
1717
|
+
[ "char const **const s", true ],
|
1718
|
+
[ "char *const *const s", true ],
|
1719
|
+
[ "const char *const *const s", true ],
|
1720
|
+
[ "char const *const *const s", true ]
|
1721
|
+
]
|
1722
|
+
|
1723
|
+
truth_table.each do |entry|
|
1724
|
+
assert_equal(@parser.divine_ptr(entry[0]), entry[1])
|
1725
|
+
end
|
1726
|
+
end
|
1727
|
+
|
1728
|
+
end
|