Skip to content

Commit

Permalink
tests: internal: stream_processor: use more succint check for TEST_CH…
Browse files Browse the repository at this point in the history
…ECK.

Signed-off-by: Phillip Whelan <[email protected]>
  • Loading branch information
pwhelan authored and edsiper committed Sep 4, 2023
1 parent 2ea29bb commit c625ad7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/internal/stream_processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,7 @@ static void test_window()
for (t = 0; t < check->window_size_sec + check->window_hop_sec; t++) {
ret = snprintf(datafile, sizeof(datafile)-1, "%s%d.mp",
DATA_SAMPLES_HOPPING_WINDOW_PATH, t + 1);
TEST_CHECK(ret <= sizeof(datafile)-1);

if (ret > sizeof(datafile)-1) {
if (!TEST_CHECK(ret <= sizeof(datafile)-1)) {
exit(1);
}
ret = file_to_buf(datafile, &data_buf);
Expand Down Expand Up @@ -674,9 +672,7 @@ static void test_snapshot()

ret = snprintf(datafile, sizeof(datafile)-1, "%s%d.mp",
DATA_SAMPLES_HOPPING_WINDOW_PATH, t + 1);
TEST_CHECK(ret <= sizeof(datafile)-1);

if (ret > sizeof(datafile)-1) {
if (!TEST_CHECK(ret <= sizeof(datafile)-1)) {
exit(1);
}

Expand Down

0 comments on commit c625ad7

Please sign in to comment.