aboutsummaryrefslogtreecommitdiff
path: root/pw_kvs/flash_partition_test.cc
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2023-08-14 15:38:30 -0700
committerXin Li <delphij@google.com>2023-08-14 15:38:30 -0700
commitbddf63953e111d742b591c1c0c7c34bcda8a51c7 (patch)
tree3a93128bff4b737b24b0c9581922c0b20410f0f4 /pw_kvs/flash_partition_test.cc
parentee890da55c82b95deca3518d5f3777e3d8ca9f0e (diff)
parentfbb9890f8922aa55fde183655a0017e69127ea4b (diff)
downloadpigweed-bddf63953e111d742b591c1c0c7c34bcda8a51c7.tar.gz
Merge Android U (ab/10368041)tmp_amf_298295554
Bug: 291102124 Merged-In: I10c41adb8fe3e126cfa4ff2f49b15863fff379de Change-Id: I66f7a6cccaafc173d3924dae62a736c6c53520c7
Diffstat (limited to 'pw_kvs/flash_partition_test.cc')
-rw-r--r--pw_kvs/flash_partition_test.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/pw_kvs/flash_partition_test.cc b/pw_kvs/flash_partition_test.cc
index fbe4503c6..3d2cc680b 100644
--- a/pw_kvs/flash_partition_test.cc
+++ b/pw_kvs/flash_partition_test.cc
@@ -13,13 +13,13 @@
// the License.
#include <algorithm>
-#include <span>
#include "gtest/gtest.h"
#include "pw_kvs/flash_memory.h"
#include "pw_kvs/flash_test_partition.h"
#include "pw_kvs_private/config.h"
#include "pw_log/log.h"
+#include "pw_span/span.h"
namespace pw::kvs::PartitionTest {
namespace {
@@ -59,7 +59,7 @@ void WriteData(FlashPartition& partition, uint8_t fill_byte) {
for (size_t chunk_index = 0; chunk_index < chunks_per_sector;
chunk_index++) {
StatusWithSize status =
- partition.Write(address, as_bytes(std::span(test_data, write_size)));
+ partition.Write(address, as_bytes(span(test_data, write_size)));
ASSERT_EQ(OkStatus(), status.status());
ASSERT_EQ(write_size, status.size());
address += write_size;
@@ -145,7 +145,7 @@ TEST(FlashPartitionTest, EraseTest) {
const size_t block_size =
std::min(sizeof(test_data), test_partition.sector_size_bytes());
- auto data_span = std::span(test_data, block_size);
+ auto data_span = span(test_data, block_size);
ASSERT_EQ(OkStatus(), test_partition.Erase(0, test_partition.sector_count()));
@@ -206,7 +206,7 @@ TEST(FlashPartitionTest, AlignmentCheck) {
#define TESTING_CHECK_FAILURES_IS_SUPPORTED 0
#if TESTING_CHECK_FAILURES_IS_SUPPORTED
-// TODO: Ensure that this test triggers an assert.
+// TODO(davidrogers): Ensure that this test triggers an assert.
TEST(FlashPartitionTest, BadWriteAddressAlignment) {
FlashPartition& test_partition = FlashTestPartition();
@@ -219,7 +219,7 @@ TEST(FlashPartitionTest, BadWriteAddressAlignment) {
test_partition.Write(1, source_data);
}
-// TODO: Ensure that this test triggers an assert.
+// TODO(davidrogers): Ensure that this test triggers an assert.
TEST(FlashPartitionTest, BadWriteSizeAlignment) {
FlashPartition& test_partition = FlashTestPartition();
@@ -232,7 +232,7 @@ TEST(FlashPartitionTest, BadWriteSizeAlignment) {
test_partition.Write(0, source_data);
}
-// TODO: Ensure that this test triggers an assert.
+// TODO(davidrogers): Ensure that this test triggers an assert.
TEST(FlashPartitionTest, BadEraseAddressAlignment) {
FlashPartition& test_partition = FlashTestPartition();
@@ -264,7 +264,7 @@ TEST(FlashPartitionTest, IsErased) {
static const uint8_t fill_byte = 0x55;
uint8_t test_data[kMaxFlashAlignment];
memset(test_data, fill_byte, sizeof(test_data));
- auto data_span = std::span(test_data);
+ auto data_span = span(test_data);
// Write the chunk with fill byte.
StatusWithSize status = test_partition.Write(write_size, as_bytes(data_span));