• Stars
    star
    660
  • Rank 68,018 (Top 2 %)
  • Language
    C
  • License
    MIT License
  • Created over 12 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CMock - Mock/stub generator for C

CMock CI

CMock is a mock and stub generator and runtime for unit testing C. It's been designed to work smoothly with Unity Test, another of the embedded-software testing tools developed by ThrowTheSwitch.org. CMock automagically parses your C headers and creates useful and usable mock interfaces for unit testing. Give it a try!

If you don't care to manage unit testing builds yourself, consider checking out Ceedling, a test-centered build manager for unit testing C code.

Getting Started

If you're using Ceedling, there is no need to install CMock. It will handle it for you. For everyone else, the simplest way is to grab it off github. You can also download it as a zip if you prefer. The Github method looks something like this:

> git clone --recursive https://github.com/throwtheswitch/cmock.git
> cd cmock
> bundle install # Ensures you have all RubyGems needed

If you plan to help with the development of CMock (or just want to verify that it can perform its self tests on your system) then you can enter the test directory and then ask it to test:

> cd test
> rake # Run all CMock self tests

API Documentation

More Repositories

1

Unity

Simple Unit Testing for C
C
3,920
star
2

Ceedling

Ruby-based unit testing and build system for C projects
Ruby
570
star
3

CException

Lightweight exception implementation for C
C
316
star
4

arduino_c_scaffold

A scaffold project using Rake, avr-gcc, and avrdude to program the Arduino UNO in plain C.
Ruby
67
star
5

CeedlingExample_Microchip

An example project demonstrating how to configure Ceedling for use with Microchip's compiler and simulator
C
40
star
6

MadScienceLabDocker

Cross-compilation C unit testing environment with Unity, CMock, and Ceedling
Dockerfile
11
star
7

CMockExample

An example project of an LED controller which demonstrates the use of mocks.
C
10
star
8

blinky

LED blinky demo for Design East 2012
C
8
star
9

DrSurlyCourse2Docker

Dr. Surly’s Course #2 build environment
C
7
star
10

yaml_extras

Some slight extensions to YAML which allow silliness like the ability to include other files.
Ruby
5
star
11

DrSurlyCourse1Docker

Dr. Surly’s Course #1 build environment
Shell
5
star
12

cucumber-c

Ruby Library/Gem to provide lightweight C/C++ bindings to Cucumber in lieu of Wire protocol (eg CucumberCpp) for streamlined execution of C/C++ step definitions
Ruby
4
star
13

ceedling-gem

C
4
star
14

pcan-ruby

Ruby Bindings for Peak PCAN USB-to-CAN adapter with dynamic Ruby-based message signal creation
Visual Basic
4
star
15

GemJacker

Manage non-ruby packages with RubyGems
Ruby
2
star
16

Jack

Script to assist in the creation of jacked gems.
Ruby
1
star
17

GemJacker-HelloWorld-Bin

Example of using GemJacker to add a binary to the path at runtime.
Ruby
1
star