Nicu Hodos 89da9a80e8 re-organize:
- move code for all devices in dedicated folder
- move code for gateway in the root folder
2025-09-20 10:00:42 +02:00

37 lines
679 B
C++

#include <unity.h>
#include <stdio.h>
#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;
}