#include #include #include "RcDecoder.h" RcDecoder d; void setUp(void) { // set stuff up here } void tearDown(void) { // clean stuff up here } void test_1_2_on(void) { d.decode(5574993); TEST_ASSERT_EQUAL(true, d.state); TEST_ASSERT_EQUAL_CHAR_ARRAY("00001", d.group, 5); TEST_ASSERT_EQUAL(2, d.device); } void test_1_1_off(void) { d.decode(5571924); TEST_ASSERT_EQUAL(false, d.state); TEST_ASSERT_EQUAL_CHAR_ARRAY("00001", d.group, 5); TEST_ASSERT_EQUAL(1, d.device); } int main(int argc, char **argv) { UNITY_BEGIN(); RUN_TEST(test_1_2_on); RUN_TEST(test_1_1_off); UNITY_END(); return 0; }