@@ -250,13 +250,10 @@ void msd_process(USBMSD *msd)
250
250
*/
251
251
void storage_init ()
252
252
{
253
- if (mbed_heap_size >= MIN_HEAP_SIZE) {
254
- FATFileSystem::format (get_heap_block_device ());
255
- bool result = prepare_storage (get_heap_block_device (), &heap_fs);
256
- TEST_ASSERT_MESSAGE (result, " heap storage initialisation failed" );
257
- } else {
258
- utest_printf (" Not enough heap memory for HeapBlockDevice creation. Heap block device init skipped!!!\n " );
259
- }
253
+ TEST_ASSERT_MESSAGE (mbed_heap_size >= MIN_HEAP_SIZE, " Not enough heap memory for HeapBlockDevice creation" );
254
+ FATFileSystem::format (get_heap_block_device ());
255
+ bool result = prepare_storage (get_heap_block_device (), &heap_fs);
256
+ TEST_ASSERT_MESSAGE (result, " heap storage initialisation failed" );
260
257
}
261
258
262
259
/* * Test mass storage device mount and unmount
@@ -428,19 +425,13 @@ void mount_unmount_and_data_test(BlockDevice *bd, FileSystem *fs)
428
425
429
426
void heap_block_device_mount_unmount_test ()
430
427
{
431
- if (mbed_heap_size < MIN_HEAP_SIZE) {
432
- TEST_SKIP_MESSAGE (" Not enough heap memory for HeapBlockDevice creation" );
433
- return ;
434
- }
428
+ TEST_ASSERT_MESSAGE (mbed_heap_size >= MIN_HEAP_SIZE, " Not enough heap memory for HeapBlockDevice creation" );
435
429
mount_unmount_test<3 >(get_heap_block_device (), &heap_fs);
436
430
}
437
431
438
432
void heap_block_device_mount_unmount_and_data_test ()
439
433
{
440
- if (mbed_heap_size < MIN_HEAP_SIZE) {
441
- TEST_SKIP_MESSAGE (" Not enough heap memory for HeapBlockDevice creation" );
442
- return ;
443
- }
434
+ TEST_ASSERT_MESSAGE (mbed_heap_size >= MIN_HEAP_SIZE, " Not enough heap memory for HeapBlockDevice creation" );
444
435
mount_unmount_and_data_test (get_heap_block_device (), &heap_fs);
445
436
}
446
437
0 commit comments