Skip to content

Commit fdaebf0

Browse files
committed
Add and update arraymap and arrayhead tests.
1 parent 4534b7d commit fdaebf0

File tree

3 files changed

+589
-1299
lines changed

3 files changed

+589
-1299
lines changed

test/primitives/arrayhead.cpp

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ constexpr auto buckets = sub1(links);
3535
static_assert(buckets == 20u);
3636

3737
using link = linkage<link_size>;
38-
using test_header = arrayhead<link, size_t>;
38+
using test_header = arrayhead<link>;
3939

4040
class nullptr_storage
4141
: public test::chunk_storage
@@ -103,30 +103,14 @@ BOOST_AUTO_TEST_CASE(arrayhead__set_body_count__get__expected)
103103
BOOST_REQUIRE_EQUAL(count, expected);
104104
}
105105

106-
BOOST_AUTO_TEST_CASE(arrayhead__top__link__terminal)
107-
{
108-
test::chunk_storage store;
109-
test_header head{ store, buckets };
110-
BOOST_REQUIRE(head.create());
111-
BOOST_REQUIRE(head.top(9).is_terminal());
112-
}
113-
114-
BOOST_AUTO_TEST_CASE(arrayhead__top__nullptr__terminal)
115-
{
116-
nullptr_storage store;
117-
test_header head{ store, buckets };
118-
BOOST_REQUIRE(head.create());
119-
BOOST_REQUIRE(head.top(9).is_terminal());
120-
}
121-
122-
BOOST_AUTO_TEST_CASE(arrayhead__top__key__terminal)
106+
BOOST_AUTO_TEST_CASE(arrayhead__at__key__terminal)
123107
{
124108
test::chunk_storage store;
125109
test_header head{ store, buckets };
126110

127111
// create() allocates and fills buckets with terminal.
128112
BOOST_REQUIRE(head.create());
129-
BOOST_REQUIRE(head.top(zero).is_terminal());
113+
BOOST_REQUIRE(head.at(zero).is_terminal());
130114
}
131115

132116
BOOST_AUTO_TEST_SUITE_END()

0 commit comments

Comments
 (0)