tests cleanup
This commit is contained in:
parent
b97880586c
commit
de6fffbb9f
|
@ -1,4 +1,4 @@
|
||||||
// This file just includes all the header-only parts of the lib so we can ensure they at least compile.
|
// 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/arrays.h>
|
||||||
#include "rusefi/interpolation.h"
|
#include <rusefi/interpolation.h>
|
||||||
|
|
|
@ -39,6 +39,20 @@ TEST(Util_Fragments, fragments) {
|
||||||
|
|
||||||
resetBuffer();
|
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
|
// Check overlap between first and second fragments
|
||||||
uint8_t expected[] = {9, 10, 11, 12, 13};
|
uint8_t expected[] = {9, 10, 11, 12, 13};
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
TEST(Util_Math, ExpTaylor)
|
TEST(Util_Math, ExpTaylor)
|
||||||
{
|
{
|
||||||
float x = -2;
|
|
||||||
|
|
||||||
// test from -2 < x < 0
|
// test from -2 < x < 0
|
||||||
for(float x = -2; x < 0; x += 0.05)
|
for(float x = -2; x < 0; x += 0.05)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue