From 4524a24b40af5e8c801c19de5cc982b90a58d641 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 25 Jul 2004 14:01:36 +0000 Subject: [PATCH] added SetPath() test git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/filename/filename.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/filename/filename.cpp b/tests/filename/filename.cpp index 87fa39e708..093a344f3d 100644 --- a/tests/filename/filename.cpp +++ b/tests/filename/filename.cpp @@ -88,6 +88,7 @@ private: CPPUNIT_TEST_SUITE( FileNameTestCase ); CPPUNIT_TEST( TestConstruction ); CPPUNIT_TEST( TestSplit ); + CPPUNIT_TEST( TestSetPath ); CPPUNIT_TEST_SUITE_END(); void TestConstruction(); @@ -134,3 +135,14 @@ 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 = _T("/usr/bin/ls"); + fn.SetPath(_T("/usr/local/bin")); + CPPUNIT_ASSERT( fn == _T("/usr/local/bin/ls") ); +} +