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
5f1ed966
Commit
5f1ed966
authored
Aug 14, 2012
by
Pieter Noordhuis
Browse files
Order of includes doesn't matter in tests either
parent
d0b6b9ab
Changes
9
Hide whitespace changes
Inline
Side-by-side
test/net-helper.c
View file @
5f1ed966
#include <stdlib.h>
#include <errno.h>
#include <netinet/tcp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <sys/types.h>
#include "net-helper.h"
void
run_server
(
void
*
ptr
)
{
...
...
test/spawn.c
View file @
5f1ed966
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/wait.h>
#include <
signal
.h>
#include <assert.h>
#include <
unistd
.h>
#include "spawn.h"
int
pidc
=
0
;
...
...
test/test-context.c
View file @
5f1ed966
/* misc */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <assert.h>
#include <errno.h>
/* inet_pton */
#include <arpa/inet.h>
/* getaddrinfo */
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
/* close */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
/* local */
#include "context.h"
#include "net-helper.h"
#include "object.h"
#include "test-helper.h"
#include "net-helper.h"
#define SETUP_CONNECT() \
redis_context c; \
...
...
test/test-format.c
View file @
5f1ed966
/* misc */
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
/* local */
#include "format.h"
#include "test-helper.h"
...
...
test/test-handle.c
View file @
5f1ed966
/* misc */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <assert.h>
#include <errno.h>
/* inet_pton */
#include <arpa/inet.h>
/* getaddrinfo */
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
/* local */
#include "handle.h"
#include "test-helper.h"
...
...
test/test-helper.h
View file @
5f1ed966
#ifndef _TEST_HELPER_H
#define _TEST_HELPER_H 1
#include <assert.h>
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <assert.h>
#include <errno.h>
/* gai_strerror */
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
/* local */
#include "spawn.h"
#include "handle.h"
#include "spawn.h"
#ifdef __GNUC__
#define UNUSED __attribute__ ((unused))
...
...
test/test-object.c
View file @
5f1ed966
/* misc */
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* local */
#include "test-helper.h"
#include "parser.h"
#include "object.h"
#include "parser.h"
#include "test-helper.h"
void
test_string
(
redis_parser
*
parser
)
{
const
char
*
buf
=
"$5
\r\n
hello
\r\n
"
;
...
...
test/test-parser.c
View file @
5f1ed966
/* misc */
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
/* local */
#include "test-helper.h"
#include "parser.h"
#include "sds.h"
#include "test-helper.h"
typedef
struct
log_entry_s
log_entry_t
;
...
...
test/test-request.c
View file @
5f1ed966
/* misc */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* local */
#include "request.h"
#include "test-helper.h"
...
...
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