From e9279590a0007b62276fa00d33c0b770880bb87e Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Wed, 29 Nov 2023 17:34:45 +0100 Subject: [PATCH] test(nilsimsa): ensure that nilsimsa order is reproducible --- test/dwarfs.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/dwarfs.cpp b/test/dwarfs.cpp index ee86baaa..1b9f590e 100644 --- a/test/dwarfs.cpp +++ b/test/dwarfs.cpp @@ -782,7 +782,7 @@ TEST_P(file_scanner, inode_ordering) { opts.inode.fragment_order.set_default(order_opts); auto input = std::make_shared(); - constexpr int dim = 14; + constexpr int dim{14}; input->add_dir(""); @@ -792,7 +792,7 @@ TEST_P(file_scanner, inode_ordering) { input->add_dir(fmt::format("{}/{}", x, y)); for (int z = 0; z < dim; ++z) { input->add_file(fmt::format("{}/{}/{}", x, y, z), - (x + 1) * (y + 1) * (z + 1)); + (x + 1) * (y + 1) * (z + 1), true); } } } @@ -813,7 +813,8 @@ INSTANTIATE_TEST_SUITE_P( dwarfs, file_scanner, ::testing::Combine(::testing::Values(file_order_mode::PATH, file_order_mode::REVPATH, - file_order_mode::SIMILARITY), + file_order_mode::SIMILARITY, + file_order_mode::NILSIMSA), ::testing::Values(std::nullopt, "xxh3-128"))); class filter : public testing::TestWithParam {};