diff options
Diffstat (limited to 'test/fs')
| -rw-r--r-- | test/fs/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | test/fs/extfs_test.cpp | 23 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/fs/CMakeLists.txt b/test/fs/CMakeLists.txt new file mode 100644 index 0000000..b1ccc1b --- /dev/null +++ b/test/fs/CMakeLists.txt @@ -0,0 +1,3 @@ +set(CUTE_GROUP "fs") + +cute_test(extfs LIBRARIES extfs) diff --git a/test/fs/extfs_test.cpp b/test/fs/extfs_test.cpp new file mode 100644 index 0000000..4a5e1b5 --- /dev/null +++ b/test/fs/extfs_test.cpp @@ -0,0 +1,23 @@ +#include "fs/extfs.hpp" + +#include <cute/cute.h> +#include <cute/cute_runner.h> +#include <cute/ostream_listener.h> +#include <cute/xml_listener.h> + +void construction_with_inexistent_file_creates_extfs_that_is_not_open() + { + auto && disk = fs::extfs{"./THIS_DISK_DOES_NOT_EXIST"}; + ASSERT(!disk.open()); + } + +int main(int argc, char * argv[]) + { + auto tests = cute::suite{ + CUTE(construction_with_inexistent_file_creates_extfs_that_is_not_open), + }; + + cute::xml_file_opener resultFile{argc, argv}; + cute::xml_listener<cute::ostream_listener<>> listener{resultFile.out}; + return !cute::makeRunner(listener, argc, argv)(tests, "fs::extfs tests"); + } |
