summaryrefslogtreecommitdiff
path: root/jni/node_test.cpp
diff options
context:
space:
mode:
author Narayan Kamath <narayan@google.com> 2020-01-08 16:02:50 +0000
committer Narayan Kamath <narayan@google.com> 2020-01-14 13:22:44 +0000
commitbd22bb0deddb236fbdfa8c5797cfd7f15c1a0c73 (patch)
tree42a94e36d2e358ab91211c3317e9c31896c9a5e2 /jni/node_test.cpp
parente59ed6bc05f55439d9722973192476ff85dfc261 (diff)
Const correctness handle / RedactionInfo.
Helps us CHECK that they're always constructed with valid RedactionInfo etc. Test: atest FuseDaemonHostTest Test: atest fuse_node_test Bug: 147274248 Change-Id: I2cc369574d14136521201b4c8b99fe22e7ec0463
Diffstat (limited to 'jni/node_test.cpp')
-rw-r--r--jni/node_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/jni/node_test.cpp b/jni/node_test.cpp
index 1c7103c8f..c72c8ee1c 100644
--- a/jni/node_test.cpp
+++ b/jni/node_test.cpp
@@ -200,8 +200,7 @@ TEST_F(NodeTest, LookupAbsolutePath) {
TEST_F(NodeTest, AddDestroyHandle) {
unique_node_ptr node = CreateNode(nullptr, "/path");
- handle* h = new handle("/path");
- h->cached = true;
+ handle* h = new handle("/path", -1, new mediaprovider::fuse::RedactionInfo, true /* cached */);
node->AddHandle(h);
ASSERT_TRUE(node->HasCachedHandle());
@@ -212,6 +211,7 @@ TEST_F(NodeTest, AddDestroyHandle) {
// the node in question.
EXPECT_DEATH(node->DestroyHandle(h), "");
EXPECT_DEATH(node->DestroyHandle(nullptr), "");
- std::unique_ptr<handle> h2(new handle("/path2"));
+ std::unique_ptr<handle> h2(
+ new handle("/path2", -1, new mediaprovider::fuse::RedactionInfo, true /* cached */));
EXPECT_DEATH(node->DestroyHandle(h2.get()), "");
}