TEST_AND_RETURN
TEST_AND_RETURN(fDirectBitmap == NULL, "Could not create direct draw bitmap!", false);
TEST_AND_RETURN(picture == NULL, "Picture could not be recorded!", false);
TEST_AND_RETURN(picture == NULL, "Picture could not be flattened and unflattened!", false);
TEST_AND_RETURN(fBitmapFromPicture == NULL, "Could not create bitmap from original picture!", false);
TEST_AND_RETURN(fBitmapFromRestoredPicture == NULL, "Could not create bitmap from archived picture!", false);
TEST_AND_RETURN(bitmap.InitCheck() != B_OK, "Offscreen bitmap for direct drawing could not be created!" , NULL);
TEST_AND_RETURN(bitmap.InitCheck() != B_OK, "Offscreen bitmap for picture recording could not be created!" , NULL);
TEST_AND_RETURN(bitmap.InitCheck() != B_OK, "Offscreen bitmap for picture drawing could not be created!" , NULL);
TEST_AND_RETURN(data == NULL, "BMallocIO could not be allocated for flattening the picture!" , NULL);
TEST_AND_RETURN(archivedPicture == NULL, "BPicture could not be allocated for unflattening the picture!" , NULL);
TEST_AND_RETURN(picture->Archive(&archive) != B_OK, "Picture could not be archived to BMessage", NULL);
TEST_AND_RETURN(archivable == NULL, "Picture could not be instantiated from BMessage", NULL);
TEST_AND_RETURN(archivedPicture == NULL, "Picture could not be restored from BMessage", NULL);