]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/filename/filenametest.cpp
rebaked after adding src/tiff/tif_color.c
[wxWidgets.git] / tests / filename / filenametest.cpp
index f91ab53ee4414cdbc56cce2944bc86d35a70887c..25ffc3be015b637b7846acd7ddc54f54eb8cbad6 100644 (file)
@@ -11,7 +11,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#include "wx/wxprec.h"
+#include "testprec.h"
 
 #ifdef __BORLANDC__
     #pragma hdrstop
@@ -22,8 +22,6 @@
 
 #include "wx/filename.h"
 
-#include "wx/cppunit.h"
-
 // ----------------------------------------------------------------------------
 // test data
 // ----------------------------------------------------------------------------
@@ -116,6 +114,20 @@ void FileNameTestCase::TestConstruction()
         CPPUNIT_ASSERT( fullname == fni.fullname );
 
         CPPUNIT_ASSERT( fn.Normalize(wxPATH_NORM_ALL, _T(""), fni.format) );
+
+        if ( *fni.volume && *fni.path )
+        {
+            // check that specifying the volume separately or as part of the
+            // path doesn't make any difference
+            wxString pathWithVolume = fni.volume;
+            pathWithVolume += wxFileName::GetVolumeSeparator(fni.format);
+            pathWithVolume += fni.path;
+
+            CPPUNIT_ASSERT( fn == wxFileName(pathWithVolume,
+                                             fni.name,
+                                             fni.ext,
+                                             fni.format) );
+        }
     }
 }