myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-362


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-362-g97b3362
Date: Mon, 23 Aug 2010 01:15:28 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  97b336221bbda87f4cf56ac31d39a6b8bdb0d157 (commit)
      from  e7b8a7da029dae3a0694003c2c6bc0dfe7d6e087 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 97b336221bbda87f4cf56ac31d39a6b8bdb0d157
Author: Giuseppe Scrivano <address@hidden>
Date:   Mon Aug 23 02:21:20 2010 +0200

    tests: Add test for HttpHeader::clearValue.

diff --git a/myserver/tests/test_http_request.cpp 
b/myserver/tests/test_http_request.cpp
index 5687b9a..bf17484 100644
--- a/myserver/tests/test_http_request.cpp
+++ b/myserver/tests/test_http_request.cpp
@@ -44,6 +44,7 @@ class TestHttpRequest : public CppUnit::TestFixture
   CPPUNIT_TEST (testValidRequest);
   CPPUNIT_TEST (testKeepAlive);
   CPPUNIT_TEST (testResetHttpRequest);
+  CPPUNIT_TEST (testClearValue);
   CPPUNIT_TEST_SUITE_END ();
 
 public:
@@ -267,7 +268,7 @@ public:
     CPPUNIT_ASSERT (header.uriOpts.compare ("") == 0);
     CPPUNIT_ASSERT (header.ver.compare ("HTTP/1.1") == 0);
     CPPUNIT_ASSERT (header.uriOptsPtr == NULL);
-    CPPUNIT_ASSERT (header.getValue ("NotExists", 0) == NULL);
+    CPPUNIT_ASSERT (header.getValue ("NotExists", NULL) == NULL);
   }
 
 
@@ -281,9 +282,20 @@ public:
     CPPUNIT_ASSERT (header.uriOpts.compare ("") == 0);
     CPPUNIT_ASSERT (header.ver.compare ("") == 0);
     CPPUNIT_ASSERT (header.uriOptsPtr == NULL);
-    CPPUNIT_ASSERT (header.getValue ("NotExists", 0) == NULL);
+    CPPUNIT_ASSERT (header.getValue ("NotExists", NULL) == NULL);
   }
 
+  void testClearValue ()
+  {
+    HttpRequestHeader header;
+    CPPUNIT_ASSERT (header.getValue ("Foo", NULL) == NULL);
+    header.setValue ("Foo", "Bar");
+    CPPUNIT_ASSERT (header.getValue ("Foo", NULL));
+    header.clearValue ("Foo");
+    CPPUNIT_ASSERT (header.getValue ("Foo", NULL) == NULL);
+
+
+  }
 };
 
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/tests/test_http_request.cpp |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU MyServer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]