Skip to content

Commit

Permalink
Add explicit casts.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-rapp committed Oct 3, 2023
1 parent c2bd09a commit a74e297
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ TEST(NominalFeatureTypeTest, createNominalFeatureVectorFromFortranContiguousView
}

if (value == -1) {
EXPECT_EQ(indices.size(), 1);
EXPECT_EQ(indices.size(), (std::unordered_set<uint32>::size_type) 1);
EXPECT_TRUE(indices.find(6) != indices.end());
} else {
EXPECT_EQ(indices.size(), 2);
EXPECT_EQ(indices.size(), (std::unordered_set<uint32>::size_type) 2);
EXPECT_TRUE(indices.find(0) != indices.end());
EXPECT_TRUE(indices.find(3) != indices.end());
}
Expand Down Expand Up @@ -106,7 +106,7 @@ TEST(NominalFeatureTypeTest, createBinaryFeatureVectorFromFortranContiguousView)
indices.emplace(*it);
}

EXPECT_EQ(indices.size(), 2);
EXPECT_EQ(indices.size(), (std::unordered_set<uint32>::size_type) 2);
EXPECT_TRUE(indices.find(0) != indices.end());
EXPECT_TRUE(indices.find(3) != indices.end());

Expand Down Expand Up @@ -192,10 +192,10 @@ TEST(NominalFeatureTypeTest, createNominalFeatureVectorFromDenseCscView) {
}

if (value == -1) {
EXPECT_EQ(indices.size(), 1);
EXPECT_EQ(indices.size(), (std::unordered_set<uint32>::size_type) 1);
EXPECT_TRUE(indices.find(6) != indices.end());
} else {
EXPECT_EQ(indices.size(), 2);
EXPECT_EQ(indices.size(), (std::unordered_set<uint32>::size_type) 2);
EXPECT_TRUE(indices.find(0) != indices.end());
EXPECT_TRUE(indices.find(3) != indices.end());
}
Expand Down Expand Up @@ -256,7 +256,7 @@ TEST(NominalFeatureTypeTest, createBinaryFeatureVectorFromDenseCscView) {
indices.emplace(*it);
}

EXPECT_EQ(indices.size(), 2);
EXPECT_EQ(indices.size(), (std::unordered_set<uint32>::size_type) 2);
EXPECT_TRUE(indices.find(0) != indices.end());
EXPECT_TRUE(indices.find(3) != indices.end());

Expand Down Expand Up @@ -346,10 +346,10 @@ TEST(NominalFeatureTypeTest, createNominalFeatureVectorFromCscView) {
}

if (value == -1) {
EXPECT_EQ(indices.size(), 1);
EXPECT_EQ(indices.size(), (std::unordered_set<uint32>::size_type) 1);
EXPECT_TRUE(indices.find(6) != indices.end());
} else {
EXPECT_EQ(indices.size(), 2);
EXPECT_EQ(indices.size(), (std::unordered_set<uint32>::size_type) 2);
EXPECT_TRUE(indices.find(0) != indices.end());
EXPECT_TRUE(indices.find(3) != indices.end());
}
Expand Down Expand Up @@ -404,7 +404,7 @@ TEST(NominalFeatureTypeTest, createBinaryFeatureVectorFromCscView) {
indices.emplace(*it);
}

EXPECT_EQ(indices.size(), 2);
EXPECT_EQ(indices.size(), (std::unordered_set<uint32>::size_type) 2);
EXPECT_TRUE(indices.find(0) != indices.end());
EXPECT_TRUE(indices.find(3) != indices.end());

Expand Down

0 comments on commit a74e297

Please sign in to comment.