tests cleanup

This commit is contained in:
Matthew Kennedy 2022-07-20 15:04:42 -07:00
parent b97880586c
commit de6fffbb9f
3 changed files with 16 additions and 4 deletions

View File

@ -1,4 +1,4 @@
// This file just includes all the header-only parts of the lib so we can ensure they at least compile.
#include "rusefi/arrays.h"
#include "rusefi/interpolation.h"
#include <rusefi/arrays.h>
#include <rusefi/interpolation.h>

View File

@ -39,6 +39,20 @@ TEST(Util_Fragments, fragments) {
resetBuffer();
{
// Exactly copy both buffers
uint8_t expected[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, // buffer10
11, 12, 13, 14, 15, // buffer5
0, 0, 0, 0, 0, // null obj2
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 // buffer10 again
};
copyRange(buffer, fragments, 0, 10 + 5 + 5 + 10);
EXPECT_TRUE( 0 == std::memcmp(buffer, expected, sizeof(expected)));
}
resetBuffer();
{
// Check overlap between first and second fragments
uint8_t expected[] = {9, 10, 11, 12, 13};

View File

@ -5,8 +5,6 @@
TEST(Util_Math, ExpTaylor)
{
float x = -2;
// test from -2 < x < 0
for(float x = -2; x < 0; x += 0.05)
{