From 2353d1a530a86e2c30fab2f326640f9f94c41741 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sun, 25 Dec 2016 10:56:47 +0100 Subject: extfs: Add new test for extfs::has_label --- test/fs/extfs_test.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/fs') diff --git a/test/fs/extfs_test.cpp b/test/fs/extfs_test.cpp index 4a5e1b5..c90e0fa 100644 --- a/test/fs/extfs_test.cpp +++ b/test/fs/extfs_test.cpp @@ -11,10 +11,17 @@ void construction_with_inexistent_file_creates_extfs_that_is_not_open() ASSERT(!disk.open()); } +void non_open_file_system_has_no_label() + { + auto && disk = fs::extfs{"./THIS_DISK_DOES_NOT_EXIST"}; + ASSERT(!disk.has_label()); + } + int main(int argc, char * argv[]) { auto tests = cute::suite{ CUTE(construction_with_inexistent_file_creates_extfs_that_is_not_open), + CUTE(non_open_file_system_has_no_label), }; cute::xml_file_opener resultFile{argc, argv}; -- cgit v1.2.3