forked from github/server
missing include, gcc fix
This commit is contained in:
parent
4414d7ef57
commit
394621956d
|
@ -1,6 +1,7 @@
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include <CuTest.h>
|
#include <CuTest.h>
|
||||||
|
|
||||||
static void test_parse_token(CuTest *tc) {
|
static void test_parse_token(CuTest *tc) {
|
||||||
|
@ -13,7 +14,7 @@ static void test_parse_token(CuTest *tc) {
|
||||||
CuAssertPtrEquals(tc, (void *)(orig+5), (void *)str);
|
CuAssertPtrEquals(tc, (void *)(orig+5), (void *)str);
|
||||||
CuAssertStrEquals(tc, "SHORT", tok);
|
CuAssertStrEquals(tc, "SHORT", tok);
|
||||||
tok = parse_token(&str, lbuf, sizeof(lbuf));
|
tok = parse_token(&str, lbuf, sizeof(lbuf));
|
||||||
CuAssertPtrEquals(tc, (void *)(orig + 11), (void *)str);
|
CuAssertPtrEquals(tc, (void *)(orig + strlen(orig)), (void *)str);
|
||||||
CuAssertStrEquals(tc, "TOKEN", tok);
|
CuAssertStrEquals(tc, "TOKEN", tok);
|
||||||
tok = parse_token(&str, lbuf, sizeof(lbuf));
|
tok = parse_token(&str, lbuf, sizeof(lbuf));
|
||||||
CuAssertPtrEquals(tc, NULL, (void *)tok);
|
CuAssertPtrEquals(tc, NULL, (void *)tok);
|
||||||
|
@ -26,7 +27,7 @@ static void test_parse_token_limit(CuTest *tc) {
|
||||||
|
|
||||||
orig = str = "LONG_TOKEN";
|
orig = str = "LONG_TOKEN";
|
||||||
tok = parse_token(&str, lbuf, sizeof(lbuf));
|
tok = parse_token(&str, lbuf, sizeof(lbuf));
|
||||||
CuAssertPtrEquals(tc, (void *)(orig + 10), (void *)str);
|
CuAssertPtrEquals(tc, (void *)(orig + strlen(orig)), (void *)str);
|
||||||
CuAssertStrEquals(tc, tok, "LONG_TO");
|
CuAssertStrEquals(tc, tok, "LONG_TO");
|
||||||
tok = parse_token(&str, lbuf, sizeof(lbuf));
|
tok = parse_token(&str, lbuf, sizeof(lbuf));
|
||||||
CuAssertPtrEquals(tc, NULL, (void *)tok);
|
CuAssertPtrEquals(tc, NULL, (void *)tok);
|
||||||
|
|
Loading…
Reference in New Issue