Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathis Rosenhauer
libaec
Commits
f4dd6cbb
Commit
f4dd6cbb
authored
Nov 29, 2012
by
Mathis Rosenhauer
Committed by
Thomas Jahns
Feb 19, 2013
Browse files
Check coloring
parent
be6f02ca
Changes
5
Show whitespace changes
Inline
Side-by-side
tests/Makefile.am
View file @
f4dd6cbb
AUTOMAKE_OPTIONS
=
color-tests
AM_CPPFLAGS
=
-I
$(top_srcdir)
/src
TESTS
=
check_code_options check_buffer_sizes
check_LTLIBRARIES
=
libcheck_aec.la
...
...
tests/check_aec.c
View file @
f4dd6cbb
...
...
@@ -173,7 +173,7 @@ int encode_decode_small(struct test_state *state)
}
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
(
"
\n
uncompressed buf"
);
for
(
i
=
0
;
i
<
80
;
i
++
)
{
...
...
@@ -243,7 +243,7 @@ int encode_decode_large(struct test_state *state)
}
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
(
"
\n
uncompressed buf"
);
for
(
i
=
0
;
i
<
80
;
i
++
)
{
...
...
tests/check_aec.h
View file @
f4dd6cbb
...
...
@@ -22,5 +22,7 @@ int update_state(struct test_state *state);
int
encode_decode_small
(
struct
test_state
*
state
);
int
encode_decode_large
(
struct
test_state
*
state
);
#define CHECK_OK ""
#define CHECK_PASS "[0;32mPASS[0m"
#define CHECK_FAIL "[0;31mFAIL[0m"
#endif
/* CHECK_AEC_H */
tests/check_buffer_sizes.c
View file @
f4dd6cbb
...
...
@@ -65,14 +65,14 @@ int check_rsi(struct test_state *state)
if
(
status
)
return
status
;
printf
(
"
OK
\n
"
);
printf
(
"
%s
\n
"
,
CHECK_PASS
);
printf
(
"Checking short rsi ... "
);
status
=
check_block_sizes_short
(
state
);
if
(
status
)
return
status
;
printf
(
"
OK
\n
"
);
printf
(
"
%s
\n
"
,
CHECK_PASS
);
return
0
;
}
...
...
tests/check_code_options.c
View file @
f4dd6cbb
...
...
@@ -25,8 +25,8 @@ int check_block_sizes(struct test_state *state, int id, int id_len)
return
status
;
if
((
state
->
cbuf
[
0
]
>>
(
8
-
id_len
))
!=
id
)
{
printf
(
"
FAIL
: Unexpected block of size %i created ID:%x.
\n
"
,
bs
,
state
->
cbuf
[
0
]
>>
(
8
-
id_len
));
printf
(
"
%s
: Unexpected block of size %i created ID:%x.
\n
"
,
CHECK_FAIL
,
bs
,
state
->
cbuf
[
0
]
>>
(
8
-
id_len
));
return
99
;
}
}
...
...
@@ -45,7 +45,7 @@ int check_zero(struct test_state *state)
if
(
status
)
return
status
;
printf
(
"
OK
\n
"
);
printf
(
"
%s
\n
"
,
CHECK_PASS
);
return
0
;
}
...
...
@@ -70,7 +70,7 @@ int check_splitting(struct test_state *state, int k)
if
(
status
)
return
status
;
printf
(
"
OK
\n
"
);
printf
(
"
%s
\n
"
,
CHECK_PASS
);
return
0
;
}
...
...
@@ -95,7 +95,7 @@ int check_uncompressed(struct test_state *state)
if
(
status
)
return
status
;
printf
(
"
OK
\n
"
);
printf
(
"
%s
\n
"
,
CHECK_PASS
);
return
0
;
}
...
...
@@ -120,7 +120,7 @@ int check_fs(struct test_state *state)
if
(
status
)
return
status
;
printf
(
"
OK
\n
"
);
printf
(
"
%s
\n
"
,
CHECK_PASS
);
return
0
;
}
...
...
@@ -149,7 +149,7 @@ int check_se(struct test_state *state)
if
(
status
)
return
status
;
printf
(
"
OK
\n
"
);
printf
(
"
%s
\n
"
,
CHECK_PASS
);
return
0
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment