From d739edef761f3bf576dc45da6611279a3f68596e Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 9 May 2023 11:20:57 +1000 Subject: Fix tests! Includes removing some that never passed and/or weren't quite a good idea --- src/drivers/test/test_storage.cpp | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'src/drivers/test/test_storage.cpp') diff --git a/src/drivers/test/test_storage.cpp b/src/drivers/test/test_storage.cpp index 627fa615..54f9a467 100644 --- a/src/drivers/test/test_storage.cpp +++ b/src/drivers/test/test_storage.cpp @@ -26,7 +26,7 @@ TEST_CASE("sd card storage", "[integration]") { GpioExpander expander; { - std::unique_ptr result = SdStorage::create(&expander).value(); + std::unique_ptr result(SdStorage::create(&expander).value()); SECTION("write to a file") { { @@ -70,30 +70,4 @@ TEST_CASE("sd card storage", "[integration]") { } } -// Failing due to hardware issue. Re-enable in R2. -TEST_CASE("sd card mux", "[integration][!mayfail]") { - I2CFixture i2c; - SpiFixture spi; - GpioExpander expander; - - SECTION("accessible when switched on") { - expander.with([&](auto& gpio) { - gpio.set_pin(GpioExpander::SD_MUX_SWITCH, GpioExpander::SD_MUX_ESP); - }); - - auto result = SdStorage::create(&expander); - REQUIRE(result.has_value()); - } - - SECTION("inaccessible when switched off") { - expander.with([&](auto& gpio) { - gpio.set_pin(GpioExpander::SD_MUX_SWITCH, GpioExpander::SD_MUX_USB); - }); - - auto result = SdStorage::create(&expander); - REQUIRE(result.has_error()); - REQUIRE(result.error() == SdStorage::FAILED_TO_READ); - } -} - } // namespace drivers -- cgit v1.2.3