X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=tests%2Fpath.cpp;h=fbb5ff54588685527080faa9991ed94b14e4b8fb;hb=refs%2Fheads%2Fmaster;hp=0811c49a28457c35f6d2fa04fbf2d7d2d4962c5d;hpb=96dadad38bc0b114174a7d4a707cdd8e88fce3aa;p=libs%2Fcore.git diff --git a/tests/path.cpp b/tests/path.cpp index 0811c49..d52630a 100644 --- a/tests/path.cpp +++ b/tests/path.cpp @@ -31,7 +31,6 @@ PathTests::PathTests() add(&PathTests::iterator_abs, "Iterator (absolute path)"); add(&PathTests::iterator_rel, "Iterator (relative path)"); add(&PathTests::iterator_special, "Iterator (special cases)"); - add(&PathTests::invalid_iterator, "Invalid iterator").expect_throw(); add(&PathTests::indexing, "Indexing"); add(&PathTests::invalid_index, "Invalid index").expect_throw(); } @@ -39,6 +38,7 @@ PathTests::PathTests() void PathTests::empty() { EXPECT(FS::Path().empty()); + EXPECT(FS::Path("").empty()); EXPECT(!FS::Path(".").empty()); } @@ -52,6 +52,8 @@ void PathTests::normalization() EXPECT_EQUAL(path.str(), "./foo"); path = "foo/.."; EXPECT_EQUAL(path.str(), "."); + path = "/foo/.."; + EXPECT_EQUAL(path.str(), "/"); path = "//foo"; EXPECT_EQUAL(path.str(), "/foo"); path = "/.."; @@ -119,12 +121,6 @@ void PathTests::iterator_special() EXPECT(iter==path.end()); } -void PathTests::invalid_iterator() -{ - FS::Path path("foo"); - *path.end(); -} - void PathTests::indexing() { FS::Path path("/foo/bar");