Skip to content

Commit

Permalink
Fix a warning and the formatting.
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Kalmbach <[email protected]>
  • Loading branch information
joka921 committed Oct 21, 2024
1 parent 10dac10 commit 0b27217
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
17 changes: 12 additions & 5 deletions test/IndexMetaDataTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ auto V = ad_utility::testing::VocabId;
}

TEST(RelationMetaDataTest, writeReadTest) {
CompressedBlockMetadata rmdB{{{12, 34}, {46, 11}}, 5,
{V(0), V(2), V(13)}, {V(3), V(24), V(62)},
std::vector{V(85)}, true};
CompressedBlockMetadata rmdB{{{12, 34}, {46, 11}},
5,
{V(0), V(2), V(13)},
{V(3), V(24), V(62)},
std::vector{V(85)},
true,
13};
CompressedRelationMetadata rmdF{V(1), 3, 2.0, 42.0, 16};

ad_utility::serialization::FileWriteSerializer f("_testtmp.rmd");
Expand All @@ -41,18 +45,21 @@ TEST(IndexMetaDataTest, writeReadTest2Mmap) {
std::string imdFilename = "_testtmp.imd";
std::string mmapFilename = imdFilename + ".mmap";
vector<CompressedBlockMetadata> bs;
// A value for the Graph Id.
bs.push_back(CompressedBlockMetadata{{{12, 34}, {42, 17}},
5,
{V(0), V(2), V(13)},
{V(2), V(24), V(62)},
std::vector{V(512)},
true});
true,
17});
bs.push_back(CompressedBlockMetadata{{{12, 34}, {16, 12}},
5,
{V(0), V(2), V(13)},
{V(3), V(24), V(62)},
{},
false});
false,
18});
CompressedRelationMetadata rmdF{V(1), 3, 2.0, 42.0, 16};
CompressedRelationMetadata rmdF2{V(2), 5, 3.0, 43.0, 10};
// The index MetaData does not have an explicit clear, so we
Expand Down
3 changes: 2 additions & 1 deletion test/LocatedTriplesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ auto PT = [](const auto& c1, const auto& c2, const auto& c3) {
};
auto CBM = [](const auto firstTriple, const auto lastTriple) {
size_t dummyBlockIndex = 0;
return CompressedBlockMetadata{{}, 0, firstTriple, lastTriple, {}, false, 0};
return CompressedBlockMetadata{{}, 0, firstTriple, lastTriple,
{}, false, dummyBlockIndex};
};

auto numBlocks =
Expand Down

0 comments on commit 0b27217

Please sign in to comment.