Helper functions for testing.
More...
#include "bphash/Hasher.hpp"
#include "bphash/types/All.hpp"
#include <iostream>
Go to the source code of this file.
|
template<typename T > |
void | test_single (const T &val, bphash::HashType htype, std::vector< bphash::HashValue > &all_hashes) |
|
template<typename To , typename From > |
void | test_values (const std::vector< From > &vals, bphash::HashType htype, std::vector< bphash::HashValue > &all_hashes) |
|
template<typename To , typename From > |
void | test_pointers (const std::vector< From > &vals, bphash::HashType htype, std::vector< bphash::HashValue > &all_hashes) |
|
template<typename To , typename From , size_t N> |
void | test_array_helper (const std::vector< From > &vec, bphash::HashType htype, std::vector< bphash::HashValue > &all_hashes) |
|
template<typename To , typename From > |
void | test_arrays (const std::vector< From > &values, bphash::HashType htype, std::vector< bphash::HashValue > &all_hashes) |
|
template<typename To , typename From > |
void | test_containers (const std::vector< From > &values, bphash::HashType htype, std::vector< bphash::HashValue > &all_hashes) |
|
template<typename To , typename From > |
void | test_fundamental (const std::vector< From > &values, bphash::HashType htype, std::vector< bphash::HashValue > &all_hashes) |
|
template<typename To1 , typename To2 , typename From1 , typename From2 > |
void | test_tuples_2 (const std::vector< From1 > &values1, const std::vector< From2 > &values2, bphash::HashType htype, std::vector< bphash::HashValue > &all_hashes) |
|
|
static const std::vector< long > | int_test |
|
static const std::vector< double > | dbl_test |
|
static std::vector< const char * > | str_test |
|
Helper functions for testing.
Definition in file test_helpers.hpp.
#define HANDLE_TEST_ARRAY |
( |
|
N | ) |
|
Value:case N: \
test_array_helper<To, From, N>(values, htype, all_hashes); \
break;
Definition at line 129 of file test_helpers.hpp.
template<typename To , typename From , size_t N>
template<typename To , typename From >
template<typename To , typename From >
template<typename To , typename From >
template<typename To , typename From >
template<typename To1 , typename To2 , typename From1 , typename From2 >
void test_tuples_2 |
( |
const std::vector< From1 > & |
values1, |
|
|
const std::vector< From2 > & |
values2, |
|
|
bphash::HashType |
htype, |
|
|
std::vector< bphash::HashValue > & |
all_hashes |
|
) |
| |
template<typename To , typename From >
const std::vector<double> dbl_test |
|
static |
Initial value:{ 0, 1.0, 1.000001, 1.12e12, 1.12001e12, 1.12001e-12
-1.0, -1.000001, -1.12e12, -1.12001e12, -1.12001e-12}
Definition at line 29 of file test_helpers.hpp.
const std::vector<long> int_test |
|
static |
Initial value:{ 0, 1, 10, 100, 241,
-1, -10, -100, -241}
Definition at line 25 of file test_helpers.hpp.
std::vector<const char *> str_test |
|
static |
Initial value:{"",
" ",
"\n",
"String1",
"String 1",
"string1",
"string 1",
"STRING1",
" String1",
"String1!",
"String1!\n"}
Definition at line 33 of file test_helpers.hpp.