diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-05-12 10:30:07 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-05-12 10:30:07 +1000 |
| commit | 961c8014ada037712e8c72f23430362e9f14c1ec (patch) | |
| tree | ce13e0a00fc0d0318d46e6dfbecf2360b4cc5e14 /test/fixtures | |
| parent | 10eb120878e01579bff2fdfab7bef59639b21155 (diff) | |
| download | tangara-fw-961c8014ada037712e8c72f23430362e9f14c1ec.tar.gz | |
Add some basic tests for the database
Diffstat (limited to 'test/fixtures')
| -rw-r--r-- | test/fixtures/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | test/fixtures/i2c_fixture.hpp | 10 | ||||
| -rw-r--r-- | test/fixtures/spi_fixture.hpp | 10 |
3 files changed, 21 insertions, 0 deletions
diff --git a/test/fixtures/CMakeLists.txt b/test/fixtures/CMakeLists.txt new file mode 100644 index 00000000..fd98a7cd --- /dev/null +++ b/test/fixtures/CMakeLists.txt @@ -0,0 +1 @@ +idf_component_register(INCLUDE_DIRS "." REQUIRES drivers) diff --git a/test/fixtures/i2c_fixture.hpp b/test/fixtures/i2c_fixture.hpp new file mode 100644 index 00000000..54794591 --- /dev/null +++ b/test/fixtures/i2c_fixture.hpp @@ -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(); } +}; diff --git a/test/fixtures/spi_fixture.hpp b/test/fixtures/spi_fixture.hpp new file mode 100644 index 00000000..c2db484c --- /dev/null +++ b/test/fixtures/spi_fixture.hpp @@ -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(); } +}; |
