Commit f4dd6cbb authored by Mathis Rosenhauer's avatar Mathis Rosenhauer Committed by Thomas Jahns
Browse files

Check coloring

parent be6f02ca
AUTOMAKE_OPTIONS = color-tests
AM_CPPFLAGS = -I$(top_srcdir)/src AM_CPPFLAGS = -I$(top_srcdir)/src
TESTS = check_code_options check_buffer_sizes TESTS = check_code_options check_buffer_sizes
check_LTLIBRARIES = libcheck_aec.la check_LTLIBRARIES = libcheck_aec.la
......
...@@ -173,7 +173,7 @@ int encode_decode_small(struct test_state *state) ...@@ -173,7 +173,7 @@ int encode_decode_small(struct test_state *state)
} }
if (memcmp(state->ubuf, state->obuf, state->ibuf_len)) { if (memcmp(state->ubuf, state->obuf, state->ibuf_len)) {
printf("FAIL: Uncompressed output differs from input.\n"); printf("\n%s: Uncompressed output differs from input.\n", CHECK_FAIL);
printf("\nuncompressed buf"); printf("\nuncompressed buf");
for (i = 0; i < 80; i++) { for (i = 0; i < 80; i++) {
...@@ -243,7 +243,7 @@ int encode_decode_large(struct test_state *state) ...@@ -243,7 +243,7 @@ int encode_decode_large(struct test_state *state)
} }
if (memcmp(state->ubuf, state->obuf, state->ibuf_len)) { if (memcmp(state->ubuf, state->obuf, state->ibuf_len)) {
printf("FAIL: Uncompressed output differs from input.\n"); printf("\n%s: Uncompressed output differs from input.\n", CHECK_FAIL);
printf("\nuncompressed buf"); printf("\nuncompressed buf");
for (i = 0; i < 80; i++) { for (i = 0; i < 80; i++) {
......
...@@ -22,5 +22,7 @@ int update_state(struct test_state *state); ...@@ -22,5 +22,7 @@ int update_state(struct test_state *state);
int encode_decode_small(struct test_state *state); int encode_decode_small(struct test_state *state);
int encode_decode_large(struct test_state *state); int encode_decode_large(struct test_state *state);
#define CHECK_OK "" #define CHECK_PASS "PASS"
#define CHECK_FAIL "FAIL"
#endif /* CHECK_AEC_H */ #endif /* CHECK_AEC_H */
...@@ -65,14 +65,14 @@ int check_rsi(struct test_state *state) ...@@ -65,14 +65,14 @@ int check_rsi(struct test_state *state)
if (status) if (status)
return status; return status;
printf ("OK\n"); printf ("%s\n", CHECK_PASS);
printf("Checking short rsi ... "); printf("Checking short rsi ... ");
status = check_block_sizes_short(state); status = check_block_sizes_short(state);
if (status) if (status)
return status; return status;
printf ("OK\n"); printf ("%s\n", CHECK_PASS);
return 0; return 0;
} }
......
...@@ -25,8 +25,8 @@ int check_block_sizes(struct test_state *state, int id, int id_len) ...@@ -25,8 +25,8 @@ int check_block_sizes(struct test_state *state, int id, int id_len)
return status; return status;
if ((state->cbuf[0] >> (8 - id_len)) != id) { if ((state->cbuf[0] >> (8 - id_len)) != id) {
printf("FAIL: Unexpected block of size %i created ID:%x.\n", printf("%s: Unexpected block of size %i created ID:%x.\n",
bs, state->cbuf[0] >> (8 - id_len)); CHECK_FAIL, bs, state->cbuf[0] >> (8 - id_len));
return 99; return 99;
} }
} }
...@@ -45,7 +45,7 @@ int check_zero(struct test_state *state) ...@@ -45,7 +45,7 @@ int check_zero(struct test_state *state)
if (status) if (status)
return status; return status;
printf ("OK\n"); printf ("%s\n", CHECK_PASS);
return 0; return 0;
} }
...@@ -70,7 +70,7 @@ int check_splitting(struct test_state *state, int k) ...@@ -70,7 +70,7 @@ int check_splitting(struct test_state *state, int k)
if (status) if (status)
return status; return status;
printf ("OK\n"); printf ("%s\n", CHECK_PASS);
return 0; return 0;
} }
...@@ -95,7 +95,7 @@ int check_uncompressed(struct test_state *state) ...@@ -95,7 +95,7 @@ int check_uncompressed(struct test_state *state)
if (status) if (status)
return status; return status;
printf ("OK\n"); printf ("%s\n", CHECK_PASS);
return 0; return 0;
} }
...@@ -120,7 +120,7 @@ int check_fs(struct test_state *state) ...@@ -120,7 +120,7 @@ int check_fs(struct test_state *state)
if (status) if (status)
return status; return status;
printf ("OK\n"); printf ("%s\n", CHECK_PASS);
return 0; return 0;
} }
...@@ -149,7 +149,7 @@ int check_se(struct test_state *state) ...@@ -149,7 +149,7 @@ int check_se(struct test_state *state)
if (status) if (status)
return status; return status;
printf ("OK\n"); printf ("%s\n", CHECK_PASS);
return 0; return 0;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment