diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-05-09 11:20:57 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-05-09 11:20:57 +1000 |
| commit | d739edef761f3bf576dc45da6611279a3f68596e (patch) | |
| tree | 96545a7e590583cd39fd607805985f7e87957e87 /src/drivers/test/test_storage.cpp | |
| parent | 16e6180ba7946119538d03463ea7d37fccc4dcb3 (diff) | |
| download | tangara-fw-d739edef761f3bf576dc45da6611279a3f68596e.tar.gz | |
Fix tests!
Includes removing some that never passed and/or weren't quite a good
idea
Diffstat (limited to 'src/drivers/test/test_storage.cpp')
| -rw-r--r-- | src/drivers/test/test_storage.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
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<SdStorage> result = SdStorage::create(&expander).value(); + std::unique_ptr<SdStorage> 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 |
