From 37041b810fbd10aab0834a33ae1dbd9edbb8bcb9 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 9 Nov 2022 16:28:19 +1100 Subject: Add so many tests i am going to die --- src/drivers/test/test_dac.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/drivers/test/test_dac.cpp (limited to 'src/drivers/test/test_dac.cpp') diff --git a/src/drivers/test/test_dac.cpp b/src/drivers/test/test_dac.cpp new file mode 100644 index 00000000..aa7a521c --- /dev/null +++ b/src/drivers/test/test_dac.cpp @@ -0,0 +1,21 @@ +#include +#include "dac.hpp" +#include "gpio-expander.hpp" +#include "i2c.hpp" +#include "i2c_fixture.hpp" + +#include "catch2/catch.hpp" + +namespace drivers { + +TEST_CASE("dac configuration", "[integration]") { + I2CFixture i2c; + GpioExpander expander; + std::unique_ptr dac = AudioDac::create(&expander).value(); + + auto power_state = dac->ReadPowerState(); + + REQUIRE(power_state.first == true); // booted +} + +} // namespace drivers -- cgit v1.2.3