diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 8 | ||||
-rw-r--r-- | tests/path_test.cpp | 16 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..0732d07 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,8 @@ +if BUILD_TESTS + +AM_CXXFLAGS = -I.. +bin_PROGRAMS = path_test + +path_test_SOURCES = path_test.cpp + +endif diff --git a/tests/path_test.cpp b/tests/path_test.cpp new file mode 100644 index 0000000..1620703 --- /dev/null +++ b/tests/path_test.cpp @@ -0,0 +1,16 @@ +#include <iostream> +#include <raul/Path.h> + +using namespace std; + +int +main() +{ + cerr << "1's are good..." << endl << endl; + + cerr << (Path("/").is_parent_of(Path("/foo"))) << endl; + cerr << (Path("/foo").is_parent_of(Path("/foo/bar"))) << endl; + cerr << !(Path("/foo").is_parent_of(Path("/foo2"))) << endl; + + return 0; +} |