Skip to content

Commit

Permalink
use stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Jul 17, 2024
1 parent 96d14f7 commit 1cc7d79
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Tests/MP3DecoderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void runMp3TwoPieceTestWithBackend(int backend) {
char path[PATH_MAX];
snprintf (path, sizeof (path), "%s/TestData/chirp-1sec.mp3", dbplugindir);

printf("test file path: %s\n", dbplugindir);
fprintf(stderr, "test file path: %s\n", dbplugindir);

playlist_t *plt = plt_alloc ("testplt");

Expand All @@ -51,7 +51,7 @@ static void runMp3TwoPieceTestWithBackend(int backend) {

// request twice as much to make sure we don't overshoot
int res = dec->read (fi, buffer, (int)size*2);
printf("res[1]: %d\n", res);
fprintf(stderr, "res[1]: %d\n", res);

EXPECT_EQ(res, size);

Expand All @@ -61,12 +61,12 @@ static void runMp3TwoPieceTestWithBackend(int backend) {
dec->seek_sample (fi, 0);

res = dec->read (fi, buffer2, (int)size/2);
printf("res[2]: %d\n", res);
fprintf(stderr, "res[2]: %d\n", res);
EXPECT_EQ(res, size/2);

dec->seek_sample (fi, 44100/2);
res = dec->read (fi, buffer2+size/2, (int)size);
printf("res[3]: %d\n", res);
fprintf(stderr, "res[3]: %d\n", res);
EXPECT_EQ(res, size/2);

#if 0
Expand All @@ -79,15 +79,15 @@ static void runMp3TwoPieceTestWithBackend(int backend) {
#endif

int cmp1 = memcmp (buffer, buffer2, size/2);
printf("cmp1: %d\n", cmp1);
fprintf(stderr, "cmp1: %d\n", cmp1);
EXPECT_EQ(cmp1, 0);

int cmp2 = memcmp (buffer+size/2, buffer2+size/2, size/2);
printf("cmp2: %d\n", cmp1);
fprintf(stderr, "cmp2: %d\n", cmp1);
EXPECT_EQ(cmp2, 0);

int cmp = memcmp (buffer, buffer2, size);
printf("cmp: %d\n", cmp1);
fprintf(stderr, "cmp: %d\n", cmp1);

free (buffer);
free (buffer2);
Expand Down

0 comments on commit 1cc7d79

Please sign in to comment.