Live Data progress
This commit is contained in:
parent
48d9235ff5
commit
a07c88216d
|
@ -0,0 +1,25 @@
|
|||
#include "pch.h"
|
||||
#include "FragmentEntry.h"
|
||||
|
||||
static uint8_t buffer10[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
|
||||
static uint8_t buffer5[] = {11, 12, 13, 14, 15};
|
||||
|
||||
static FragmentEntry fragments[] = {
|
||||
FragmentEntry(buffer10, sizeof(buffer10)),
|
||||
FragmentEntry(buffer5, sizeof(buffer5)),
|
||||
};
|
||||
|
||||
TEST(outputs, fragments) {
|
||||
uint8_t buffer[120];
|
||||
{
|
||||
uint8_t expected[] = {9, 10, 11, 12, 13};
|
||||
copyRange(buffer, fragments, 8, 5);
|
||||
EXPECT_TRUE( 0 == std::memcmp(buffer, expected, sizeof(expected)));
|
||||
}
|
||||
|
||||
{
|
||||
uint8_t expected[] = {13, 14, 15};
|
||||
copyRange(buffer, fragments, 12, 3);
|
||||
EXPECT_TRUE( 0 == std::memcmp(buffer, expected, sizeof(expected)));
|
||||
}
|
||||
}
|
|
@ -51,6 +51,7 @@ TESTS_SRC_CPP = \
|
|||
tests/test_dc_motor.cpp \
|
||||
tests/test_fan_control.cpp \
|
||||
tests/test_main_relay.cpp \
|
||||
tests/test_scattered_outputs.cpp \
|
||||
tests/test_vvt.cpp \
|
||||
tests/test_launch.cpp \
|
||||
tests/test_fuel_map.cpp \
|
||||
|
|
Loading…
Reference in New Issue