Skip to content

Commit

Permalink
* fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hagen committed Jun 27, 2016
1 parent 4e7375c commit a973630
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/test-http-req.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ int main() {
assert(req->version == "HTTP/1.0");
assert(req->method == "GET");
assert(req->uri == "/");
assert(req->host == "inr.i2p");
assert(req->headers.size() == 3);
assert(req->headers.count("Host") == 1);
assert(req->headers.count("Accept") == 1);
Expand All @@ -42,7 +41,6 @@ int main() {
assert(req->version == "HTTP/1.0");
assert(req->method == "GET");
assert(req->uri == "/");
assert(req->host == "");
assert(req->headers.size() == 0);
delete req;

Expand All @@ -52,7 +50,7 @@ int main() {
"\r\n";
len = strlen(buf);
req = new HTTPReq;
assert((ret = req->parse(buf, len)) == -1); /* no host header */
assert((ret = req->parse(buf, len)) > 0);
delete req;

/* test: parsing incomplete request */
Expand All @@ -76,7 +74,6 @@ int main() {
assert((ret = req->parse(buf, len)) == len); /* no host header */
assert(req->method == "GET");
assert(req->uri == "http://inr.i2p");
assert(req->host == "stats.i2p");
assert(req->headers.size() == 3);
assert(req->headers.count("Host") == 1);
assert(req->headers.count("Accept") == 1);
Expand Down

0 comments on commit a973630

Please sign in to comment.