Skip to content

Commit 644e553

Browse files
PointKernelsleeepyjackpre-commit-ci[bot]
authored
Enhance unit tests by adopting consistent naming conventions. (#641)
This PR adopts uniform naming for unit tests, enhancing the clarity of the CTest execution log. It also relocates map find and contains unit tests into separate files to improve build efficiency. --------- Co-authored-by: Daniel Jünger <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 20a16ec commit 644e553

37 files changed

+216
-116
lines changed

tests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ ConfigureTest(STATIC_SET_TEST
7575
# - static_map tests ------------------------------------------------------------------------------
7676
ConfigureTest(STATIC_MAP_TEST
7777
static_map/capacity_test.cu
78+
static_map/contains_test.cu
7879
static_map/custom_type_test.cu
7980
static_map/duplicate_keys_test.cu
8081
static_map/erase_test.cu
82+
static_map/find_test.cu
8183
static_map/for_each_test.cu
8284
static_map/hash_test.cu
8385
static_map/heterogeneous_lookup_test.cu
@@ -87,7 +89,6 @@ ConfigureTest(STATIC_MAP_TEST
8789
static_map/key_sentinel_test.cu
8890
static_map/shared_memory_test.cu
8991
static_map/stream_test.cu
90-
static_map/unique_sequence_test.cu
9192
static_map/rehash_test.cu)
9293

9394
###################################################################################################

tests/bloom_filter/arrow_policy_test.cu

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,12 @@ void test_filter_bitset(Filter& filter, size_t num_keys)
150150
})));
151151
}
152152

153-
TEMPLATE_TEST_CASE_SIG(
154-
"Arrow filter policy bitset validation", "", (class Key), (int32_t), (int64_t), (float))
153+
TEMPLATE_TEST_CASE_SIG("bloom_filter arrow filter policy bitset validation",
154+
"",
155+
(class Key),
156+
(int32_t),
157+
(int64_t),
158+
(float))
155159
{
156160
// Get test settings
157161
auto const [sub_filters, num_keys] = get_arrow_filter_test_settings<Key>();

tests/bloom_filter/unique_sequence_test.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void test_unique_sequence(Filter& filter, size_type num_keys)
8585
}
8686

8787
TEMPLATE_TEST_CASE_SIG(
88-
"Unique sequence with default policy",
88+
"bloom_filter default policy tests",
8989
"",
9090
((class Key, class Policy), Key, Policy),
9191
(int32_t, cuco::default_filter_policy<cuco::xxhash_64<int32_t>, uint32_t, 1>),
@@ -105,7 +105,7 @@ TEMPLATE_TEST_CASE_SIG(
105105
test_unique_sequence(filter, num_keys);
106106
}
107107

108-
TEMPLATE_TEST_CASE_SIG("Unique sequence with arrow policy",
108+
TEMPLATE_TEST_CASE_SIG("bloom_filter arrow policy tests",
109109
"",
110110
((class Key, class Policy), Key, Policy),
111111
(int32_t, cuco::arrow_filter_policy<int32_t>),

tests/dynamic_bitset/find_next_test.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ __global__ void find_next_kernel(BitsetRef ref, size_type num_elements, OutputIt
3737

3838
extern bool modulo_bitgen(uint64_t i); // Defined in get_test.cu
3939

40-
TEST_CASE("Find next set test", "")
40+
TEST_CASE("dynamic_bitset find next set test", "")
4141
{
4242
cuco::experimental::detail::dynamic_bitset bv;
4343

tests/dynamic_bitset/get_test.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ __global__ void test_kernel(BitsetRef ref, size_type num_elements, OutputIt outp
3737

3838
bool modulo_bitgen(uint64_t i) { return i % 7 == 0; }
3939

40-
TEST_CASE("Get test", "")
40+
TEST_CASE("dynamic_bitset get test", "")
4141
{
4242
cuco::experimental::detail::dynamic_bitset bv;
4343

tests/dynamic_bitset/rank_test.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@
2626

2727
extern bool modulo_bitgen(uint64_t i); // Defined in get_test.cu
2828

29-
TEST_CASE("Rank test", "")
29+
TEST_CASE("dynamic_bitset rank test", "")
3030
{
3131
cuco::experimental::detail::dynamic_bitset bv;
3232

tests/dynamic_bitset/select_test.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@ __global__ void select_false_kernel(BitsetRef ref, size_type num_elements, Outpu
3737

3838
extern bool modulo_bitgen(uint64_t i); // Defined in get_test.cu
3939

40-
TEST_CASE("Select test", "")
40+
TEST_CASE("dynamic_bitset select test", "")
4141
{
4242
cuco::experimental::detail::dynamic_bitset bv;
4343

tests/dynamic_bitset/size_test.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
1818

1919
#include <catch2/catch_test_macros.hpp>
2020

21-
TEST_CASE("Size computation", "")
21+
TEST_CASE("dynamic_bitset size computation test", "")
2222
{
2323
cuco::experimental::detail::dynamic_bitset bv;
2424
using size_type = std::size_t;

tests/dynamic_map/erase_test.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@
2525

2626
#include <catch2/catch_template_test_macros.hpp>
2727

28-
TEMPLATE_TEST_CASE_SIG("erase key",
28+
TEMPLATE_TEST_CASE_SIG("dynamic_map erase tests",
2929
"",
3030
((typename Key, typename Value), Key, Value),
3131
(int32_t, int32_t),

tests/dynamic_map/unique_sequence_test.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@
3030

3131
#include <catch2/catch_template_test_macros.hpp>
3232

33-
TEMPLATE_TEST_CASE_SIG("Unique sequence of keys",
33+
TEMPLATE_TEST_CASE_SIG("dynamic_map unique sequence tests",
3434
"",
3535
((typename Key, typename Value), Key, Value),
3636
(int32_t, int32_t),

0 commit comments

Comments
 (0)