CMock
Mock/stub generator for C
File Explorer
Download Latest Version (.zip)- main.yml
- FUNDING.yml
- production_environment.rb
- test_environment.rb
- CMock_ArgumentValidation.md
- CMock_Summary.md
- CMockChangeLog.md
- CMockKnownIssues.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- ThrowTheSwitchCodingStandard.md
- foo.c
- foo.h
- main.c
- test_foo.c
- test_main.c
- Makefile
- AdcConductor.c
- AdcConductor.h
- AdcHardware.c
- AdcHardware.h
- AdcHardwareConfigurator.c
- AdcHardwareConfigurator.h
- AdcModel.c
- AdcModel.h
- AdcTemperatureSensor.c
- AdcTemperatureSensor.h
- AT91SAM7X256.h
- Executor.c
- Executor.h
- IntrinsicsWrapper.c
- IntrinsicsWrapper.h
- Main.c
- Main.h
- Model.c
- Model.h
- ModelConfig.h
- TaskScheduler.c
- TaskScheduler.h
- TemperatureCalculator.c
- TemperatureCalculator.h
- TemperatureFilter.c
- TemperatureFilter.h
- TimerConductor.c
- TimerConductor.h
- TimerConfigurator.c
- TimerConfigurator.h
- TimerHardware.c
- TimerHardware.h
- TimerInterruptConfigurator.c
- TimerInterruptConfigurator.h
- TimerInterruptHandler.c
- TimerInterruptHandler.h
- TimerModel.c
- TimerModel.h
- Types.h
- UsartBaudRateRegisterCalculator.c
- UsartBaudRateRegisterCalculator.h
- UsartConductor.c
- UsartConductor.h
- UsartConfigurator.c
- UsartConfigurator.h
- UsartHardware.c
- UsartHardware.h
- UsartModel.c
- UsartModel.h
- UsartPutChar.c
- UsartPutChar.h
- UsartTransmitBufferStatus.c
- UsartTransmitBufferStatus.h
- TestAdcConductor.c
- TestAdcHardware.c
- TestAdcHardwareConfigurator.c
- TestAdcModel.c
- TestAdcTemperatureSensor.c
- TestExecutor.c
- TestMain.c
- TestModel.c
- TestTaskScheduler.c
- TestTemperatureCalculator.c
- TestTemperatureFilter.c
- TestTimerConductor.c
- TestTimerConfigurator.c
- TestTimerHardware.c
- TestTimerInterruptConfigurator.c
- TestTimerInterruptHandler.c
- TestTimerModel.c
- TestUsartBaudRateRegisterCalculator.c
- TestUsartConductor.c
- TestUsartConfigurator.c
- TestUsartHardware.c
- TestUsartModel.c
- TestUsartPutChar.c
- TestUsartTransmitBufferStatus.c
- project.yml
- rakefile.rb
- rakefile_helper.rb
- cmock.rb
- cmock_config.rb
- cmock_file_writer.rb
- cmock_generator.rb
- cmock_generator_plugin_array.rb
- cmock_generator_plugin_callback.rb
- cmock_generator_plugin_cexception.rb
- cmock_generator_plugin_expect.rb
- cmock_generator_plugin_expect_any_args.rb
- cmock_generator_plugin_ignore.rb
- cmock_generator_plugin_ignore_arg.rb
- cmock_generator_plugin_ignore_stateless.rb
- cmock_generator_plugin_return_thru_ptr.rb
- cmock_generator_utils.rb
- cmock_header_parser.rb
- cmock_plugin_manager.rb
- cmock_unityhelper_parser.rb
- cmock_version.rb
- create_makefile.rb
- cmock.c
- cmock.h
- cmock_internals.h
- meson.build
- TestCMockC.c
- TestCMockC.yml
- TestCMockC_Runner.c
- TestCMockCDynamic.c
- TestCMockCDynamic.yml
- TestCMockCDynamic_Runner.c
- AT91SAM7X-EK.h
- AT91SAM7X256.inc
- AT91SAM7X256.rdf
- AT91SAM7X256.tcl
- AT91SAM7X256_inc.h
- ioat91sam7x256.h
- lib_AT91SAM7X256.h
- at91SAM7X256_FLASH.xcl
- at91SAM7X256_RAM.xcl
- ioat91sam7x256.ddf
- SAM7_FLASH.mac
- SAM7_RAM.mac
- SAM7_SIM.mac
- cmock_demo.cspy.bat
- cmock_demo.dbgdt
- cmock_demo.dni
- cmock_demo.wsdt
- Cstartup.s79
- Cstartup_SAM7.c
- cmock_demo.dep
- cmock_demo.ewd
- cmock_demo.ewp
- cmock_demo.eww
- AT91SAM7X-EK.h
- AT91SAM7X256_inc.h
- lib_AT91SAM7X256.h
- project.h
- at91SAM7X256_FLASH.icf
- at91SAM7X256_RAM.icf
- SAM7_FLASH.mac
- SAM7_RAM.mac
- SAM7_SIM.mac
- BasicInterrupt_SAM7X.cspy.bat
- BasicInterrupt_SAM7X.dbgdt
- BasicInterrupt_SAM7X.dni
- BasicInterrupt_SAM7X.wsdt
- BasicInterrupt_SAM7X_FLASH_Debug.jlink
- cmock_demo.cspy.bat
- cmock_demo.dbgdt
- cmock_demo.dni
- cmock_demo.wsdt
- cmock_demo_Binary.jlink
- cmock_demo_FLASH_Debug.jlink
- cmock_demo_RAM_Debug.jlink
- Cstartup.s
- Cstartup_SAM7.c
- cmock_demo.dep
- cmock_demo.ewd
- cmock_demo.ewp
- cmock_demo.eww
- callingconv.h
- config.yml
- const.h
- inline.h
- osek.h
- parsing.h
- all_plugins_but_other_limits.yml
- all_plugins_coexist.yml
- array_handling.yml
- basic_expect_and_return.yml
- char_string_array_plugin.yml
- const_custom_type.yml
- const_primitives_handling.yml
- const_ptr_return_and_arg.yml
- debug_output.yml
- doesnt_leave_details_behind.yml
- enforce_strict_ordering.yml
- expect_and_return_custom_types.yml
- expect_and_return_treat_as.yml
- expect_and_throw.yml
- expect_any_args.yml
- fancy_pointer_handling.yml
- function_pointer_handling.yml
- ignore_and_return.yml
- ignore_and_return_stateless.yml
- ignore_strict_mock_calling.yml
- newer_standards_stuff1.yml
- nonstandard_parsed_stuff_1.yml
- nonstandard_parsed_stuff_2.yml
- out_of_memory.yml
- parsing_challenges.yml
- parsing_challenges_with_func_pointers.yml
- pointer_handling.yml
- return_thru_ptr_expect_any_args.yml
- return_thru_ptr_ignore.yml
- return_thru_ptr_ignore_arg.yml
- skeleton.yml
- skeleton_update.yml
- struct_union_enum_expect_and_return.yml
- struct_union_enum_expect_and_return_with_plugins.yml
- stubs_with_callbacks.yml
- teardown_mock_calls.yml
- teardown_mock_expectations.yml
- unity_64bit_support.yml
- unity_ignores.yml
- unity_void_pointer_compare.yml
- void_pointer_no_array_plugin.yml
- void_pointer_treat_as_void_array_plugin.yml
- volatile_pointer_handling.yml
- wrong_expect_and_return.yml
- systest_generator.rb
- iar_arm.yml
- tiny.yml
- cmock_config_test.rb
- cmock_config_test.yml
- cmock_file_writer_test.rb
- cmock_generator_main_test.rb
- cmock_generator_no_error_stubs_plugin_array_test.rb
- cmock_generator_no_error_stubs_plugin_expect_any_args_test.rb
- cmock_generator_no_error_stubs_plugin_expect_test.rb
- cmock_generator_no_error_stubs_plugin_ignore_stateless_test.rb
- cmock_generator_no_error_stubs_plugin_ignore_test.rb
- cmock_generator_plugin_array_test.rb
- cmock_generator_plugin_callback_test.rb
- cmock_generator_plugin_cexception_test.rb
- cmock_generator_plugin_expect_a_test.rb
- cmock_generator_plugin_expect_any_args_test.rb
- cmock_generator_plugin_expect_b_test.rb
- cmock_generator_plugin_ignore_arg_test.rb
- cmock_generator_plugin_ignore_stateless_test.rb
- cmock_generator_plugin_ignore_test.rb
- cmock_generator_plugin_return_thru_ptr_test.rb
- cmock_generator_utils_test.rb
- cmock_header_parser_test.rb
- cmock_plugin_manager_test.rb
- cmock_unityhelper_parser_test.rb
- .ruby-version
- gcc_64_valgrind.yml
- project.yml
- rakefile
- rakefile_helper.rb
- test_helper.rb
- reporttask.rb
- behaviors.rb
- user.rb
- user_test.rb
- Rakefile
- behaviors_tasks_test.rb
- behaviors_test.rb
- Manifest.txt
- Rakefile
- c_exception
- unity
- .gitattributes
- .gitignore
- .gitmodules
- cmock.gemspec
- Gemfile
- LICENSE.txt
- meson.build
- README.md
π Installation Guide
1. Get the code
git clone https://github.com/ThrowTheSwitch/CMock
Downloads the entire project code from GitHub to your computer.
cd CMock
Moves into the project folder you just downloaded.
2. Ruby
Easy RecommendedPrerequisites
> bundle install # Ensures you have all RubyGems needed
Installs the Ruby libraries listed in the Gemfile.
If bundle install finishes without errors, continue with the run command from the README (e.g. rails server).
Pulled directly from this repo's README.
3. Make
MediumPrerequisites
- Git Needed to download the project code from GitHub.
- Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
cd examples/make_example
This project's files live in a subfolder, so move into it first.
make
Compiles the code based on the generated build configuration to produce an executable.
If it finishes without errors, it worked. Try running the generated executable directly.
// repository documentation
Was this content helpful?
(0 ratings)
