Skip to content

Commit 37654e5

Browse files
authored
Merge pull request #7696 from aashishc1988/wizwiki_iar_error
skip the flashsim test if not enough memory cannot be allocated for it.
2 parents c10a9b5 + 887aafe commit 37654e5

File tree

1 file changed

+5
-0
lines changed
  • features/storage/TESTS/blockdevice/flashsim_block_device

1 file changed

+5
-0
lines changed

features/storage/TESTS/blockdevice/flashsim_block_device/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ static const uint8_t blank = 0xFF;
3434
// Simple test for all APIs
3535
void functionality_test()
3636
{
37+
38+
uint8_t *dummy = new (std::nothrow) uint8_t[num_blocks * erase_size];
39+
TEST_SKIP_UNLESS_MESSAGE(dummy, "Not enough memory for test");
40+
delete[] dummy;
41+
3742
HeapBlockDevice heap_bd(num_blocks * erase_size, read_size, prog_size, erase_size);
3843
FlashSimBlockDevice bd(&heap_bd, blank);
3944

0 commit comments

Comments
 (0)