Skip to content

Commit

Permalink
Ensure consistent naming for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Nov 19, 2024
1 parent 22bfa8d commit 29f5d27
Show file tree
Hide file tree
Showing 34 changed files with 62 additions and 56 deletions.
8 changes: 6 additions & 2 deletions tests/bloom_filter/arrow_policy_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,12 @@ void test_filter_bitset(Filter& filter, size_t num_keys)
})));
}

TEMPLATE_TEST_CASE_SIG(
"Arrow filter policy bitset validation", "", (class Key), (int32_t), (int64_t), (float))
TEMPLATE_TEST_CASE_SIG("bloom_filter arrow filter policy bitset validation",
"",
(class Key),
(int32_t),
(int64_t),
(float))
{
// Get test settings
auto const [sub_filters, num_keys] = get_arrow_filter_test_settings<Key>();
Expand Down
4 changes: 2 additions & 2 deletions tests/bloom_filter/unique_sequence_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void test_unique_sequence(Filter& filter, size_type num_keys)
}

TEMPLATE_TEST_CASE_SIG(
"Unique sequence with default policy",
"bloom_filter default policy tests",
"",
((class Key, class Policy), Key, Policy),
(int32_t, cuco::default_filter_policy<cuco::xxhash_64<int32_t>, uint32_t, 1>),
Expand All @@ -105,7 +105,7 @@ TEMPLATE_TEST_CASE_SIG(
test_unique_sequence(filter, num_keys);
}

TEMPLATE_TEST_CASE_SIG("Unique sequence with arrow policy",
TEMPLATE_TEST_CASE_SIG("bloom_filter arrow policy tests",
"",
((class Key, class Policy), Key, Policy),
(int32_t, cuco::arrow_filter_policy<int32_t>),
Expand Down
4 changes: 2 additions & 2 deletions tests/dynamic_bitset/find_next_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,7 +37,7 @@ __global__ void find_next_kernel(BitsetRef ref, size_type num_elements, OutputIt

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

TEST_CASE("Find next set test", "")
TEST_CASE("dynamic_bitset find next set test", "")
{
cuco::experimental::detail::dynamic_bitset bv;

Expand Down
4 changes: 2 additions & 2 deletions tests/dynamic_bitset/get_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,7 +37,7 @@ __global__ void test_kernel(BitsetRef ref, size_type num_elements, OutputIt outp

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

TEST_CASE("Get test", "")
TEST_CASE("dynamic_bitset get test", "")
{
cuco::experimental::detail::dynamic_bitset bv;

Expand Down
4 changes: 2 additions & 2 deletions tests/dynamic_bitset/rank_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,7 @@

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

TEST_CASE("Rank test", "")
TEST_CASE("dynamic_bitset rank test", "")
{
cuco::experimental::detail::dynamic_bitset bv;

Expand Down
4 changes: 2 additions & 2 deletions tests/dynamic_bitset/select_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,7 +37,7 @@ __global__ void select_false_kernel(BitsetRef ref, size_type num_elements, Outpu

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

TEST_CASE("Select test", "")
TEST_CASE("dynamic_bitset select test", "")
{
cuco::experimental::detail::dynamic_bitset bv;

Expand Down
4 changes: 2 additions & 2 deletions tests/dynamic_bitset/size_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,7 @@

#include <catch2/catch_test_macros.hpp>

TEST_CASE("Size computation", "")
TEST_CASE("dynamic_bitset size computation test", "")
{
cuco::experimental::detail::dynamic_bitset bv;
using size_type = std::size_t;
Expand Down
4 changes: 2 additions & 2 deletions tests/dynamic_map/erase_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@

#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE_SIG("erase key",
TEMPLATE_TEST_CASE_SIG("dynamic_map erase tests",
"",
((typename Key, typename Value), Key, Value),
(int32_t, int32_t),
Expand Down
4 changes: 2 additions & 2 deletions tests/dynamic_map/unique_sequence_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,7 +30,7 @@

#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE_SIG("Unique sequence of keys",
TEMPLATE_TEST_CASE_SIG("dynamic_map unique sequence tests",
"",
((typename Key, typename Value), Key, Value),
(int32_t, int32_t),
Expand Down
2 changes: 1 addition & 1 deletion tests/static_map/capacity_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <catch2/catch_test_macros.hpp>

TEST_CASE("Static map capacity", "")
TEST_CASE("static_map capacity", "")
{
using Key = int32_t;
using T = int32_t;
Expand Down
2 changes: 1 addition & 1 deletion tests/static_map/custom_type_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct custom_key_equals {
}
};

TEMPLATE_TEST_CASE_SIG("User defined key and value type",
TEMPLATE_TEST_CASE_SIG("static_map custom key and value type",
"",
((typename Key, typename Value), Key, Value),
#if defined(CUCO_HAS_INDEPENDENT_THREADS) // Key type larger than 8B only supported for sm_70 and
Expand Down
2 changes: 1 addition & 1 deletion tests/static_map/heterogeneous_lookup_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct custom_key_equal {
}
};

TEMPLATE_TEST_CASE_SIG("Heterogeneous lookup",
TEMPLATE_TEST_CASE_SIG("static_map heterogeneous lookup",
"",
((typename T, int CGSize), T, CGSize),
#if defined(CUCO_HAS_INDEPENDENT_THREADS) // Key type larger than 8B only supported for sm_70 and
Expand Down
2 changes: 1 addition & 1 deletion tests/static_map/insert_or_assign_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void test_insert_or_assign(Map& map, size_type num_keys)
}

TEMPLATE_TEST_CASE_SIG(
"Insert or assign",
"static_map insert_or_assign",
"",
((typename Key, typename Value, cuco::test::probe_sequence Probe, int CGSize),
Key,
Expand Down
3 changes: 1 addition & 2 deletions tests/static_map/key_sentinel_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ struct custom_equals {
__device__ bool operator()(T lhs, T rhs) const { return A[lhs] == A[rhs]; }
};

TEMPLATE_TEST_CASE_SIG(
"Key comparison against sentinel", "", ((typename T), T), (int32_t), (int64_t))
TEMPLATE_TEST_CASE_SIG("static_map key sentinel tests", "", ((typename T), T), (int32_t), (int64_t))
{
using Key = T;
using Value = T;
Expand Down
2 changes: 1 addition & 1 deletion tests/static_map/rehash_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include <catch2/catch_test_macros.hpp>

TEST_CASE("Rehash", "")
TEST_CASE("static_map rehash", "")
{
using key_type = int;
using mapped_type = long;
Expand Down
2 changes: 1 addition & 1 deletion tests/static_map/shared_memory_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ __global__ void shared_memory_test_kernel(Ref* maps,
}
}

TEMPLATE_TEST_CASE_SIG("Shared memory static map",
TEMPLATE_TEST_CASE_SIG("static_map shared memory tests",
"",
((typename Key, typename Value), Key, Value),
(int32_t, int32_t),
Expand Down
4 changes: 2 additions & 2 deletions tests/static_multimap/custom_pair_retrieve_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -188,7 +188,7 @@ void test_non_shmem_pair_retrieve(Map& map, std::size_t const num_pairs)
}

TEMPLATE_TEST_CASE_SIG(
"Tests of non-shared-memory pair_retrieve",
"static_multimap non-shared-memory pair_retrieve",
"",
((typename Key, typename Value, cuco::test::probe_sequence Probe), Key, Value, Probe),
(int32_t, int32_t, cuco::test::probe_sequence::linear_probing),
Expand Down
2 changes: 1 addition & 1 deletion tests/static_multimap/custom_type_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void test_custom_key_value_type(Map& map, std::size_t num_pairs)
}
}

TEMPLATE_TEST_CASE_SIG("User defined key and value type",
TEMPLATE_TEST_CASE_SIG("static_multimap user defined key and value type",
"",
((cuco::test::probe_sequence Probe), Probe),
(cuco::test::probe_sequence::linear_probing),
Expand Down
4 changes: 2 additions & 2 deletions tests/static_multimap/heterogeneous_lookup_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,7 +80,7 @@ struct custom_key_equal {
}
};

TEMPLATE_TEST_CASE("Heterogeneous lookup",
TEMPLATE_TEST_CASE("static_multimap heterogeneous lookup",
"",
#if defined(CUCO_HAS_INDEPENDENT_THREADS) // Key type larger than 8B only supported for sm_70 and
// up
Expand Down
4 changes: 2 additions & 2 deletions tests/static_multimap/multiplicity_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -147,7 +147,7 @@ void test_multiplicity_two(Map& map, std::size_t num_items)
}

TEMPLATE_TEST_CASE_SIG(
"Multiplicity equals two",
"static_multimap multiplicity tests",
"",
((typename Key, typename Value, cuco::test::probe_sequence Probe), Key, Value, Probe),
(int32_t, int32_t, cuco::test::probe_sequence::linear_probing),
Expand Down
4 changes: 2 additions & 2 deletions tests/static_multimap/non_match_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -114,7 +114,7 @@ void test_non_matches(Map& map, PairIt pair_begin, KeyIt key_begin, std::size_t
}

TEMPLATE_TEST_CASE_SIG(
"Tests of non-matches",
"static_multimap non-match tests",
"",
((typename Key, typename Value, cuco::test::probe_sequence Probe), Key, Value, Probe),
(int32_t, int32_t, cuco::test::probe_sequence::linear_probing),
Expand Down
4 changes: 2 additions & 2 deletions tests/static_multimap/pair_function_test.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -108,7 +108,7 @@ void test_pair_functions(Map& map, PairIt pair_begin, std::size_t num_pairs)
}

TEMPLATE_TEST_CASE_SIG(
"Tests of pair functions",
"static_multimap pair functions",
"",
((typename Key, typename Value, cuco::test::probe_sequence Probe), Key, Value, Probe),
(int32_t, int32_t, cuco::test::probe_sequence::linear_probing),
Expand Down
2 changes: 1 addition & 1 deletion tests/static_set/capacity_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <catch2/catch_test_macros.hpp>

TEST_CASE("Static set capacity", "")
TEST_CASE("static_set capacity", "")
{
using Key = int32_t;
using ProbeT = cuco::double_hashing<1, cuco::default_hash_function<Key>>;
Expand Down
7 changes: 5 additions & 2 deletions tests/static_set/heterogeneous_lookup_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ struct custom_key_equal {
}
};

TEMPLATE_TEST_CASE_SIG(
"Heterogeneous lookup", "", ((typename T, int CGSize), T, CGSize), (int32_t, 1), (int32_t, 2))
TEMPLATE_TEST_CASE_SIG("static_set heterogeneous lookup",
"",
((typename T, int CGSize), T, CGSize),
(int32_t, 1),
(int32_t, 2))
{
using Key = T;
using InsertKey = key_pair<T>;
Expand Down
2 changes: 1 addition & 1 deletion tests/static_set/rehash_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <catch2/catch_test_macros.hpp>

TEST_CASE("Rehash", "")
TEST_CASE("static_set rehash", "")
{
using key_type = int;

Expand Down
2 changes: 1 addition & 1 deletion tests/static_set/retrieve_all_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void test_unique_sequence(Set& set, std::size_t num_keys)
}

TEMPLATE_TEST_CASE_SIG(
"Retrieve all",
"static_set::retrieve_all tests",
"",
((typename Key, cuco::test::probe_sequence Probe, int CGSize), Key, Probe, CGSize),
(int32_t, cuco::test::probe_sequence::double_hashing, 1),
Expand Down
2 changes: 1 addition & 1 deletion tests/static_set/retrieve_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void test_unique_sequence(Set& set, std::size_t num_keys)
}

TEMPLATE_TEST_CASE_SIG(
"SetRetrieve",
"static_set retrieve",
"",
((typename Key, cuco::test::probe_sequence Probe, int CGSize), Key, Probe, CGSize),
(int32_t, cuco::test::probe_sequence::double_hashing, 1),
Expand Down
4 changes: 2 additions & 2 deletions tests/static_set/shared_memory_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ __global__ void shared_memory_test_kernel(Ref* sets,
}
}

TEMPLATE_TEST_CASE_SIG("Shared memory static set", "", ((typename Key), Key), (int32_t), (int64_t))
TEMPLATE_TEST_CASE_SIG("static_set shared memory", "", ((typename Key), Key), (int32_t), (int64_t))
{
constexpr std::size_t number_of_sets = 1000;
constexpr std::size_t elements_in_set = 500;
Expand Down Expand Up @@ -187,7 +187,7 @@ __global__ void shared_memory_hash_set_kernel(bool* key_found)
if (retrieved_it != find_ref.end() && *retrieved_it == rank) { key_found[index] = true; }
}

TEST_CASE("static set shared memory slots.", "")
TEST_CASE("static_set shared memory slots.", "")
{
constexpr std::size_t N = 256;
[[maybe_unused]] auto constexpr num_windows =
Expand Down
2 changes: 1 addition & 1 deletion tests/static_set/size_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include <catch2/catch_test_macros.hpp>

TEST_CASE("Size computation", "")
TEST_CASE("static_set size computation", "")
{
constexpr std::size_t num_keys{400};

Expand Down
2 changes: 1 addition & 1 deletion tests/static_set/unique_sequence_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void test_unique_sequence(Set& set, size_type num_keys)
}

TEMPLATE_TEST_CASE_SIG(
"Unique sequence",
"static_set unique sequence",
"",
((typename Key, cuco::test::probe_sequence Probe, int CGSize), Key, Probe, CGSize),
(int32_t, cuco::test::probe_sequence::double_hashing, 1),
Expand Down
2 changes: 1 addition & 1 deletion tests/utility/extent_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <catch2/catch_template_test_macros.hpp>

TEMPLATE_TEST_CASE_SIG(
"Extent tests", "", ((typename SizeType), SizeType), (int32_t), (int64_t), (std::size_t))
"utility extent tests", "", ((typename SizeType), SizeType), (int32_t), (int64_t), (std::size_t))
{
SizeType constexpr num = 1234;
SizeType constexpr gold_reference = 314; // 157 x 2
Expand Down
Loading

0 comments on commit 29f5d27

Please sign in to comment.