diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-04 14:15:01 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-04 14:34:44 +0200 |
commit | 97bd521804d8b54230ec114c2dddf64c6c491dde (patch) | |
tree | ecaba3fce5c81654bf99290840a96fe4a0940588 /test/buildtool/file_system/file_root.test.cpp | |
parent | 0c4ac5ce707be113fd01ec8c1c4ce3120b8f202f (diff) | |
download | justbuild-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.cpp | 17 |
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) { |