From 9fe190f5d500e22b0894095e7c917f9c652e0a64 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Wed, 20 Mar 2024 17:30:14 -0400 Subject: Updates/progress towards succinct trie support --- tests/include/shard_standard.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/include/shard_standard.h') diff --git a/tests/include/shard_standard.h b/tests/include/shard_standard.h index 7d17dcb..55e4c7b 100644 --- a/tests/include/shard_standard.h +++ b/tests/include/shard_standard.h @@ -37,17 +37,17 @@ START_TEST(t_mbuffer_init) auto buffer = new MutableBuffer(512, 1024); for (uint64_t i = 512; i > 0; i--) { uint32_t v = i; - buffer->append({i, v, 1}); + buffer->append({i, v}); } for (uint64_t i = 1; i <= 256; ++i) { uint32_t v = i; - buffer->append({i, v, 1}, true); + buffer->append({i, v}, true); } for (uint64_t i = 257; i <= 512; ++i) { uint32_t v = i + 1; - buffer->append({i, v, 1}); + buffer->append({i, v}); } Shard* shard = new Shard(buffer->get_buffer_view()); -- cgit v1.2.3 From b25beb13773072c3b143842b45a7c32a1108f347 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 15 Apr 2024 14:00:27 -0400 Subject: Updated FSTrie to use const char * instead of std::string Note: this requires the caller to manage the memory of the strings --- tests/include/shard_standard.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'tests/include/shard_standard.h') diff --git a/tests/include/shard_standard.h b/tests/include/shard_standard.h index 55e4c7b..2809d74 100644 --- a/tests/include/shard_standard.h +++ b/tests/include/shard_standard.h @@ -150,10 +150,8 @@ START_TEST(t_point_lookup) auto view = buffer->get_buffer_view(); for (size_t i=0; irec.key; - r.value = rec->rec.value; + R r = {rec->rec.key, rec->rec.value}; auto result = isam.point_lookup(r); ck_assert_ptr_nonnull(result); @@ -174,10 +172,8 @@ START_TEST(t_point_lookup_miss) auto buffer = create_double_seq_mbuffer(n, false); auto isam = Shard(buffer->get_buffer_view()); - for (size_t i=n + 100; i<2*n; i++) { - R r; - r.key = i; - r.value = i; + for (uint32_t i=n + 100; i<2*n; i++) { + R r = R{i, i}; auto result = isam.point_lookup(r); ck_assert_ptr_null(result); -- cgit v1.2.3