diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/path_test.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/path_test.cpp b/test/path_test.cpp index 099b463..7df1acf 100644 --- a/test/path_test.cpp +++ b/test/path_test.cpp @@ -41,6 +41,10 @@ main() CHECK(Path("/foo").is_parent_of(Path("/foo/bar"))); CHECK(!(Path("/foo").is_parent_of(Path("/foo2")))); + CHECK(Path::lca(Path("/foo"), Path("/foo/bar/baz")) == Path("/")); + CHECK(Path::lca(Path("/foo/bar"), Path("/foo/bar/baz")) == Path("/foo")); + CHECK(Path::lca(Path("/foo/bar/quux"), Path("/foo/bar/baz")) == Path("/foo/bar")); + CHECK(!Path::is_valid("")); CHECK(!Path::is_valid("hello")); CHECK(!Path::is_valid("/foo/bar/")); |