]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected SetPath tests
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 16 Aug 2004 13:29:32 +0000 (13:29 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 16 Aug 2004 13:29:32 +0000 (13:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/filename/filename.cpp

index 093a344f3d9a51e7b08dedd6f7af2eba8f531408..f91ab53ee4414cdbc56cce2944bc86d35a70887c 100644 (file)
@@ -138,11 +138,11 @@ void FileNameTestCase::TestSplit()
 void FileNameTestCase::TestSetPath()
 {
     wxFileName fn(_T("d:\\test\\foo.bar"), wxPATH_DOS);
-    fn.SetPath(_T("c:\\temp"));
-    CPPUNIT_ASSERT( fn == _T("c:\\temp\\foo.bar") );
+    fn.SetPath(_T("c:\\temp"), wxPATH_DOS);
+    CPPUNIT_ASSERT( fn.SameAs(wxFileName(_T("c:\\temp\\foo.bar"), wxPATH_DOS)) );
 
-    fn = _T("/usr/bin/ls");
-    fn.SetPath(_T("/usr/local/bin"));
-    CPPUNIT_ASSERT( fn == _T("/usr/local/bin/ls") );
+    fn = wxFileName(_T("/usr/bin/ls"), wxPATH_UNIX);
+    fn.SetPath(_T("/usr/local/bin"), wxPATH_UNIX);
+    CPPUNIT_ASSERT( fn.SameAs(wxFileName(_T("/usr/local/bin/ls"), wxPATH_UNIX)) );
 }