Merge pull request #7696 from aashishc1988/wizwiki_iar_error

skip the flashsim test if not enough memory cannot be allocated for it.
pull/8261/head
Martin Kojtal 2018-09-26 15:08:23 +02:00 committed by GitHub
commit 37654e546a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,11 @@ static const uint8_t blank = 0xFF;
// Simple test for all APIs
void functionality_test()
{
uint8_t *dummy = new (std::nothrow) uint8_t[num_blocks * erase_size];
TEST_SKIP_UNLESS_MESSAGE(dummy, "Not enough memory for test");
delete[] dummy;
HeapBlockDevice heap_bd(num_blocks * erase_size, read_size, prog_size, erase_size);
FlashSimBlockDevice bd(&heap_bd, blank);