summaryrefslogtreecommitdiff
path: root/test/buildtool/file_system/file_root.test.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-06-04 14:15:01 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-06-04 14:34:44 +0200
commit97bd521804d8b54230ec114c2dddf64c6c491dde (patch)
treeecaba3fce5c81654bf99290840a96fe4a0940588 /test/buildtool/file_system/file_root.test.cpp
parent0c4ac5ce707be113fd01ec8c1c4ce3120b8f202f (diff)
downloadjustbuild-97bd521804d8b54230ec114c2dddf64c6c491dde.tar.gz
directory_map: Correctly report fatal on failures to read from workspace roots
Diffstat (limited to 'test/buildtool/file_system/file_root.test.cpp')
-rw-r--r--test/buildtool/file_system/file_root.test.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/buildtool/file_system/file_root.test.cpp b/test/buildtool/file_system/file_root.test.cpp
index 46b52e79..789eea08 100644
--- a/test/buildtool/file_system/file_root.test.cpp
+++ b/test/buildtool/file_system/file_root.test.cpp
@@ -134,19 +134,20 @@ void TestFileRootReadEntries(FileRoot const& root,
REQUIRE(root.Exists(path));
REQUIRE(root.IsDirectory(path));
auto entries = root.ReadDirectory(path);
+ REQUIRE(entries.has_value());
- CHECK_FALSE(entries.Empty());
- CHECK(entries.ContainsBlob("foo"));
- CHECK(entries.ContainsBlob("bar"));
+ CHECK_FALSE(entries->Empty());
+ CHECK(entries->ContainsBlob("foo"));
+ CHECK(entries->ContainsBlob("bar"));
if (has_baz) {
- CHECK_FALSE(entries.ContainsBlob("baz"));
- CHECK(with_symlinks == entries.ContainsBlob("baz_l"));
- CHECK(with_symlinks == entries.ContainsBlob("foo_l"));
+ CHECK_FALSE(entries->ContainsBlob("baz"));
+ CHECK(with_symlinks == entries->ContainsBlob("baz_l"));
+ CHECK(with_symlinks == entries->ContainsBlob("foo_l"));
}
else {
- CHECK(with_symlinks == entries.ContainsBlob("bar_l"));
+ CHECK(with_symlinks == entries->ContainsBlob("bar_l"));
}
- CHECK_FALSE(entries.ContainsBlob("does_not_exist"));
+ CHECK_FALSE(entries->ContainsBlob("does_not_exist"));
}
void TestFileRootReadDirectory(FileRoot const& root, bool with_symlinks) {