Skip to content

Commit

Permalink
Use TEST_ERR correctly, cut beep.wav to exactly 67 ms.
Browse files Browse the repository at this point in the history
  • Loading branch information
larsimmisch committed Nov 21, 2023
1 parent c03a53e commit 1fe9857
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/aupos.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,15 @@ int test_auposition(void)
re_snprintf(path, sizeof(path), "%s/beep.wav", test_datapath());

int err = aufile_open(&af, &prm, path, AUFILE_READ);
if (err)
TEST_ERR(err);
TEST_ERR(err);

err = aufile_set_position(af, &prm, 67);
if (err)
TEST_ERR(err);
TEST_ERR(err);

/* That file is 67 ms long, so we shouldn't read anything */
size_t size = sizeof(buffer);
err = aufile_read(af, buffer, &size);
if (err)
TEST_ERR(err);
TEST_ERR(err);

TEST_EQUALS(0, size);

Expand Down
Binary file modified test/data/beep.wav
Binary file not shown.

0 comments on commit 1fe9857

Please sign in to comment.