Add some basic tests for the database
This commit is contained in:
@@ -19,6 +19,7 @@ list(APPEND EXTRA_COMPONENT_DIRS
|
||||
"$ENV{PROJ_PATH}/src/tasks"
|
||||
"$ENV{PROJ_PATH}/src/ui"
|
||||
"$ENV{PROJ_PATH}/src/dev_console"
|
||||
"fixtures"
|
||||
)
|
||||
|
||||
# List all components that include tests here.
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
idf_component_register(INCLUDE_DIRS "." REQUIRES drivers)
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "catch2/catch.hpp"
|
||||
#include "i2c.hpp"
|
||||
|
||||
class I2CFixture {
|
||||
public:
|
||||
I2CFixture() { REQUIRE(drivers::init_i2c() == ESP_OK); }
|
||||
~I2CFixture() { drivers::deinit_i2c(); }
|
||||
};
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "catch2/catch.hpp"
|
||||
#include "spi.hpp"
|
||||
|
||||
class SpiFixture {
|
||||
public:
|
||||
SpiFixture() { REQUIRE(drivers::init_spi() == ESP_OK); }
|
||||
~SpiFixture() { drivers::deinit_spi(); }
|
||||
};
|
||||
+1
-1
@@ -5,4 +5,4 @@ CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE=0
|
||||
CONFIG_COMPILER_CXX_RTTI=y
|
||||
CONFIG_COMPILER_STACK_CHECK_MODE_STRONG=y
|
||||
CONFIG_COMPILER_STACK_CHECK=y
|
||||
CONFIG_ESP_TASK_WDT=n
|
||||
CONFIG_ESP_TASK_WDT=y
|
||||
|
||||
Reference in New Issue
Block a user