Pārlūkot izejas kodu

Tested FilePath::isAbsolute() under Windows.


git-svn-id: https://svn.microneil.com/svn/CodeDweller-Tests/trunk@49 b3372362-9eaa-4a85-aa2b-6faa1ab7c995
master
adeniz pirms 9 gadiem
vecāks
revīzija
323a2142dc
2 mainītis faili ar 11 papildinājumiem un 5 dzēšanām
  1. 1
    1
      TestFilesystem/buildAndRun
  2. 10
    4
      TestFilesystem/testFilesystem.cpp

+ 1
- 1
TestFilesystem/buildAndRun Parādīt failu

@@ -1,5 +1,5 @@
CFLAGS='-I.. -std=c++11 -g -O0'
g++ $CFLAGS testFilesystem.cpp ../CodeDweller/filesystem.cpp -o testFilesystem
g++ $CFLAGS testFilesystem.cpp ../CodeDweller/filesystem.cpp -lShlwapi -o testFilesystem
if [ $? -ne 0 ]
then
exit -1

+ 10
- 4
TestFilesystem/testFilesystem.cpp Parādīt failu

@@ -97,7 +97,7 @@ bool testFilePathIsAbsolute() {
RETURN_FALSE("isAbsolute() failure");
}
if (!CodeDweller::FilePath::isAbsolute("x:\\sll\lll")) {
if (!CodeDweller::FilePath::isAbsolute("x:\\sll\\lll")) {
RETURN_FALSE("isAbsolute() failure");
}
@@ -109,7 +109,7 @@ bool testFilePathIsAbsolute() {
RETURN_FALSE("isAbsolute() failure");
}
if (!CodeDweller::FilePath::isAbsolute("\\sll\lll")) {
if (!CodeDweller::FilePath::isAbsolute("\\sll\\lll")) {
RETURN_FALSE("isAbsolute() failure");
}
#endif
@@ -196,9 +196,15 @@ bool testFilePathJoin() {
RETURN_FALSE("join() failure");
}
#ifdef _WIN32
std::string absComponent = "\\abs";
#else
std::string absComponent = "/abs";
#endif
try {
(void) CodeDweller::FilePath::join({"rel", "/abs"});
(void) CodeDweller::FilePath::join({"rel", absComponent});
NO_EXCEPTION_TERM("join()");
return false;
@@ -209,7 +215,7 @@ bool testFilePathJoin() {
try {
(void) CodeDweller::FilePath::join({"rel", "/abs", "otherrel"});
(void) CodeDweller::FilePath::join({"rel", absComponent, "otherrel"});
NO_EXCEPTION_TERM("join()");
return false;

Notiek ielāde…
Atcelt
Saglabāt