Skip to content

Instantly share code, notes, and snippets.

@awilke
awilke / 96_multi_param.c
Last active November 18, 2016 19:38
Cgreen floating point mock test
#include <cgreen/cgreen.h>
#include <cgreen/mocks.h>
double foobar(void) {return (double)unbox_double(mock());}
double test_func(void)
{
return foobar();
}
Ensure(foobar_returns_floating_point)
#define SCK_PIN 3
#define SI_PIN 4
#define AD_PIN 5
#define LATCH_PIN 6
#define BLK_PIN 7
#define ENC_B_PIN A0
#define ENC_A_PIN A1
#define GET_CHAR_START(ASCII) ((ASCII-32)*5)