From 0b272177378d15d7d0cacec8c2ba1ee47e4974e2 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Mon, 21 Oct 2024 20:19:00 +0200 Subject: [PATCH] Fix a warning and the formatting. Signed-off-by: Johannes Kalmbach --- test/IndexMetaDataTest.cpp | 17 ++++++++++++----- test/LocatedTriplesTest.cpp | 3 ++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/test/IndexMetaDataTest.cpp b/test/IndexMetaDataTest.cpp index 63dce228c9..98c36985de 100644 --- a/test/IndexMetaDataTest.cpp +++ b/test/IndexMetaDataTest.cpp @@ -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"); @@ -41,18 +45,21 @@ TEST(IndexMetaDataTest, writeReadTest2Mmap) { std::string imdFilename = "_testtmp.imd"; std::string mmapFilename = imdFilename + ".mmap"; vector 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 diff --git a/test/LocatedTriplesTest.cpp b/test/LocatedTriplesTest.cpp index 6ed5f566f6..297c119b95 100644 --- a/test/LocatedTriplesTest.cpp +++ b/test/LocatedTriplesTest.cpp @@ -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 =