mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 03:20:11 +01:00
SF [2851052] Poco::DirectoryIterator copy constructor is broken
added testCreateFile() to the test suite
This commit is contained in:
@@ -60,6 +60,17 @@ FileTest::~FileTest()
|
||||
}
|
||||
|
||||
|
||||
void FileTest::testCreateFile()
|
||||
{
|
||||
File f("testfile.dat");
|
||||
bool created = f.createFile();
|
||||
assert (created);
|
||||
assert (!f.isHidden());
|
||||
created = f.createFile();
|
||||
assert (!created);
|
||||
}
|
||||
|
||||
|
||||
void FileTest::testFileAttributes1()
|
||||
{
|
||||
File f("testfile.dat");
|
||||
@@ -203,17 +214,6 @@ void FileTest::testFileAttributes1()
|
||||
}
|
||||
|
||||
|
||||
void FileTest::testCreateFile()
|
||||
{
|
||||
File f("testfile.dat");
|
||||
bool created = f.createFile();
|
||||
assert (created);
|
||||
assert (!f.isHidden());
|
||||
created = f.createFile();
|
||||
assert (!created);
|
||||
}
|
||||
|
||||
|
||||
void FileTest::testFileAttributes2()
|
||||
{
|
||||
TemporaryFile f;
|
||||
@@ -524,6 +524,7 @@ CppUnit::Test* FileTest::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("FileTest");
|
||||
|
||||
CppUnit_addTest(pSuite, FileTest, testCreateFile);
|
||||
CppUnit_addTest(pSuite, FileTest, testFileAttributes1);
|
||||
CppUnit_addTest(pSuite, FileTest, testFileAttributes2);
|
||||
CppUnit_addTest(pSuite, FileTest, testFileAttributes3);
|
||||
|
||||
Reference in New Issue
Block a user