]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/uris/uris.cpp
reverted DEBUG_INFO change
[wxWidgets.git] / tests / uris / uris.cpp
index b12a8f680a8311b14a7ae49e5ff6eac052c8f982..959c3e2928f73716078872290340aa9f5a09e55b 100644 (file)
@@ -11,7 +11,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#include "wx/wxprec.h"
+#include "testprec.h"
 
 #ifdef __BORLANDC__
     #pragma hdrstop
 #include "wx/uri.h"
 #include "wx/url.h"
 
-#include "wx/cppunit.h"
-
 // Test wxURL & wxURI compat?
-#define TEST_URL ( 0 && wxUSE_URL )
+#define TEST_URL ( 1 && wxUSE_URL )
 
 // ----------------------------------------------------------------------------
 // test class
@@ -52,6 +50,9 @@ private:
         CPPUNIT_TEST( Comparison );
 #if TEST_URL
         CPPUNIT_TEST( URLCompat );
+#if wxUSE_PROTOCOL_HTTP
+        CPPUNIT_TEST( URLProxy  );
+#endif
 #endif
     CPPUNIT_TEST_SUITE_END();
 
@@ -68,6 +69,7 @@ private:
 
 #if TEST_URL
     void URLCompat();
+    void URLProxy();
 #endif
 
     DECLARE_NO_COPY_CLASS(URITestCase)
@@ -279,7 +281,6 @@ void URITestCase::Comparison()
 #if TEST_URL
 
 #include "wx/url.h"
-#include "wx/mimetype.h"
 
 void URITestCase::URLCompat()
 {
@@ -317,8 +318,14 @@ void URITestCase::URLCompat()
     CPPUNIT_ASSERT( test.BuildURI() == wxT("file:%22myf%22ile.txt") );
     CPPUNIT_ASSERT( test.GetScheme() == wxT("file") );
     CPPUNIT_ASSERT( test.GetPath() == wxT("%22myf%22ile.txt") );
-//    CPPUNIT_ASSERT( wxURI::Unescape(wxT("%22myf%22ile.txt"))  );
-    wxPrintf(wxURI::Unescape(wxT("%22myf%22ile.txt")) );
 }
 
+#if wxUSE_PROTOCOL_HTTP
+void URITestCase::URLProxy()
+{
+    wxURL url(wxT("http://www.asite.com/index.html"));
+    url.SetProxy(wxT("pserv:3122"));
+}
+#endif // wxUSE_PROTOCOL_HTTP
 #endif
+