Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
b5219397
Commit
b5219397
authored
Jul 10, 2011
by
Pieter Noordhuis
Browse files
Colorize test outcome
parent
e40daec2
Changes
1
Hide whitespace changes
Inline
Side-by-side
test.c
View file @
b5219397
...
...
@@ -32,7 +32,7 @@ struct config {
/* The following lines make up our testing "framework" :) */
static
int
tests
=
0
,
fails
=
0
;
#define test(_s) { printf("#%02d ", ++tests); printf(_s); }
#define test_cond(_c) if(_c) printf("
PASSED\n"); else {printf("FAILED
\n"); fails++;}
#define test_cond(_c) if(_c) printf("
\033[0;32mPASSED\033[0;0m\n"); else {printf("\033[0;31mFAILED\033[0;0m
\n"); fails++;}
static
long
long
usec
(
void
)
{
struct
timeval
tv
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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