+ printf("testing FLAC__metadata_object_vorbiscomment_insert_comment(copy) on end of non-empty array...");
+ vc_insert_new_(&entry, vorbiscomment, 4, "name3=field3dup1");
+ if(!FLAC__metadata_object_vorbiscomment_insert_comment(block, 4, entry, /*copy=*/true)) {
+ printf("FAILED, returned false\n");
+ return false;
+ }
+ if(!mutils__compare_block(vorbiscomment, block))
+ return false;
+ printf("OK\n");
+
+ printf("testing FLAC__metadata_object_vorbiscomment_insert_comment(copy) on end of non-empty array...");
+ vc_insert_new_(&entry, vorbiscomment, 5, "name3=field3dup1");
+ if(!FLAC__metadata_object_vorbiscomment_insert_comment(block, 5, entry, /*copy=*/true)) {
+ printf("FAILED, returned false\n");
+ return false;
+ }
+ if(!mutils__compare_block(vorbiscomment, block))
+ return false;
+ printf("OK\n");
+
+ printf("testing FLAC__metadata_object_vorbiscomment_find_entry_from()...");
+ if((j = FLAC__metadata_object_vorbiscomment_find_entry_from(block, 0, "name3")) != 1) {
+ printf("FAILED, expected 1, got %d\n", j);
+ return false;
+ }
+ printf("OK\n");
+
+ printf("testing FLAC__metadata_object_vorbiscomment_find_entry_from()...");
+ if((j = FLAC__metadata_object_vorbiscomment_find_entry_from(block, j+1, "name3")) != 4) {
+ printf("FAILED, expected 4, got %d\n", j);
+ return false;
+ }
+ printf("OK\n");
+
+ printf("testing FLAC__metadata_object_vorbiscomment_find_entry_from()...");
+ if((j = FLAC__metadata_object_vorbiscomment_find_entry_from(block, j+1, "name3")) != 5) {
+ printf("FAILED, expected 5, got %d\n", j);
+ return false;
+ }
+ printf("OK\n");
+
+ printf("testing FLAC__metadata_object_vorbiscomment_find_entry_from()...");
+ if((j = FLAC__metadata_object_vorbiscomment_find_entry_from(block, 0, "name2")) != 0) {
+ printf("FAILED, expected 0, got %d\n", j);
+ return false;
+ }
+ printf("OK\n");
+
+ printf("testing FLAC__metadata_object_vorbiscomment_find_entry_from()...");
+ if((j = FLAC__metadata_object_vorbiscomment_find_entry_from(block, j+1, "name2")) != -1) {
+ printf("FAILED, expected -1, got %d\n", j);
+ return false;
+ }
+ printf("OK\n");
+
+ printf("testing FLAC__metadata_object_vorbiscomment_find_entry_from()...");
+ if((j = FLAC__metadata_object_vorbiscomment_find_entry_from(block, 0, "blah")) != -1) {
+ printf("FAILED, expected -1, got %d\n", j);
+ return false;
+ }
+ printf("OK\n");
+
+ printf("testing FLAC__metadata_object_vorbiscomment_replace_comment(first, copy)...");
+ vc_replace_new_(&entry, vorbiscomment, "name3=field3new1", /*all=*/false);
+ if(!FLAC__metadata_object_vorbiscomment_replace_comment(block, entry, /*all=*/false, /*copy=*/true)) {
+ printf("FAILED, returned false\n");
+ return false;
+ }
+ if(!mutils__compare_block(vorbiscomment, block))
+ return false;
+ if(block->data.vorbis_comment.num_comments != 6) {
+ printf("FAILED, expected 6 comments, got %u\n", block->data.vorbis_comment.num_comments);
+ return false;
+ }
+ printf("OK\n");
+
+ printf("testing FLAC__metadata_object_vorbiscomment_replace_comment(all, copy)...");
+ vc_replace_new_(&entry, vorbiscomment, "name3=field3new2", /*all=*/true);
+ if(!FLAC__metadata_object_vorbiscomment_replace_comment(block, entry, /*all=*/true, /*copy=*/true)) {
+ printf("FAILED, returned false\n");
+ return false;
+ }
+ if(!mutils__compare_block(vorbiscomment, block))
+ return false;
+ if(block->data.vorbis_comment.num_comments != 4) {
+ printf("FAILED, expected 4 comments, got %u\n", block->data.vorbis_comment.num_comments);
+ return false;
+ }
+ printf("OK\n");
+