Skip to content

Commit

Permalink
fix: change testing function name
Browse files Browse the repository at this point in the history
  • Loading branch information
reshifr committed May 26, 2022
1 parent ba0d681 commit f51231a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ int main(void) {
TEST(1, set::unit_insert());
TEST(1, set::unit_search());
TEST(1, set::auto_insert());
TEST(1, set::perf_insert());
TEST(1, set::perfom_insert());
return EXIT_SUCCESS;
}
32 changes: 16 additions & 16 deletions tests/set/insert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static void auto_reserve_test(int mode) {
rhis_free(set);
}

#define PERF_INSERT() \
#define PERFOM_INSERT() \
do { \
clock.start(); \
keys.load([&](void* obj) { \
Expand All @@ -108,25 +108,25 @@ static void auto_reserve_test(int mode) {
utils::mprint(set); \
} while(0)

static void perf_init_test(int mode) {
static void perfom_init_test(int mode) {
struct rhis* set;
HANDLE((set=rhis_init(utils::hash, utils::equal,
mode))==NULL, "Error: rhis_init() failed.");
utils::timer clock;
utils::objs keys(3, 15, utils::AUTO_COUNT);
PERF_INSERT();
PERF_INSERT();
PERFOM_INSERT();
PERFOM_INSERT();
rhis_free(set);
}

static void perf_reserve_test(int mode) {
static void perfom_reserve_test(int mode) {
struct rhis* set;
HANDLE((set=rhis_reserve(utils::hash, utils::equal,
utils::UNIT_RESERVE, mode))==NULL, "Error: rhis_reserve() failed.");
utils::timer clock;
utils::objs keys(3, 15, utils::AUTO_COUNT);
PERF_INSERT();
PERF_INSERT();
PERFOM_INSERT();
PERFOM_INSERT();
rhis_free(set);
}

Expand All @@ -152,13 +152,13 @@ void set::auto_insert(void) {
TEST(1, auto_reserve_test(RHI_SHRINK|RHI_EXTEND));
}

void set::perf_insert(void) {
TEST(1, perf_init_test(RHI_FIXED));
TEST(1, perf_init_test(RHI_SHRINK));
TEST(1, perf_init_test(RHI_EXTEND));
TEST(1, perf_init_test(RHI_SHRINK|RHI_EXTEND));
TEST(1, perf_reserve_test(RHI_FIXED));
TEST(1, perf_reserve_test(RHI_SHRINK));
TEST(1, perf_reserve_test(RHI_EXTEND));
TEST(1, perf_reserve_test(RHI_SHRINK|RHI_EXTEND));
void set::perfom_insert(void) {
TEST(1, perfom_init_test(RHI_FIXED));
TEST(1, perfom_init_test(RHI_SHRINK));
TEST(1, perfom_init_test(RHI_EXTEND));
TEST(1, perfom_init_test(RHI_SHRINK|RHI_EXTEND));
TEST(1, perfom_reserve_test(RHI_FIXED));
TEST(1, perfom_reserve_test(RHI_SHRINK));
TEST(1, perfom_reserve_test(RHI_EXTEND));
TEST(1, perfom_reserve_test(RHI_SHRINK|RHI_EXTEND));
}

0 comments on commit f51231a

Please sign in to comment.