summaryrefslogtreecommitdiff
path: root/src/drivers/test
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-05-12 10:30:07 +1000
committerjacqueline <me@jacqueline.id.au>2023-05-12 10:30:07 +1000
commit961c8014ada037712e8c72f23430362e9f14c1ec (patch)
treece13e0a00fc0d0318d46e6dfbecf2360b4cc5e14 /src/drivers/test
parent10eb120878e01579bff2fdfab7bef59639b21155 (diff)
downloadtangara-fw-961c8014ada037712e8c72f23430362e9f14c1ec.tar.gz
Add some basic tests for the database
Diffstat (limited to 'src/drivers/test')
-rw-r--r--src/drivers/test/CMakeLists.txt2
-rw-r--r--src/drivers/test/i2c_fixture.hpp10
-rw-r--r--src/drivers/test/spi_fixture.hpp10
3 files changed, 1 insertions, 21 deletions
diff --git a/src/drivers/test/CMakeLists.txt b/src/drivers/test/CMakeLists.txt
index 78e57a1f..c2f7ea65 100644
--- a/src/drivers/test/CMakeLists.txt
+++ b/src/drivers/test/CMakeLists.txt
@@ -1,3 +1,3 @@
idf_component_register(
SRCS "test_storage.cpp" "test_gpio_expander.cpp" "test_battery.cpp" "test_dac.cpp"
- INCLUDE_DIRS "." REQUIRES catch2 cmock drivers)
+ INCLUDE_DIRS "." REQUIRES catch2 cmock drivers fixtures)
diff --git a/src/drivers/test/i2c_fixture.hpp b/src/drivers/test/i2c_fixture.hpp
deleted file mode 100644
index 54794591..00000000
--- a/src/drivers/test/i2c_fixture.hpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include "catch2/catch.hpp"
-#include "i2c.hpp"
-
-class I2CFixture {
- public:
- I2CFixture() { REQUIRE(drivers::init_i2c() == ESP_OK); }
- ~I2CFixture() { drivers::deinit_i2c(); }
-};
diff --git a/src/drivers/test/spi_fixture.hpp b/src/drivers/test/spi_fixture.hpp
deleted file mode 100644
index c2db484c..00000000
--- a/src/drivers/test/spi_fixture.hpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include "catch2/catch.hpp"
-#include "spi.hpp"
-
-class SpiFixture {
- public:
- SpiFixture() { REQUIRE(drivers::init_spi() == ESP_OK); }
- ~SpiFixture() { drivers::deinit_spi(); }
-};