forked from qt-creator/qt-creator
debugger: Fixed checks for file classes in self test
Change-Id: I5bfe1047ad3b6fc6bd7080c15e6908a47e5ae5a8 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -767,13 +767,23 @@ namespace qdir {
|
|||||||
|
|
||||||
void testQDir()
|
void testQDir()
|
||||||
{
|
{
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
QDir dir("C:\\Program Files");
|
||||||
|
dir.absolutePath(); // Keep in to facilitate stepping
|
||||||
|
BREAK_HERE;
|
||||||
|
// Check dir "C:/Program Files" QDir.
|
||||||
|
// Check dir.absolutePath "C:/Program Files" QString.
|
||||||
|
// Check dir.canonicalPath "C:/Program Files" QString.
|
||||||
|
// Continue.
|
||||||
|
#else
|
||||||
QDir dir("/tmp");
|
QDir dir("/tmp");
|
||||||
dir.absolutePath();
|
dir.absolutePath(); // Keep in to facilitate stepping
|
||||||
BREAK_HERE;
|
BREAK_HERE;
|
||||||
// Check dir "/tmp" QDir.
|
// Check dir "/tmp" QDir.
|
||||||
// Check dir.absolutePath "/tmp" QString.
|
// Check dir.absolutePath "/tmp" QString.
|
||||||
// Check dir.canonicalPath "/tmp" QString.
|
// Check dir.canonicalPath "/tmp" QString.
|
||||||
// Continue.
|
// Continue.
|
||||||
|
#endif
|
||||||
dummyStatement(&dir);
|
dummyStatement(&dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -784,6 +794,18 @@ namespace qfileinfo {
|
|||||||
|
|
||||||
void testQFileInfo()
|
void testQFileInfo()
|
||||||
{
|
{
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
QFile file("C:\\Program Files\\t");
|
||||||
|
file.setObjectName("A QFile instance");
|
||||||
|
QFileInfo fi("C:\\Program Files\\tt");
|
||||||
|
QString s = fi.absoluteFilePath();
|
||||||
|
BREAK_HERE;
|
||||||
|
// Check fi "C:/Program Files/tt" QFileInfo.
|
||||||
|
// Check file "C:\Program Files\t" QFile.
|
||||||
|
// Check s "C:/Program Files/tt" QString.
|
||||||
|
// Continue.
|
||||||
|
dummyStatement(&file, &s);
|
||||||
|
#else
|
||||||
QFile file("/tmp/t");
|
QFile file("/tmp/t");
|
||||||
file.setObjectName("A QFile instance");
|
file.setObjectName("A QFile instance");
|
||||||
QFileInfo fi("/tmp/tt");
|
QFileInfo fi("/tmp/tt");
|
||||||
@@ -794,6 +816,7 @@ namespace qfileinfo {
|
|||||||
// Check s "/tmp/tt" QString.
|
// Check s "/tmp/tt" QString.
|
||||||
// Continue.
|
// Continue.
|
||||||
dummyStatement(&file, &s);
|
dummyStatement(&file, &s);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace qfileinfo
|
} // namespace qfileinfo
|
||||||
@@ -3451,7 +3474,11 @@ namespace stdstream {
|
|||||||
BREAK_HERE;
|
BREAK_HERE;
|
||||||
// CheckType is std::ifstream.
|
// CheckType is std::ifstream.
|
||||||
// Continue.
|
// Continue.
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
is.open("C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe");
|
||||||
|
#else
|
||||||
is.open("/etc/passwd");
|
is.open("/etc/passwd");
|
||||||
|
#endif
|
||||||
BREAK_HERE;
|
BREAK_HERE;
|
||||||
// Continue.
|
// Continue.
|
||||||
bool ok = is.good();
|
bool ok = is.good();
|
||||||
|
Reference in New Issue
Block a user