File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
TESTS/storage_abstraction/basicAPI Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -869,6 +869,11 @@ control_t test_programDataWithMultipleProgramUnits(const size_t call_count)
869
869
return CaseNext; /* first block isn't large enough for the intended operation */
870
870
}
871
871
872
+ if (rangeNeededForTest > BUFFER_SIZE) {
873
+ printf (" buffer (%u) not large enough; rangeNeededForTest: %u\n " , BUFFER_SIZE, rangeNeededForTest);
874
+ return CaseNext;
875
+ }
876
+
872
877
// printf("erasing %u bytes at addr %lu\n", rangeNeededForTest, (uint32_t)firstBlock.addr);
873
878
rc = drv->Erase (firstBlock.addr , rangeNeededForTest);
874
879
TEST_ASSERT (rc >= 0 );
@@ -878,8 +883,6 @@ control_t test_programDataWithMultipleProgramUnits(const size_t call_count)
878
883
} else {
879
884
TEST_ASSERT_EQUAL (rangeNeededForTest, rc);
880
885
881
- TEST_ASSERT ((N_UNITS * info.program_unit ) <= BUFFER_SIZE);
882
-
883
886
/* setup byte pattern in buffer */
884
887
static const uint32_t BYTE_PATTERN = 0xABCDEF00 ;
885
888
if (info.program_unit >= sizeof (BYTE_PATTERN)) {
You can’t perform that action at this time.
0 commit comments