]> git.tdb.fi Git - libs/core.git/commitdiff
Remove test case for invalid Path iterator
authorMikko Rasa <tdb@tdb.fi>
Sat, 2 Dec 2017 20:23:13 +0000 (22:23 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 4 Dec 2017 06:48:54 +0000 (08:48 +0200)
Path::Iterator now caches the current component and no longer throws when
dereferencing end().

tests/path.cpp

index 6e88da30c07e5201b4af0ea9e566e1f713810dde..fbb5ff54588685527080faa9991ed94b14e4b8fb 100644 (file)
@@ -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<logic_error>();
        add(&PathTests::indexing, "Indexing");
        add(&PathTests::invalid_index, "Invalid index").expect_throw<invalid_argument>();
 }
@@ -120,12 +119,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");