Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
5ececcd8
Commit
5ececcd8
authored
Jan 24, 2012
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test
parent
a52ff398
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
13 deletions
+19
-13
lib/spdylay_frame.h
lib/spdylay_frame.h
+0
-2
tests/main.c
tests/main.c
+3
-2
tests/spdylay_frame_test.c
tests/spdylay_frame_test.c
+15
-9
tests/spdylay_frame_test.h
tests/spdylay_frame_test.h
+1
-0
No files found.
lib/spdylay_frame.h
View file @
5ececcd8
...
@@ -94,8 +94,6 @@ int spdylay_frame_unpack_syn_stream(spdylay_syn_stream *frame,
...
@@ -94,8 +94,6 @@ int spdylay_frame_unpack_syn_stream(spdylay_syn_stream *frame,
const
uint8_t
*
payload
,
size_t
payloadlen
,
const
uint8_t
*
payload
,
size_t
payloadlen
,
spdylay_zlib
*
inflater
);
spdylay_zlib
*
inflater
);
/*
/*
* Unpacks SYN_REPLY frame byte sequence into |frame|. This function
* Unpacks SYN_REPLY frame byte sequence into |frame|. This function
* returns 0 if it succeeds or negative error code.
* returns 0 if it succeeds or negative error code.
...
...
tests/main.c
View file @
5ececcd8
...
@@ -69,8 +69,9 @@ int main()
...
@@ -69,8 +69,9 @@ int main()
!
CU_add_test
(
pSuite
,
"session_recv"
,
test_spdylay_session_recv
)
||
!
CU_add_test
(
pSuite
,
"session_recv"
,
test_spdylay_session_recv
)
||
!
CU_add_test
(
pSuite
,
"session_add_frame"
,
!
CU_add_test
(
pSuite
,
"session_add_frame"
,
test_spdylay_session_add_frame
)
||
test_spdylay_session_add_frame
)
||
!
CU_add_test
(
pSuite
,
"frame_unpack_nv"
,
!
CU_add_test
(
pSuite
,
"frame_unpack_nv"
,
test_spdylay_frame_unpack_nv
)
||
test_spdylay_frame_unpack_nv
))
{
!
CU_add_test
(
pSuite
,
"frame_count_nv_space"
,
test_spdylay_frame_count_nv_space
))
{
CU_cleanup_registry
();
CU_cleanup_registry
();
return
CU_get_error
();
return
CU_get_error
();
}
}
...
...
tests/spdylay_frame_test.c
View file @
5ececcd8
...
@@ -28,17 +28,18 @@
...
@@ -28,17 +28,18 @@
#include "spdylay_frame.h"
#include "spdylay_frame.h"
void
test_spdylay_frame_unpack_nv
()
static
const
char
*
headers
[]
=
{
{
const
char
*
headers
[]
=
{
"method"
,
"GET"
,
"method"
,
"GET"
,
"scheme"
,
"https"
,
"scheme"
,
"https"
,
"url"
,
"/"
,
"url"
,
"/"
,
"version"
,
"HTTP/1.1"
,
"x-head"
,
"foo"
,
"x-head"
,
"foo"
,
"x-head"
,
"bar"
,
"x-head"
,
"bar"
,
"version"
,
"HTTP/1.1"
,
NULL
NULL
};
};
void
test_spdylay_frame_unpack_nv
()
{
const
char
in
[
1024
];
const
char
in
[
1024
];
char
**
nv
;
char
**
nv
;
int
i
;
int
i
;
...
@@ -48,3 +49,8 @@ void test_spdylay_frame_unpack_nv()
...
@@ -48,3 +49,8 @@ void test_spdylay_frame_unpack_nv()
free
(
nv
);
free
(
nv
);
}
}
void
test_spdylay_frame_count_nv_space
()
{
CU_ASSERT
(
83
==
spdylay_frame_count_nv_space
(
headers
));
}
tests/spdylay_frame_test.h
View file @
5ececcd8
...
@@ -26,5 +26,6 @@
...
@@ -26,5 +26,6 @@
#define SPDYLAY_FRAME_TEST_H
#define SPDYLAY_FRAME_TEST_H
void
test_spdylay_frame_unpack_nv
();
void
test_spdylay_frame_unpack_nv
();
void
test_spdylay_frame_count_nv_space
();
#endif
/* SPDYLAY_FRAME_TEST_H */
#endif
/* SPDYLAY_FRAME_TEST_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