• Home
  • Raw
  • Download

Lines Matching refs:test_partition

111   FlashPartition& test_partition = FlashTestPartition();  in TEST()  local
113 ASSERT_GE(kMaxFlashAlignment, test_partition.alignment_bytes()); in TEST()
117 WriteData(test_partition, 0); in TEST()
119 WriteData(test_partition, 0xff); in TEST()
121 WriteData(test_partition, 0x55); in TEST()
123 WriteData(test_partition, 0xa3); in TEST()
131 FlashPartition& test_partition = FlashTestPartition(); in TEST() local
137 ASSERT_GE(kMaxFlashAlignment, test_partition.alignment_bytes()); in TEST()
140 std::min(sizeof(test_data), test_partition.sector_size_bytes()); in TEST()
143 ASSERT_EQ(OkStatus(), test_partition.Erase(0, test_partition.sector_count())); in TEST()
146 for (size_t sector_index = 0; sector_index < test_partition.sector_count(); in TEST()
149 sector_index * test_partition.sector_size_bytes(); in TEST()
151 StatusWithSize status = test_partition.Write(address, as_bytes(data_span)); in TEST()
158 ASSERT_EQ(OkStatus(), test_partition.IsErased(&is_erased)); in TEST()
161 ASSERT_EQ(OkStatus(), test_partition.Erase()); in TEST()
165 ASSERT_EQ(OkStatus(), test_partition.IsErased(&is_erased)); in TEST()
169 for (size_t sector_index = 0; sector_index < test_partition.sector_count(); in TEST()
172 sector_index * test_partition.sector_size_bytes(); in TEST()
175 test_partition.Read(address, data_span.size_bytes(), data_span.data()); in TEST()
179 EXPECT_EQ(true, test_partition.AppearsErased(as_bytes(data_span))); in TEST()
184 FlashPartition& test_partition = FlashTestPartition(); in TEST() local
185 const size_t alignment = test_partition.alignment_bytes(); in TEST()
186 const size_t sector_size_bytes = test_partition.sector_size_bytes(); in TEST()
199 FlashPartition& test_partition = FlashTestPartition(); in TEST() local
202 if (test_partition.alignment_bytes() == 1) { in TEST()
207 test_partition.Write(1, source_data); in TEST()
212 FlashPartition& test_partition = FlashTestPartition(); in TEST() local
215 if (test_partition.alignment_bytes() == 1) { in TEST()
220 test_partition.Write(0, source_data); in TEST()
225 FlashPartition& test_partition = FlashTestPartition(); in TEST() local
228 if (test_partition.sector_size_bytes() == 1) { in TEST()
233 test_partition.Erase(1, 1); in TEST()
239 FlashPartition& test_partition = FlashTestPartition(); in TEST() local
240 const size_t alignment = test_partition.alignment_bytes(); in TEST()
243 ASSERT_GE(test_partition.size_bytes(), 3 * kMaxFlashAlignment); in TEST()
245 ASSERT_EQ(OkStatus(), test_partition.Erase()); in TEST()
248 ASSERT_EQ(OkStatus(), test_partition.IsErased(&is_erased)); in TEST()
257 StatusWithSize status = test_partition.Write(alignment, as_bytes(data_span)); in TEST()
261 EXPECT_EQ(OkStatus(), test_partition.IsErased(&is_erased)); in TEST()
266 test_partition.IsRegionErased( in TEST()
272 test_partition.IsRegionErased(0, 2 * alignment, &is_erased)); in TEST()
278 test_partition.IsRegionErased(0, alignment, &is_erased)); in TEST()