Skip to content

Commit

Permalink
2 more fixes regarding unchecked access
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Jun 4, 2024
1 parent e2620f4 commit 1691276
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ TEST(TestCodegenModelViaMocks, GetAttributeInfo)
std::optional<AttributeInfo> info =
model.GetAttributeInfo(ConcreteAttributePath(kMockEndpoint1, MockClusterId(1), FeatureMap::Id));
ASSERT_TRUE(info.has_value());
ASSERT_FALSE(info->flags.Has(AttributeQualityFlags::kListAttribute));
EXPECT_FALSE(info->flags.Has(AttributeQualityFlags::kListAttribute)); // NOLINT(bugprone-unchecked-optional-access)

info = model.GetAttributeInfo(ConcreteAttributePath(kMockEndpoint2, MockClusterId(2), MockAttributeId(2)));
ASSERT_TRUE(info.has_value());
ASSERT_TRUE(info->flags.Has(AttributeQualityFlags::kListAttribute));
EXPECT_TRUE(info->flags.Has(AttributeQualityFlags::kListAttribute)); // NOLINT(bugprone-unchecked-optional-access)
}

0 comments on commit 1691276

Please sign in to comment.