fix decoder tests

This commit is contained in:
Nicu Hodos 2024-06-04 21:02:38 +02:00
parent d96d4cc666
commit 004bba0175

View File

@ -1,4 +1,5 @@
#include <unity.h>
#include <stdio.h>
#include "RcDecoder.h"
RcDecoder d;
@ -14,14 +15,14 @@ void tearDown(void) {
void test_1_2_on(void) {
d.decode(5574993);
TEST_ASSERT_EQUAL(true, d.state);
TEST_ASSERT_EQUAL(1, d.group);
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(1, d.group);
TEST_ASSERT_EQUAL_CHAR_ARRAY("00001", d.group, 5);
TEST_ASSERT_EQUAL(1, d.device);
}