Esempio n. 1
0
    void TestSetDirectory(void)
    {
        m_directory->SetDirectory(L"new/dir\\");
        m_path->SetDirectory(L"new/dir");
        m_file->SetDirectory(L"new/dir\\");
        // Check directiory is correctly set.
#if defined(WIN32)
        CPPUNIT_ASSERT(m_directory->GetDirectory() == L"new\\dir\\");
        CPPUNIT_ASSERT(m_path->GetDirectory() == L"new\\dir\\");
        CPPUNIT_ASSERT(m_file->GetDirectory() == L"new\\dir\\");
#else
        CPPUNIT_ASSERT(m_directory->GetDirectory() == L"new/dir/");
        CPPUNIT_ASSERT(m_path->GetDirectory() == L"new/dir/");
        CPPUNIT_ASSERT(m_file->GetDirectory() == L"new/dir/");
#endif
        // Check file name is not affected
        CPPUNIT_ASSERT(m_directory->GetFilename() == L"");
        CPPUNIT_ASSERT(m_file->GetFilename() == L"file");
        CPPUNIT_ASSERT(m_path->GetFilename() == L"file.ext");
    }