Skip to content

Commit

Permalink
More notlint to make compilers happy ... tests should not have these...
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Dec 18, 2024
1 parent 1ac6576 commit 255d458
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,20 +909,20 @@ TEST_F(TestCodegenModelViaMocks, IterateOverEndpoints)
ASSERT_EQ(endpoints->Next(), kMockEndpoint1);
std::optional<EndpointInfo> info = endpoints->GetMetadata();
ASSERT_TRUE(info.has_value());
EXPECT_EQ(info->parentId, kInvalidEndpointId);
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kFullFamily);
EXPECT_EQ(info->parentId, kInvalidEndpointId); // NOLINT(bugprone-unchecked-optional-access)
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kFullFamily); // NOLINT(bugprone-unchecked-optional-access)

ASSERT_EQ(endpoints->Next(), kMockEndpoint2);
info = endpoints->GetMetadata();
ASSERT_TRUE(info.has_value());
EXPECT_EQ(info->parentId, kInvalidEndpointId);
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kTree);
EXPECT_EQ(info->parentId, kInvalidEndpointId); // NOLINT(bugprone-unchecked-optional-access)
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kTree); // NOLINT(bugprone-unchecked-optional-access)

ASSERT_EQ(endpoints->Next(), kMockEndpoint3);
info = endpoints->GetMetadata();
ASSERT_TRUE(info.has_value());
EXPECT_EQ(info->parentId, kInvalidEndpointId);
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kFullFamily);
EXPECT_EQ(info->parentId, kInvalidEndpointId); // NOLINT(bugprone-unchecked-optional-access)
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kFullFamily); // NOLINT(bugprone-unchecked-optional-access)

// end of iteration
ASSERT_FALSE(endpoints->Next().has_value());
Expand All @@ -933,29 +933,33 @@ TEST_F(TestCodegenModelViaMocks, IterateOverEndpoints)
ASSERT_TRUE(endpoints->SeekTo(kMockEndpoint2));
ASSERT_EQ(endpoints->Next(), kMockEndpoint3);
info = endpoints->GetMetadata();
EXPECT_EQ(info->parentId, kInvalidEndpointId);
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kFullFamily);
ASSERT_TRUE(info.has_value());
EXPECT_EQ(info->parentId, kInvalidEndpointId); // NOLINT(bugprone-unchecked-optional-access)
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kFullFamily); // NOLINT(bugprone-unchecked-optional-access)

endpoints = model.GetEndpoints();
ASSERT_TRUE(endpoints->SeekTo(kMockEndpoint2));
ASSERT_EQ(endpoints->Next(), kMockEndpoint3);
info = endpoints->GetMetadata();
EXPECT_EQ(info->parentId, kInvalidEndpointId);
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kFullFamily);
ASSERT_TRUE(info.has_value());
EXPECT_EQ(info->parentId, kInvalidEndpointId); // NOLINT(bugprone-unchecked-optional-access)
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kFullFamily); // NOLINT(bugprone-unchecked-optional-access)

endpoints = model.GetEndpoints();
ASSERT_TRUE(endpoints->SeekTo(kMockEndpoint1));
ASSERT_EQ(endpoints->Next(), kMockEndpoint2);
info = endpoints->GetMetadata();
EXPECT_EQ(info->parentId, kInvalidEndpointId);
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kTree);
ASSERT_TRUE(info.has_value());
EXPECT_EQ(info->parentId, kInvalidEndpointId); // NOLINT(bugprone-unchecked-optional-access)
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kTree); // NOLINT(bugprone-unchecked-optional-access)

endpoints = model.GetEndpoints();
ASSERT_TRUE(endpoints->SeekTo(kMockEndpoint1));
ASSERT_EQ(endpoints->Next(), kMockEndpoint2);
info = endpoints->GetMetadata();
EXPECT_EQ(info->parentId, kInvalidEndpointId);
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kTree);
ASSERT_TRUE(info.has_value());
EXPECT_EQ(info->parentId, kInvalidEndpointId); // NOLINT(bugprone-unchecked-optional-access)
EXPECT_EQ(info->compositionPattern, EndpointCompositionPattern::kTree); // NOLINT(bugprone-unchecked-optional-access)

endpoints = model.GetEndpoints();
ASSERT_TRUE(endpoints->SeekTo(kMockEndpoint3));
Expand Down

0 comments on commit 255d458

Please sign in to comment.