From 8db57d6dc5cf5c83cffd393a37ca37bc1a67f1af Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 25 Jun 2024 15:23:51 +1000 Subject: Unbreak the tests build --- src/drivers/test/test_storage.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 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 f97a0a85..5af40052 100644 --- a/src/drivers/test/test_storage.cpp +++ b/src/drivers/test/test_storage.cpp @@ -22,31 +22,31 @@ namespace drivers { -static const std::pmr::string kTestFilename = "test"; -static const std::pmr::string kTestFilePath = - std::pmr::string(kStoragePath) + "/" + kTestFilename; +static const std::string kTestFilename = "test"; +static const std::string kTestFilePath = + std::string(kStoragePath) + "/" + kTestFilename; TEST_CASE("sd card storage", "[integration]") { I2CFixture i2c; SpiFixture spi; - IGpios expander; + std::unique_ptr gpios{Gpios::Create(false)}; { - std::unique_ptr result(SdStorage::create(&expander).value()); + std::unique_ptr result(SdStorage::Create(*gpios).value()); SECTION("write to a file") { { std::ofstream test_file; - test_file.open(kTestFilePath.c_str()); + test_file.open(kTestFilePath); test_file << "hello here is some test"; test_file.close(); } SECTION("read from a file") { std::ifstream test_file; - test_file.open(kTestFilePath.c_str()); + test_file.open(kTestFilePath); - std::pmr::string line; + std::string line; REQUIRE(std::getline(test_file, line)); REQUIRE(line == "hello here is some test"); -- cgit v1.2.3