From 147f0df58e1ff4973bffb7e4628e6b2fdc20eb57 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Fri, 22 Mar 2024 14:04:40 -0400 Subject: FSTrie testing and debugging --- tests/include/shard_string.h | 8 +++----- tests/include/testing.h | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'tests/include') diff --git a/tests/include/shard_string.h b/tests/include/shard_string.h index 27ee782..fa51630 100644 --- a/tests/include/shard_string.h +++ b/tests/include/shard_string.h @@ -58,7 +58,7 @@ START_TEST(t_mbuffer_init) START_TEST(t_shard_init) { - size_t n = 512; + size_t n = 2048; auto mbuffer1 = create_test_mbuffer(n); auto mbuffer2 = create_test_mbuffer(n); auto mbuffer3 = create_test_mbuffer(n); @@ -117,16 +117,14 @@ 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; auto result = shard.point_lookup(r); ck_assert_ptr_nonnull(result); ck_assert_str_eq(result->rec.key.c_str(), r.key.c_str()); ck_assert_int_eq(result->rec.value, r.value); - fprintf(stderr, "%ld\n", i); + //fprintf(stderr, "%ld\n", i); } } diff --git a/tests/include/testing.h b/tests/include/testing.h index a3c54c0..2315daa 100644 --- a/tests/include/testing.h +++ b/tests/include/testing.h @@ -51,7 +51,7 @@ static std::vector read_string_data(std::string fname, size_t n) { r.value = atol(field.c_str()); std::getline(ls, field, '\n'); r.key = std::string(field); - + vec.push_back(r); } @@ -116,8 +116,8 @@ static de::MutableBuffer *create_test_mbuffer(size_t cnt) auto buffer = new de::MutableBuffer(cnt/2, cnt); R rec; - if constexpr (de::KVPInterface) { - if constexpr (std::is_same_v) { + if constexpr (de::KVPInterface){ + if constexpr (std::is_same_v) { auto records = read_string_data(kjv_wordlist, cnt); for (size_t i=0; i) { -- cgit v1.2.3