Revision: 14659
Author: adrian.chadd
Date: Thu May 13 06:05:03 2010
Log: Remove the initialisation from the parser check function.
This is to allow multiple calls to said parser check function
in subsequent tests.


http://code.google.com/p/lusca-cache/source/detail?r=14659

Modified:
 /branches/LUSCA_HEAD/test-suite/atf/libhttp.c

=======================================
--- /branches/LUSCA_HEAD/test-suite/atf/libhttp.c       Thu May 13 06:02:34 2010
+++ /branches/LUSCA_HEAD/test-suite/atf/libhttp.c       Thu May 13 06:05:03 2010
@@ -57,8 +57,6 @@
 {
        HttpHeader hdr;

-       test_core_init();
-       httpHeaderInitLibrary();
        ATF_CHECK_EQ(test_core_parse_header(&hdr, str), ret);
        httpHeaderClean(&hdr);
 }
@@ -101,6 +99,8 @@

 ATF_TC_BODY(libhttp_parse_1, tc)
 {
+       test_core_init();
+       httpHeaderInitLibrary();
libhttp_test_parser("Host: www.creative.net.au\r\nContent-type: text/html\r\nFoo: bar\r\n\r\n", 1);
 }

@@ -112,6 +112,8 @@

 ATF_TC_BODY(libhttp_parse_2, tc)
 {
+       test_core_init();
+       httpHeaderInitLibrary();
libhttp_test_parser("Host: www.creative.net.au\r\nContent-Length: 12345\r\nContent-type: text/html\r\nFoo: bar\r\n\r\n", 1);
 }

@@ -125,6 +127,8 @@

 ATF_TC_BODY(libhttp_parse_3, tc)
 {
+       test_core_init();
+       httpHeaderInitLibrary();
libhttp_test_parser("Host: www.creative.net.au\r\nContent-Length: b12345\r\nContent-type: text/html\r\nFoo: bar\r\n\r\n", 0);
 }

@@ -138,6 +142,8 @@

 ATF_TC_BODY(libhttp_parse_4, tc)
 {
+       test_core_init();
+       httpHeaderInitLibrary();
libhttp_test_parser("Host: www.creative.net.au\r\nContent-Length: 12345\r\nContent-type: text/html\r\nFoo: bar\r\nContent-Length: 23456\r\n", 0);
 }

@@ -191,6 +197,8 @@
 }
 ATF_TC_BODY(libhttp_parser_other_whitespace_1, tc)
 {
+       test_core_init();
+       httpHeaderInitLibrary();
        libhttp_test_parser("Fo o: bar\r\n", 0);
 }

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to