ceedling 0.12.2 → 0.13.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -14
- data/.gitmodules +9 -0
- data/.rspec +1 -0
- data/Gemfile +10 -2
- data/README.md +97 -67
- data/{new_project_template → assets}/project.yml +0 -0
- data/{new_project_template → assets}/rakefile.rb +0 -0
- data/bin/ceedling +77 -44
- data/ceedling.gemspec +18 -5
- data/config/test_environment.rb +12 -0
- data/docs/CeedlingLogo.png +0 -0
- data/docs/CeedlingPacket.md +1934 -0
- data/docs/CeedlingPacket.odt +0 -0
- data/docs/CeedlingPacket.pdf +0 -0
- data/examples/temp_sensor/project.yml +71 -74
- data/examples/temp_sensor/rakefile.rb +3 -5
- data/examples/temp_sensor/src/AdcConductor.h +2 -0
- data/examples/temp_sensor/src/TemperatureCalculator.h +2 -0
- data/examples/temp_sensor/src/Types.h +0 -13
- data/examples/temp_sensor/src/UsartBaudRateRegisterCalculator.h +2 -0
- data/examples/temp_sensor/src/UsartHardware.c +0 -12
- data/examples/temp_sensor/src/UsartHardware.h +0 -1
- data/examples/temp_sensor/test/{test_AdcConductor.c → TestAdcConductor.c} +0 -0
- data/examples/temp_sensor/test/{test_AdcHardware.c → TestAdcHardware.c} +0 -0
- data/examples/temp_sensor/test/{test_AdcModel.c → TestAdcModel.c} +0 -0
- data/examples/temp_sensor/test/{test_Executor.c → TestExecutor.c} +0 -0
- data/examples/temp_sensor/test/{test_Main.c → TestMain.c} +0 -0
- data/examples/temp_sensor/test/{test_Model.c → TestModel.c} +0 -0
- data/examples/temp_sensor/test/{test_TaskScheduler.c → TestTaskScheduler.c} +0 -0
- data/examples/temp_sensor/test/{test_TemperatureCalculator.c → TestTemperatureCalculator.c} +0 -0
- data/examples/temp_sensor/test/{test_TemperatureFilter.c → TestTemperatureFilter.c} +0 -2
- data/examples/temp_sensor/test/{test_TimerConductor.c → TestTimerConductor.c} +0 -0
- data/examples/temp_sensor/test/{test_TimerHardware.c → TestTimerHardware.c} +0 -0
- data/examples/temp_sensor/test/{test_TimerModel.c → TestTimerModel.c} +0 -0
- data/examples/temp_sensor/test/{test_UsartBaudRateRegisterCalculator.c → TestUsartBaudRateRegisterCalculator.c} +0 -0
- data/examples/temp_sensor/test/{test_UsartConductor.c → TestUsartConductor.c} +0 -0
- data/examples/temp_sensor/test/{test_UsartHardware.c → TestUsartHardware.c} +0 -20
- data/examples/temp_sensor/test/{test_UsartModel.c → TestUsartModel.c} +0 -0
- data/examples/temp_sensor/test/support/UnityHelper.c +7 -5
- data/examples/temp_sensor/test/support/UnityHelper.h +5 -5
- data/{new_project_template/vendor/ceedling/lib → lib}/build_invoker_utils.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/cacheinator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/cacheinator_helper.rb +0 -0
- data/lib/ceedling.rb +16 -4
- data/lib/ceedling/version.rb +4 -4
- data/lib/ceedling/version.rb.erb +1 -1
- data/{new_project_template/vendor/ceedling/lib → lib}/cmock_builder.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/configurator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/configurator_builder.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/configurator_plugins.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/configurator_setup.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/configurator_validator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/constants.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/defaults.rb +2 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/dependinator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/erb_wrapper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/file_finder.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/file_finder_helper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/file_path_utils.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/file_system_utils.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/file_system_wrapper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/file_wrapper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/flaginator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/generator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/generator_helper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/generator_test_results.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/generator_test_results_sanity_checker.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/generator_test_runner.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/loginator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/makefile.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/objects.yml +0 -2
- data/lib/par_map.rb +19 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/plugin.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/plugin_builder.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/plugin_manager.rb +20 -8
- data/{new_project_template/vendor/ceedling/lib → lib}/plugin_manager_helper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/plugin_reportinator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/plugin_reportinator_helper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/preprocessinator.rb +0 -0
- data/lib/preprocessinator_extractor.rb +30 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/preprocessinator_file_handler.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/preprocessinator_helper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/preprocessinator_includes_handler.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/project_config_manager.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/project_file_loader.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/rake_utils.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/rake_wrapper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/rakefile.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/release_invoker.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/release_invoker_helper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/reportinator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/rules_cmock.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/rules_preprocess.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/rules_release.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/rules_release_deep_dependencies.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/rules_tests.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/rules_tests_deep_dependencies.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/setupinator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/stream_wrapper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/streaminator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/streaminator_helper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/system_utils.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/system_wrapper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/task_invoker.rb +7 -3
- data/{new_project_template/vendor/ceedling/lib → lib}/tasks_base.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/tasks_filesystem.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/tasks_release.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/tasks_release_deep_dependencies.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/tasks_tests.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/tasks_tests_deep_dependencies.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/tasks_vendor.rake +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/test_includes_extractor.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/test_invoker.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/test_invoker_helper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/tool_executor.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/tool_executor_helper.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/verbosinator.rb +0 -0
- data/{new_project_template/vendor/ceedling/lib → lib}/yaml_wrapper.rb +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/bullseye/bullseye.rake +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/bullseye/bullseye.rb +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/bullseye/defaults.yml +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/bullseye/readme.txt +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/bullseye/template.erb +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/gcov/defaults.yml +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/gcov/gcov.rake +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/gcov/gcov.rb +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/gcov/readme.txt +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/gcov/template.erb +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/module_generator/config/module_generator.yml +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/module_generator/lib/module_generator.rb +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/module_generator/module_generator.rake +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/stdout_ide_tests_report/config/stdout_ide_tests_report.yml +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/stdout_ide_tests_report/lib/stdout_ide_tests_report.rb +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/stdout_pretty_tests_report/assets/template.erb +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/stdout_pretty_tests_report/config/stdout_pretty_tests_report.yml +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/stdout_pretty_tests_report/lib/stdout_pretty_tests_report.rb +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/warnings_report/warnings_report.rb +0 -0
- data/{new_project_template/vendor/ceedling/plugins → plugins}/xml_tests_report/xml_tests_report.rb +0 -0
- data/rakefile.rb +14 -0
- data/release/build.info +2 -0
- data/{new_project_template/vendor/ceedling/release → release}/version.info +0 -0
- data/spec/configurator_builder_spec.rb +7 -0
- data/spec/configurator_helper_spec.rb +5 -0
- data/spec/configurator_spec.rb +10 -0
- data/spec/par_map_spec.rb +57 -0
- data/spec/preprocessinator_extractor_spec.rb +46 -0
- data/spec/spec_helper.rb +46 -0
- data/spec/uncatagorized_specs_spec.rb +8 -0
- data/test_graveyard/integration/paths.yml +17 -0
- data/test_graveyard/integration/paths_test.rb +80 -0
- data/test_graveyard/integration/rake_rules_aux_dependencies_test.rb +75 -0
- data/test_graveyard/integration/rake_rules_cmock_test.rb +74 -0
- data/test_graveyard/integration/rake_rules_preprocess_test.rb +178 -0
- data/test_graveyard/integration/rake_rules_test.rb +268 -0
- data/test_graveyard/integration/rake_tasks_test.rb +103 -0
- data/test_graveyard/integration_test_helper.rb +34 -0
- data/test_graveyard/rakefile_rules.rb +10 -0
- data/test_graveyard/rakefile_rules_aux_dependencies.rb +10 -0
- data/test_graveyard/rakefile_rules_cmock.rb +10 -0
- data/test_graveyard/rakefile_rules_preprocess.rb +10 -0
- data/test_graveyard/rakefile_tasks.rb +10 -0
- data/test_graveyard/system/file_system_dependencies.yml +20 -0
- data/test_graveyard/system/file_system_kitchen_sink.yml +20 -0
- data/test_graveyard/system/file_system_mocks.yml +20 -0
- data/test_graveyard/system/file_system_preprocess.yml +20 -0
- data/test_graveyard/system/file_system_simple.yml +20 -0
- data/test_graveyard/system/file_system_test.rb +78 -0
- data/test_graveyard/system/mocks/include/a_file.h +2 -0
- data/test_graveyard/system/mocks/include/other_stuff.h +2 -0
- data/test_graveyard/system/mocks/include/stuff.h +3 -0
- data/test_graveyard/system/mocks/source/a_file.c +9 -0
- data/test_graveyard/system/mocks/test/test_a_file.c +41 -0
- data/test_graveyard/system/mocks/test/test_no_file.c +14 -0
- data/test_graveyard/system/project_mocks.yml +43 -0
- data/test_graveyard/system/project_mocks_test.rb +38 -0
- data/test_graveyard/system/project_simple.yml +36 -0
- data/test_graveyard/system/project_simple_test.rb +39 -0
- data/test_graveyard/system/rule_mocks_test.rb +44 -0
- data/test_graveyard/system/rule_runners_test.rb +44 -0
- data/test_graveyard/system/simple/include/other_stuff.h +2 -0
- data/test_graveyard/system/simple/include/stuff.h +3 -0
- data/test_graveyard/system/simple/source/other_stuff.c +6 -0
- data/test_graveyard/system/simple/source/stuff.c +7 -0
- data/test_graveyard/system/simple/test/test_other_stuff.c +30 -0
- data/test_graveyard/system/simple/test/test_stuff.c +51 -0
- data/test_graveyard/system_test_helper.rb +73 -0
- data/test_graveyard/test_helper.rb +93 -0
- data/test_graveyard/unit/busted/configurator_builder_test.rb +571 -0
- data/test_graveyard/unit/busted/configurator_helper_test.rb +234 -0
- data/test_graveyard/unit/busted/configurator_test.rb +232 -0
- data/test_graveyard/unit/busted/configurator_validator_test.rb +169 -0
- data/test_graveyard/unit/busted/deep_merge_fix_test.rb +55 -0
- data/test_graveyard/unit/busted/dependinator_test.rb +129 -0
- data/test_graveyard/unit/busted/file_finder_helper_test.rb +45 -0
- data/test_graveyard/unit/busted/file_finder_test.rb +114 -0
- data/test_graveyard/unit/busted/file_path_utils_test.rb +97 -0
- data/test_graveyard/unit/busted/file_system_utils_test.rb +21 -0
- data/test_graveyard/unit/busted/generator_test.rb +187 -0
- data/test_graveyard/unit/busted/generator_test_results_test.rb +129 -0
- data/test_graveyard/unit/busted/generator_test_runner_test.rb +478 -0
- data/test_graveyard/unit/busted/preprocessinator_file_handler_test.rb +38 -0
- data/test_graveyard/unit/busted/preprocessinator_helper_test.rb +156 -0
- data/test_graveyard/unit/busted/preprocessinator_includes_handler_test.rb +93 -0
- data/test_graveyard/unit/busted/preprocessinator_test.rb +57 -0
- data/test_graveyard/unit/busted/project_file_loader_test.rb +142 -0
- data/test_graveyard/unit/busted/setupinator_test.rb +45 -0
- data/test_graveyard/unit/busted/streaminator_test.rb +49 -0
- data/test_graveyard/unit/busted/task_invoker_test.rb +69 -0
- data/test_graveyard/unit/busted/test_includes_extractor_test.rb +111 -0
- data/test_graveyard/unit/busted/test_invoker_helper_test.rb +62 -0
- data/test_graveyard/unit/busted/test_invoker_test.rb +47 -0
- data/test_graveyard/unit/busted/tool_executor_helper_test.rb +100 -0
- data/test_graveyard/unit/busted/tool_executor_test.rb +351 -0
- data/test_graveyard/unit/busted/verbosinator_test.rb +65 -0
- data/test_graveyard/unit/preprocessinator_extractor_test.rb +731 -0
- data/test_graveyard/unit_test_helper.rb +16 -0
- data/vendor/behaviors/Manifest.txt +9 -0
- data/vendor/behaviors/Rakefile +19 -0
- data/vendor/behaviors/lib/behaviors.rb +76 -0
- data/vendor/behaviors/lib/behaviors/reporttask.rb +158 -0
- data/vendor/behaviors/test/behaviors_tasks_test.rb +73 -0
- data/vendor/behaviors/test/behaviors_test.rb +50 -0
- data/vendor/behaviors/test/tasks_test/Rakefile +19 -0
- data/vendor/behaviors/test/tasks_test/lib/user.rb +2 -0
- data/vendor/behaviors/test/tasks_test/test/user_test.rb +17 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/c_exception/lib/CException.c +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/c_exception/lib/CException.h +1 -1
- data/vendor/c_exception/release/build.info +2 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/c_exception/release/version.info +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/config/production_environment.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/config/test_environment.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_config.rb +3 -3
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_file_writer.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_generator.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_generator_plugin_array.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_generator_plugin_callback.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_generator_plugin_cexception.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_generator_plugin_expect.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_generator_plugin_ignore.rb +14 -4
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_generator_utils.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_header_parser.rb +9 -5
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_plugin_manager.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/lib/cmock_unityhelper_parser.rb +75 -74
- data/vendor/cmock/release/build.info +2 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/release/version.info +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/src/cmock.c +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/cmock/src/cmock.h +0 -0
- data/vendor/constructor/History.rdoc +19 -0
- data/vendor/constructor/README.rdoc +72 -0
- data/vendor/constructor/Rakefile +33 -0
- data/vendor/constructor/homepage/Notes.txt +27 -0
- data/vendor/constructor/homepage/Rakefile +15 -0
- data/vendor/constructor/homepage/index.erb +27 -0
- data/vendor/constructor/homepage/index.html +36 -0
- data/vendor/constructor/homepage/page_header.graffle +0 -0
- data/vendor/constructor/homepage/page_header.html +9 -0
- data/vendor/constructor/homepage/page_header.png +0 -0
- data/vendor/constructor/homepage/sample_code.png +0 -0
- data/vendor/constructor/homepage/sample_code.rb +12 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/constructor/lib/constructor.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/constructor/lib/constructor_struct.rb +0 -0
- data/vendor/constructor/specs/constructor_spec.rb +407 -0
- data/vendor/constructor/specs/constructor_struct_spec.rb +84 -0
- data/vendor/deep_merge/MIT-LICENSE +20 -0
- data/vendor/deep_merge/README +94 -0
- data/vendor/deep_merge/Rakefile +28 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/deep_merge/lib/deep_merge.rb +0 -0
- data/vendor/deep_merge/pkg/deep_merge-0.1.0.gem +0 -0
- data/vendor/deep_merge/test/test_deep_merge.rb +553 -0
- data/vendor/diy/History.txt +28 -0
- data/vendor/diy/README.rdoc +233 -0
- data/vendor/diy/Rakefile +33 -0
- data/vendor/diy/TODO.txt +9 -0
- data/vendor/diy/diy.gemspec +131 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/diy/lib/diy.rb +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/diy/lib/diy/factory.rb +0 -0
- data/vendor/diy/sample_code/car.rb +7 -0
- data/vendor/diy/sample_code/chassis.rb +5 -0
- data/vendor/diy/sample_code/diy_example.rb +26 -0
- data/vendor/diy/sample_code/engine.rb +5 -0
- data/vendor/diy/sample_code/objects.yml +10 -0
- data/vendor/diy/test/constructor.rb +119 -0
- data/vendor/diy/test/diy_test.rb +608 -0
- data/vendor/diy/test/factory_test.rb +79 -0
- data/vendor/diy/test/files/broken_construction.yml +7 -0
- data/vendor/diy/test/files/cat/cat.rb +3 -0
- data/vendor/diy/test/files/cat/extra_conflict.yml +5 -0
- data/vendor/diy/test/files/cat/heritage.rb +2 -0
- data/vendor/diy/test/files/cat/needs_input.yml +3 -0
- data/vendor/diy/test/files/cat/the_cat_lineage.rb +1 -0
- data/vendor/diy/test/files/dog/dog_model.rb +3 -0
- data/vendor/diy/test/files/dog/dog_presenter.rb +3 -0
- data/vendor/diy/test/files/dog/dog_view.rb +2 -0
- data/vendor/diy/test/files/dog/file_resolver.rb +2 -0
- data/vendor/diy/test/files/dog/other_thing.rb +2 -0
- data/vendor/diy/test/files/dog/simple.yml +11 -0
- data/vendor/diy/test/files/donkey/foo.rb +8 -0
- data/vendor/diy/test/files/donkey/foo/bar/qux.rb +7 -0
- data/vendor/diy/test/files/factory/beef.rb +5 -0
- data/vendor/diy/test/files/factory/dog.rb +6 -0
- data/vendor/diy/test/files/factory/factory.yml +19 -0
- data/vendor/diy/test/files/factory/farm/llama.rb +7 -0
- data/vendor/diy/test/files/factory/farm/pork.rb +7 -0
- data/vendor/diy/test/files/factory/kitten.rb +13 -0
- data/vendor/diy/test/files/fud/objects.yml +13 -0
- data/vendor/diy/test/files/fud/toy.rb +14 -0
- data/vendor/diy/test/files/functions/attached_things_builder.rb +2 -0
- data/vendor/diy/test/files/functions/invalid_method.yml +5 -0
- data/vendor/diy/test/files/functions/method_extractor.rb +3 -0
- data/vendor/diy/test/files/functions/nonsingleton_objects.yml +6 -0
- data/vendor/diy/test/files/functions/objects.yml +22 -0
- data/vendor/diy/test/files/functions/thing.rb +3 -0
- data/vendor/diy/test/files/functions/thing_builder.rb +25 -0
- data/vendor/diy/test/files/functions/things_builder.rb +3 -0
- data/vendor/diy/test/files/gnu/objects.yml +14 -0
- data/vendor/diy/test/files/gnu/thinger.rb +7 -0
- data/vendor/diy/test/files/goat/base.rb +8 -0
- data/vendor/diy/test/files/goat/can.rb +6 -0
- data/vendor/diy/test/files/goat/goat.rb +6 -0
- data/vendor/diy/test/files/goat/objects.yml +12 -0
- data/vendor/diy/test/files/goat/paper.rb +6 -0
- data/vendor/diy/test/files/goat/plane.rb +7 -0
- data/vendor/diy/test/files/goat/shirt.rb +6 -0
- data/vendor/diy/test/files/goat/wings.rb +8 -0
- data/vendor/diy/test/files/horse/holder_thing.rb +3 -0
- data/vendor/diy/test/files/horse/objects.yml +7 -0
- data/vendor/diy/test/files/namespace/animal/bird.rb +5 -0
- data/vendor/diy/test/files/namespace/animal/cat.rb +5 -0
- data/vendor/diy/test/files/namespace/animal/reptile/hardshell/turtle.rb +8 -0
- data/vendor/diy/test/files/namespace/animal/reptile/lizard.rb +7 -0
- data/vendor/diy/test/files/namespace/bad_module_specified.yml +8 -0
- data/vendor/diy/test/files/namespace/class_name_combine.yml +8 -0
- data/vendor/diy/test/files/namespace/hello.txt +1 -0
- data/vendor/diy/test/files/namespace/no_module_specified.yml +8 -0
- data/vendor/diy/test/files/namespace/objects.yml +21 -0
- data/vendor/diy/test/files/namespace/road.rb +2 -0
- data/vendor/diy/test/files/namespace/sky.rb +2 -0
- data/vendor/diy/test/files/namespace/subcontext.yml +22 -0
- data/vendor/diy/test/files/non_singleton/air.rb +2 -0
- data/vendor/diy/test/files/non_singleton/fat_cat.rb +3 -0
- data/vendor/diy/test/files/non_singleton/objects.yml +19 -0
- data/vendor/diy/test/files/non_singleton/pig.rb +3 -0
- data/vendor/diy/test/files/non_singleton/thread_spinner.rb +3 -0
- data/vendor/diy/test/files/non_singleton/tick.rb +3 -0
- data/vendor/diy/test/files/non_singleton/yard.rb +2 -0
- data/vendor/diy/test/files/yak/core_model.rb +3 -0
- data/vendor/diy/test/files/yak/core_presenter.rb +3 -0
- data/vendor/diy/test/files/yak/core_view.rb +1 -0
- data/vendor/diy/test/files/yak/data_source.rb +1 -0
- data/vendor/diy/test/files/yak/fringe_model.rb +3 -0
- data/vendor/diy/test/files/yak/fringe_presenter.rb +3 -0
- data/vendor/diy/test/files/yak/fringe_view.rb +1 -0
- data/vendor/diy/test/files/yak/giant_squid.rb +3 -0
- data/vendor/diy/test/files/yak/krill.rb +2 -0
- data/vendor/diy/test/files/yak/my_objects.yml +21 -0
- data/vendor/diy/test/files/yak/sub_sub_context_test.yml +27 -0
- data/vendor/diy/test/test_helper.rb +55 -0
- data/vendor/hardmock/CHANGES +78 -0
- data/vendor/hardmock/LICENSE +7 -0
- data/vendor/hardmock/README +70 -0
- data/vendor/hardmock/Rakefile +8 -0
- data/vendor/hardmock/config/environment.rb +12 -0
- data/vendor/hardmock/lib/assert_error.rb +23 -0
- data/vendor/hardmock/lib/extend_test_unit.rb +14 -0
- data/vendor/hardmock/lib/hardmock.rb +86 -0
- data/vendor/hardmock/lib/hardmock/errors.rb +22 -0
- data/vendor/hardmock/lib/hardmock/expectation.rb +229 -0
- data/vendor/hardmock/lib/hardmock/expectation_builder.rb +9 -0
- data/vendor/hardmock/lib/hardmock/expector.rb +26 -0
- data/vendor/hardmock/lib/hardmock/method_cleanout.rb +33 -0
- data/vendor/hardmock/lib/hardmock/mock.rb +180 -0
- data/vendor/hardmock/lib/hardmock/mock_control.rb +53 -0
- data/vendor/hardmock/lib/hardmock/stubbing.rb +210 -0
- data/vendor/hardmock/lib/hardmock/trapper.rb +31 -0
- data/vendor/hardmock/lib/hardmock/utils.rb +9 -0
- data/vendor/hardmock/lib/test_unit_before_after.rb +169 -0
- data/vendor/hardmock/rake_tasks/rdoc.rake +19 -0
- data/vendor/hardmock/rake_tasks/rdoc_options.rb +4 -0
- data/vendor/hardmock/rake_tasks/test.rake +22 -0
- data/vendor/hardmock/test/functional/assert_error_test.rb +52 -0
- data/vendor/hardmock/test/functional/auto_verify_test.rb +178 -0
- data/vendor/hardmock/test/functional/direct_mock_usage_test.rb +396 -0
- data/vendor/hardmock/test/functional/hardmock_test.rb +434 -0
- data/vendor/hardmock/test/functional/stubbing_test.rb +479 -0
- data/vendor/hardmock/test/test_helper.rb +43 -0
- data/vendor/hardmock/test/unit/expectation_builder_test.rb +19 -0
- data/vendor/hardmock/test/unit/expectation_test.rb +372 -0
- data/vendor/hardmock/test/unit/expector_test.rb +57 -0
- data/vendor/hardmock/test/unit/method_cleanout_test.rb +36 -0
- data/vendor/hardmock/test/unit/mock_control_test.rb +175 -0
- data/vendor/hardmock/test/unit/mock_test.rb +279 -0
- data/vendor/hardmock/test/unit/test_unit_before_after_test.rb +452 -0
- data/vendor/hardmock/test/unit/trapper_test.rb +62 -0
- data/vendor/hardmock/test/unit/verify_error_test.rb +40 -0
- data/vendor/unity/auto/colour_prompt.rb +94 -0
- data/vendor/unity/auto/colour_reporter.rb +39 -0
- data/vendor/unity/auto/generate_module.rb +202 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/unity/auto/generate_test_runner.rb +0 -0
- data/vendor/unity/auto/test_file_filter.rb +23 -0
- data/vendor/unity/auto/unity_test_summary.rb +139 -0
- data/vendor/unity/release/build.info +2 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/unity/release/version.info +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/unity/src/unity.c +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/unity/src/unity.h +0 -0
- data/{new_project_template/vendor/ceedling/vendor → vendor}/unity/src/unity_internals.h +94 -6
- metadata +443 -237
- data/.vim +0 -1
- data/.yardopts +0 -1
- data/LICENSE +0 -19
- data/Rakefile +0 -118
- data/ceedling-gem.sublime-project +0 -8
- data/examples/blinky/.DS_Store +0 -0
- data/examples/temp_sensor/src/AT91SAM7X256.h +0 -2556
- data/examples/temp_sensor/src/UsartGetChar.c +0 -6
- data/examples/temp_sensor/src/UsartGetChar.h +0 -8
- data/examples/temp_sensor/test/test_AdcHardwareConfigurator.c +0 -43
- data/examples/temp_sensor/test/test_AdcTemperatureSensor.c +0 -47
- data/examples/temp_sensor/test/test_TimerConfigurator.c +0 -112
- data/examples/temp_sensor/test/test_TimerInterruptConfigurator.c +0 -78
- data/examples/temp_sensor/test/test_TimerInterruptHandler.c +0 -66
- data/examples/temp_sensor/test/test_UsartConfigurator.c +0 -77
- data/examples/temp_sensor/test/test_UsartGetChar.c +0 -17
- data/examples/temp_sensor/test/test_UsartPutChar.c +0 -43
- data/examples/temp_sensor/test/test_UsartTransmitBufferStatus.c +0 -22
- data/new_project_template/build/.gitkeep +0 -0
- data/new_project_template/src/.gitkeep +0 -0
- data/new_project_template/test/.gitkeep +0 -0
- data/new_project_template/test/support/.gitkeep +0 -0
- data/new_project_template/vendor/ceedling/docs/CExceptionSummary.pdf +0 -0
- data/new_project_template/vendor/ceedling/docs/CMock Summary.pdf +0 -0
- data/new_project_template/vendor/ceedling/docs/Ceedling Packet.pdf +0 -0
- data/new_project_template/vendor/ceedling/docs/Unity Summary.pdf +0 -0
- data/new_project_template/vendor/ceedling/lib/preprocessinator_extractor.rb +0 -36
- data/new_project_template/vendor/ceedling/release/build.info +0 -1
- data/new_project_template/vendor/ceedling/vendor/c_exception/release/build.info +0 -1
- data/new_project_template/vendor/ceedling/vendor/cmock/release/build.info +0 -1
- data/new_project_template/vendor/ceedling/vendor/unity/release/build.info +0 -1
@@ -1,43 +0,0 @@
|
|
1
|
-
#include "unity.h"
|
2
|
-
#include "Types.h"
|
3
|
-
#include "AdcHardwareConfigurator.h"
|
4
|
-
#include "AT91SAM7X256.h"
|
5
|
-
#include "ModelConfig.h"
|
6
|
-
|
7
|
-
AT91S_ADC AdcPeripheral;
|
8
|
-
|
9
|
-
void setUp(void)
|
10
|
-
{
|
11
|
-
|
12
|
-
}
|
13
|
-
|
14
|
-
void tearDown(void)
|
15
|
-
{
|
16
|
-
}
|
17
|
-
|
18
|
-
void testResetShouldResetTheAdcConverterPeripheral(void)
|
19
|
-
{
|
20
|
-
AT91C_BASE_ADC->ADC_CR = 0;
|
21
|
-
Adc_Reset();
|
22
|
-
TEST_ASSERT_EQUAL(AT91C_ADC_SWRST, AT91C_BASE_ADC->ADC_CR);
|
23
|
-
}
|
24
|
-
|
25
|
-
void testConfigureModeShouldSetAdcModeRegisterAppropriately(void)
|
26
|
-
{
|
27
|
-
uint32 prescaler = (MASTER_CLOCK / (2 * 2000000)) - 1; // 5MHz ADC clock
|
28
|
-
|
29
|
-
AT91C_BASE_ADC->ADC_MR = 0;
|
30
|
-
|
31
|
-
Adc_ConfigureMode();
|
32
|
-
|
33
|
-
TEST_ASSERT_EQUAL(prescaler, (AT91C_BASE_ADC->ADC_MR & AT91C_ADC_PRESCAL) >> 8);
|
34
|
-
}
|
35
|
-
|
36
|
-
void testEnableTemperatureChannelShouldEnableTheAppropriateAdcInput(void)
|
37
|
-
{
|
38
|
-
AT91C_BASE_ADC->ADC_CHER = 0;
|
39
|
-
|
40
|
-
Adc_EnableTemperatureChannel();
|
41
|
-
|
42
|
-
TEST_ASSERT_EQUAL(0x1 << 4, AT91C_BASE_ADC->ADC_CHER);
|
43
|
-
}
|
@@ -1,47 +0,0 @@
|
|
1
|
-
#include "unity.h"
|
2
|
-
#include "Types.h"
|
3
|
-
#include "AdcTemperatureSensor.h"
|
4
|
-
#include "AT91SAM7X256.h"
|
5
|
-
|
6
|
-
AT91S_ADC AdcPeripheral;
|
7
|
-
|
8
|
-
void setUp(void)
|
9
|
-
{
|
10
|
-
}
|
11
|
-
|
12
|
-
void tearDown(void)
|
13
|
-
{
|
14
|
-
}
|
15
|
-
|
16
|
-
void testShouldStartTemperatureSensorConversionWhenTriggered(void)
|
17
|
-
{
|
18
|
-
AT91C_BASE_ADC->ADC_CR = 0;
|
19
|
-
Adc_StartTemperatureSensorConversion();
|
20
|
-
TEST_ASSERT_EQUAL(AT91C_ADC_START, AT91C_BASE_ADC->ADC_CR);
|
21
|
-
}
|
22
|
-
|
23
|
-
void testTemperatureSensorSampleReadyShouldReturnChannelConversionCompletionStatus(void)
|
24
|
-
{
|
25
|
-
AT91C_BASE_ADC->ADC_SR = 0;
|
26
|
-
TEST_ASSERT_EQUAL(FALSE, Adc_TemperatureSensorSampleReady());
|
27
|
-
AT91C_BASE_ADC->ADC_SR = ~AT91C_ADC_EOC4;
|
28
|
-
TEST_ASSERT_EQUAL(FALSE, Adc_TemperatureSensorSampleReady());
|
29
|
-
AT91C_BASE_ADC->ADC_SR = AT91C_ADC_EOC4;
|
30
|
-
TEST_ASSERT_EQUAL(TRUE, Adc_TemperatureSensorSampleReady());
|
31
|
-
AT91C_BASE_ADC->ADC_SR = 0xffffffff;
|
32
|
-
TEST_ASSERT_EQUAL(TRUE, Adc_TemperatureSensorSampleReady());
|
33
|
-
}
|
34
|
-
|
35
|
-
void testReadTemperatureSensorShouldFetchAndTranslateLatestReadingToMillivolts(void)
|
36
|
-
{
|
37
|
-
uint16 result;
|
38
|
-
|
39
|
-
// ADC bit weight at 10-bit resolution with 3.0V reference = 2.9296875 mV/LSB
|
40
|
-
AT91C_BASE_ADC->ADC_CDR4 = 138;
|
41
|
-
result = Adc_ReadTemperatureSensor();
|
42
|
-
TEST_ASSERT_EQUAL(404, result);
|
43
|
-
|
44
|
-
AT91C_BASE_ADC->ADC_CDR4 = 854;
|
45
|
-
result = Adc_ReadTemperatureSensor();
|
46
|
-
TEST_ASSERT_EQUAL(2502, result);
|
47
|
-
}
|
@@ -1,112 +0,0 @@
|
|
1
|
-
#include "unity.h"
|
2
|
-
#include "Types.h"
|
3
|
-
#include "TimerConfigurator.h"
|
4
|
-
#include "AT91SAM7X256.h"
|
5
|
-
#include "MockTimerInterruptConfigurator.h"
|
6
|
-
|
7
|
-
AT91S_PMC PmcPeripheral;
|
8
|
-
AT91S_TC TimerCounter0Peripheral;
|
9
|
-
AT91S_PIO PioBPeripheral;
|
10
|
-
|
11
|
-
void setUp(void)
|
12
|
-
{
|
13
|
-
}
|
14
|
-
|
15
|
-
void tearDown(void)
|
16
|
-
{
|
17
|
-
}
|
18
|
-
|
19
|
-
void testEnablePeripheralClocksShouldEnableClockToTimer0Peripheral(void)
|
20
|
-
{
|
21
|
-
AT91C_BASE_PMC->PMC_PCER = 0;
|
22
|
-
Timer_EnablePeripheralClocks();
|
23
|
-
TEST_ASSERT_EQUAL(
|
24
|
-
TIMER0_CLOCK_ENABLE,
|
25
|
-
AT91C_BASE_PMC->PMC_PCER & TIMER0_CLOCK_ENABLE);
|
26
|
-
}
|
27
|
-
|
28
|
-
void testEnablePeripheralClocksShouldEnableClockToPIOBPeripheral(void)
|
29
|
-
{
|
30
|
-
AT91C_BASE_PMC->PMC_PCER = 0;
|
31
|
-
Timer_EnablePeripheralClocks();
|
32
|
-
TEST_ASSERT_EQUAL(
|
33
|
-
PIOB_CLOCK_ENABLE,
|
34
|
-
AT91C_BASE_PMC->PMC_PCER & PIOB_CLOCK_ENABLE);
|
35
|
-
}
|
36
|
-
|
37
|
-
void testResetShouldSetTimer0ClockDisableBit_DisableTimer0Interrupts_ClearStatusRegister(void)
|
38
|
-
{
|
39
|
-
AT91C_BASE_TC0->TC_CCR = 0;
|
40
|
-
AT91C_BASE_TC0->TC_IDR = 0;
|
41
|
-
AT91C_BASE_TC0->TC_SR = 0xFFFFFFFF;
|
42
|
-
Timer_Reset();
|
43
|
-
TEST_ASSERT_EQUAL(0x00000002, AT91C_BASE_TC0->TC_CCR);
|
44
|
-
TEST_ASSERT_EQUAL(0xffffffff, AT91C_BASE_TC0->TC_IDR);
|
45
|
-
// CANNOT BE VERIFIED!! TEST_ASSERT_EQUAL(0X00000000, AT91C_BASE_TC0->TC_SR);
|
46
|
-
}
|
47
|
-
|
48
|
-
void testEnableOutputPinShouldEnable_TIOA0_DigitalOutput(void)
|
49
|
-
{
|
50
|
-
AT91C_BASE_PIOB->PIO_PDR = 0;
|
51
|
-
Timer_EnableOutputPin();
|
52
|
-
TEST_ASSERT_EQUAL(TIOA0_PIN_MASK, AT91C_BASE_PIOB->PIO_PDR);
|
53
|
-
}
|
54
|
-
|
55
|
-
void testConfigureModeShouldConfigureTimer0ClockSourceForMasterClockDividedBy1024(void)
|
56
|
-
{
|
57
|
-
AT91C_BASE_TC0->TC_CMR = 0;
|
58
|
-
Timer_ConfigureMode();
|
59
|
-
TEST_ASSERT_EQUAL(0x00000004, AT91C_BASE_TC0->TC_CMR & 0x00000007);
|
60
|
-
}
|
61
|
-
|
62
|
-
void testConfigureModeShouldConfigureTimer0ForWaveGeneration(void)
|
63
|
-
{
|
64
|
-
AT91C_BASE_TC0->TC_CMR = 0;
|
65
|
-
Timer_ConfigureMode();
|
66
|
-
TEST_ASSERT_EQUAL(0x00008000, AT91C_BASE_TC0->TC_CMR & 0x00008000);
|
67
|
-
}
|
68
|
-
|
69
|
-
void testConfigureModeShouldConfigureTimer0ForUpModeWithAutomaticTriggerOnRCCompare(void)
|
70
|
-
{
|
71
|
-
AT91C_BASE_TC0->TC_CMR = 0;
|
72
|
-
Timer_ConfigureMode();
|
73
|
-
TEST_ASSERT_EQUAL(0x00004000, AT91C_BASE_TC0->TC_CMR & 0x00006000);
|
74
|
-
}
|
75
|
-
|
76
|
-
void testConfigureModeShouldConfigureTimer0ToToggleTIOAOnRCCompare(void)
|
77
|
-
{
|
78
|
-
AT91C_BASE_TC0->TC_CMR = 0;
|
79
|
-
Timer_ConfigureMode();
|
80
|
-
TEST_ASSERT_EQUAL(0x000C0000, AT91C_BASE_TC0->TC_CMR & 0x000C0000);
|
81
|
-
}
|
82
|
-
|
83
|
-
void testConfigurePeriodShouldConfigureRegisterCFor10msInterval(void)
|
84
|
-
{
|
85
|
-
AT91C_BASE_TC0->TC_RC = 0;
|
86
|
-
Timer_ConfigurePeriod();
|
87
|
-
TEST_ASSERT_EQUAL(469, AT91C_BASE_TC0->TC_RC);
|
88
|
-
}
|
89
|
-
|
90
|
-
void testEnableShouldSetEnableFlagForTimer0(void)
|
91
|
-
{
|
92
|
-
AT91C_BASE_TC0->TC_CCR = 0;
|
93
|
-
Timer_Enable();
|
94
|
-
TEST_ASSERT_EQUAL_INT(1, AT91C_BASE_TC0->TC_CCR);
|
95
|
-
}
|
96
|
-
|
97
|
-
void testConfigureInterruptHandler(void)
|
98
|
-
{
|
99
|
-
Timer_DisableInterrupt_Expect();
|
100
|
-
Timer_ResetSystemTime_Expect();
|
101
|
-
Timer_ConfigureInterrupt_Expect();
|
102
|
-
Timer_EnableInterrupt_Expect();
|
103
|
-
|
104
|
-
Timer_ConfigureInterruptHandler();
|
105
|
-
}
|
106
|
-
|
107
|
-
void testStartShouldSetSoftwareTriggerFlag(void)
|
108
|
-
{
|
109
|
-
AT91C_BASE_TC0->TC_CCR = 0;
|
110
|
-
Timer_Start();
|
111
|
-
TEST_ASSERT_EQUAL(0x04, AT91C_BASE_TC0->TC_CCR);
|
112
|
-
}
|
@@ -1,78 +0,0 @@
|
|
1
|
-
#include "unity.h"
|
2
|
-
#include "Types.h"
|
3
|
-
#include "TimerInterruptConfigurator.h"
|
4
|
-
#include "MockTimerInterruptHandler.h"
|
5
|
-
#include "AT91SAM7X256.h"
|
6
|
-
|
7
|
-
AT91S_AIC AicPeripheral;
|
8
|
-
AT91S_TC TimerCounter0Peripheral;
|
9
|
-
|
10
|
-
void setUp(void)
|
11
|
-
{
|
12
|
-
}
|
13
|
-
|
14
|
-
void tearDown(void)
|
15
|
-
{
|
16
|
-
}
|
17
|
-
|
18
|
-
void test_TIMER0_ID_MASK_ShouldBeCorrect(void)
|
19
|
-
{
|
20
|
-
TEST_ASSERT_EQUAL(((uint32)0x1) << AT91C_ID_TC0, TIMER0_ID_MASK);
|
21
|
-
}
|
22
|
-
|
23
|
-
void testDisableInterruptDisablesTimer0InterruptInTheInterruptController(void)
|
24
|
-
{
|
25
|
-
AT91C_BASE_AIC->AIC_IDCR = 0;
|
26
|
-
Timer_DisableInterrupt();
|
27
|
-
TEST_ASSERT_EQUAL(TIMER0_ID_MASK, AT91C_BASE_AIC->AIC_IDCR);
|
28
|
-
}
|
29
|
-
|
30
|
-
void testResetSystemTimeDelegatesTo_Timer_SetSystemTime_Appropriately(void)
|
31
|
-
{
|
32
|
-
Timer_SetSystemTime_Expect(0);
|
33
|
-
Timer_ResetSystemTime();
|
34
|
-
}
|
35
|
-
|
36
|
-
void testConfigureInterruptShouldSetInterruptHandlerAppropriately(void)
|
37
|
-
{
|
38
|
-
AT91C_BASE_AIC->AIC_SVR[AT91C_ID_TC0] = (uint32)NULL;
|
39
|
-
Timer_ConfigureInterrupt();
|
40
|
-
TEST_ASSERT_EQUAL((uint32)Timer_InterruptHandler, AT91C_BASE_AIC->AIC_SVR[AT91C_ID_TC0]);
|
41
|
-
}
|
42
|
-
|
43
|
-
void testConfigureInterruptShouldSetInterruptLevelInSourceModeRegisterAppropriately(void)
|
44
|
-
{
|
45
|
-
AT91C_BASE_AIC->AIC_SMR[AT91C_ID_TC0] = 0;
|
46
|
-
Timer_ConfigureInterrupt();
|
47
|
-
TEST_ASSERT_EQUAL(
|
48
|
-
AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL,
|
49
|
-
AT91C_BASE_AIC->AIC_SMR[AT91C_ID_TC0] & 0x00000060);
|
50
|
-
}
|
51
|
-
|
52
|
-
void testConfigureInterruptShouldSetInterruptPriorityInSourceModeRegisterAppropriately(void)
|
53
|
-
{
|
54
|
-
AT91C_BASE_AIC->AIC_SMR[AT91C_ID_TC0] = 0;
|
55
|
-
Timer_ConfigureInterrupt();
|
56
|
-
TEST_ASSERT_EQUAL(1, AT91C_BASE_AIC->AIC_SMR[AT91C_ID_TC0] & 0x00000007);
|
57
|
-
}
|
58
|
-
|
59
|
-
void testConfigureInterruptShouldClearTimer0InterruptOnTheInterruptController(void)
|
60
|
-
{
|
61
|
-
AT91C_BASE_AIC->AIC_ICCR = 0;
|
62
|
-
Timer_ConfigureInterrupt();
|
63
|
-
TEST_ASSERT_EQUAL(TIMER0_ID_MASK, AT91C_BASE_AIC->AIC_ICCR);
|
64
|
-
}
|
65
|
-
|
66
|
-
void testConfigureInterruptShouldEnableCompareInterruptForRegisterC(void)
|
67
|
-
{
|
68
|
-
AT91C_BASE_TC0->TC_IER = 0;
|
69
|
-
Timer_ConfigureInterrupt();
|
70
|
-
TEST_ASSERT_EQUAL(AT91C_TC_CPCS, AT91C_BASE_TC0->TC_IER);
|
71
|
-
}
|
72
|
-
|
73
|
-
void testEnableInterruptShouldEnableTimer0InterruptsInInterruptCotroller(void)
|
74
|
-
{
|
75
|
-
AT91C_BASE_AIC->AIC_IECR = 0;
|
76
|
-
Timer_EnableInterrupt();
|
77
|
-
TEST_ASSERT_EQUAL(TIMER0_ID_MASK, AT91C_BASE_AIC->AIC_IECR);
|
78
|
-
}
|
@@ -1,66 +0,0 @@
|
|
1
|
-
#include "unity.h"
|
2
|
-
#include "Types.h"
|
3
|
-
#include "TimerInterruptHandler.h"
|
4
|
-
#include "AT91SAM7X256.h"
|
5
|
-
|
6
|
-
AT91S_TC TimerCounter0Peripheral;
|
7
|
-
|
8
|
-
void setUp(void)
|
9
|
-
{
|
10
|
-
}
|
11
|
-
|
12
|
-
void tearDown(void)
|
13
|
-
{
|
14
|
-
}
|
15
|
-
|
16
|
-
void testSetAndGetSystemTime(void)
|
17
|
-
{
|
18
|
-
Timer_SetSystemTime(0);
|
19
|
-
TEST_ASSERT_EQUAL(0, Timer_GetSystemTime());
|
20
|
-
|
21
|
-
Timer_SetSystemTime(129837);
|
22
|
-
TEST_ASSERT_EQUAL(129837, Timer_GetSystemTime());
|
23
|
-
|
24
|
-
Timer_SetSystemTime(UINT32_MAX);
|
25
|
-
TEST_ASSERT_EQUAL(UINT32_MAX, Timer_GetSystemTime());
|
26
|
-
}
|
27
|
-
|
28
|
-
void testInterruptHandlerShouldIncrementSystemTimeOnlyIfStatusHasCompareRegisterCOverflowBitSet(void)
|
29
|
-
{
|
30
|
-
Timer_SetSystemTime(0);
|
31
|
-
AT91C_BASE_TC0->TC_SR = 0;
|
32
|
-
Timer_InterruptHandler();
|
33
|
-
TEST_ASSERT_EQUAL(0, Timer_GetSystemTime());
|
34
|
-
|
35
|
-
Timer_SetSystemTime(0);
|
36
|
-
AT91C_BASE_TC0->TC_SR = ~AT91C_TC_CPCS;
|
37
|
-
Timer_InterruptHandler();
|
38
|
-
TEST_ASSERT_EQUAL(0, Timer_GetSystemTime());
|
39
|
-
|
40
|
-
Timer_SetSystemTime(0);
|
41
|
-
AT91C_BASE_TC0->TC_SR = AT91C_TC_CPCS;
|
42
|
-
Timer_InterruptHandler();
|
43
|
-
TEST_ASSERT(Timer_GetSystemTime() > 0);
|
44
|
-
|
45
|
-
Timer_SetSystemTime(0);
|
46
|
-
AT91C_BASE_TC0->TC_SR = 0xffffffff;
|
47
|
-
Timer_InterruptHandler();
|
48
|
-
TEST_ASSERT(Timer_GetSystemTime() > 0);
|
49
|
-
}
|
50
|
-
|
51
|
-
void testInterruptHandlerShouldIncrementSystemTimerBy_10(void)
|
52
|
-
{
|
53
|
-
Timer_SetSystemTime(0);
|
54
|
-
AT91C_BASE_TC0->TC_SR = AT91C_TC_CPCS;
|
55
|
-
Timer_InterruptHandler();
|
56
|
-
TEST_ASSERT_EQUAL(10, Timer_GetSystemTime());
|
57
|
-
|
58
|
-
AT91C_BASE_TC0->TC_SR = AT91C_TC_CPCS;
|
59
|
-
Timer_InterruptHandler();
|
60
|
-
TEST_ASSERT_EQUAL(20, Timer_GetSystemTime());
|
61
|
-
|
62
|
-
Timer_SetSystemTime(39426857);
|
63
|
-
AT91C_BASE_TC0->TC_SR = AT91C_TC_CPCS;
|
64
|
-
Timer_InterruptHandler();
|
65
|
-
TEST_ASSERT_EQUAL(39426867, Timer_GetSystemTime());
|
66
|
-
}
|
@@ -1,77 +0,0 @@
|
|
1
|
-
#include "unity.h"
|
2
|
-
#include "Types.h"
|
3
|
-
#include "UsartConfigurator.h"
|
4
|
-
|
5
|
-
AT91S_PIO PioAPeripheral;
|
6
|
-
AT91S_PMC PmcPeripheral;
|
7
|
-
AT91S_USART Usart0Peripheral;
|
8
|
-
|
9
|
-
void setUp(void)
|
10
|
-
{
|
11
|
-
}
|
12
|
-
|
13
|
-
void tearDown(void)
|
14
|
-
{
|
15
|
-
}
|
16
|
-
|
17
|
-
void testConfigureUsartIOShouldConfigureUsartTxPinfForPeripheralIO(void)
|
18
|
-
{
|
19
|
-
AT91C_BASE_PIOA->PIO_ASR = 0;
|
20
|
-
AT91C_BASE_PIOA->PIO_BSR = 0xffffffff;
|
21
|
-
AT91C_BASE_PIOA->PIO_PDR = 0;
|
22
|
-
Usart_ConfigureUsartIO();
|
23
|
-
TEST_ASSERT_EQUAL(USART0_TX_PIN, AT91C_BASE_PIOA->PIO_ASR);
|
24
|
-
TEST_ASSERT_EQUAL(0, AT91C_BASE_PIOA->PIO_BSR);
|
25
|
-
TEST_ASSERT_EQUAL(USART0_TX_PIN, AT91C_BASE_PIOA->PIO_PDR);
|
26
|
-
}
|
27
|
-
|
28
|
-
void testEnablePeripheralClockShouldEnableClockToUsartPeripheral(void)
|
29
|
-
{
|
30
|
-
AT91C_BASE_PMC->PMC_PCER = 0;
|
31
|
-
Usart_EnablePeripheralClock();
|
32
|
-
TEST_ASSERT_EQUAL(((uint32)1) << USART0_CLOCK_ENABLE, AT91C_BASE_PMC->PMC_PCER);
|
33
|
-
}
|
34
|
-
|
35
|
-
void testResetShouldDisableAllUsartInterrupts(void)
|
36
|
-
{
|
37
|
-
AT91C_BASE_US0->US_IDR = 0;
|
38
|
-
Usart_Reset();
|
39
|
-
TEST_ASSERT_EQUAL(0xffffffff, AT91C_BASE_US0->US_IDR);
|
40
|
-
}
|
41
|
-
|
42
|
-
void testResetShouldResetUsartTransmitterAndReceiver(void)
|
43
|
-
{
|
44
|
-
AT91C_BASE_US0->US_CR = 0;
|
45
|
-
Usart_Reset();
|
46
|
-
TEST_ASSERT_EQUAL(AT91C_US_RSTRX | AT91C_US_RSTTX | AT91C_US_RXDIS | AT91C_US_TXDIS, AT91C_BASE_US0->US_CR);
|
47
|
-
}
|
48
|
-
|
49
|
-
void testConfigureModeShouldSetUsartModeToAsynchronous(void)
|
50
|
-
{
|
51
|
-
uint32 asyncMode = (AT91C_US_USMODE_NORMAL |
|
52
|
-
AT91C_US_NBSTOP_1_BIT |
|
53
|
-
AT91C_US_PAR_NONE |
|
54
|
-
AT91C_US_CHRL_8_BITS |
|
55
|
-
AT91C_US_CLKS_CLOCK);
|
56
|
-
|
57
|
-
AT91C_BASE_US0->US_MR = ~asyncMode;
|
58
|
-
Usart_ConfigureMode();
|
59
|
-
TEST_ASSERT_EQUAL(asyncMode, AT91C_BASE_US0->US_MR);
|
60
|
-
}
|
61
|
-
|
62
|
-
void testSetBaudRateRegisterShouldSetUsartBaudRateRegisterToValuePassedAsParameter(void)
|
63
|
-
{
|
64
|
-
AT91C_BASE_US0->US_BRGR = 0;
|
65
|
-
Usart_SetBaudRateRegister(3);
|
66
|
-
TEST_ASSERT_EQUAL(3, AT91C_BASE_US0->US_BRGR);
|
67
|
-
Usart_SetBaudRateRegister(251);
|
68
|
-
TEST_ASSERT_EQUAL(251, AT91C_BASE_US0->US_BRGR);
|
69
|
-
}
|
70
|
-
|
71
|
-
|
72
|
-
void testEnableShouldEnableUsart0Transmitter(void)
|
73
|
-
{
|
74
|
-
AT91C_BASE_US0->US_CR = 0;
|
75
|
-
Usart_Enable();
|
76
|
-
TEST_ASSERT_EQUAL(AT91C_US_TXEN, AT91C_BASE_US0->US_CR);
|
77
|
-
}
|