aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/statistics/hash_table_test.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-03-25 13:38:14 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-03-25 13:38:14 -0700
commitf40df23eebdc0fb367ea265be98a4f86b6efbc94 (patch)
treebdad84361157815b91138e2a6ebdbedefe7c19c7 /test/core/statistics/hash_table_test.c
parentb7b20fee9649c57df0aef8cb54f85465312bab80 (diff)
Auto-changes
Diffstat (limited to 'test/core/statistics/hash_table_test.c')
-rw-r--r--test/core/statistics/hash_table_test.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/core/statistics/hash_table_test.c b/test/core/statistics/hash_table_test.c
index 3b119dbc0c..9b2b683393 100644
--- a/test/core/statistics/hash_table_test.c
+++ b/test/core/statistics/hash_table_test.c
@@ -37,11 +37,11 @@
#include "src/core/statistics/hash_table.h"
-#include "src/core/support/murmur_hash.h"
-#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
+#include "src/core/support/murmur_hash.h"
+#include "src/core/support/string.h"
#include "test/core/util/test_config.h"
static uint64_t hash64(const void *k) {
@@ -65,8 +65,8 @@ static void free_data(void *data) { gpr_free(data); }
static void test_create_table(void) {
/* Create table with uint64 key type */
census_ht *ht = NULL;
- census_ht_option ht_options = {CENSUS_HT_UINT64, 1999, NULL, NULL, NULL,
- NULL};
+ census_ht_option ht_options = {
+ CENSUS_HT_UINT64, 1999, NULL, NULL, NULL, NULL};
ht = census_ht_create(&ht_options);
GPR_ASSERT(ht != NULL);
GPR_ASSERT(census_ht_get_size(ht) == 0);
@@ -120,8 +120,8 @@ static void test_table_with_int_key(void) {
/* Test that there is no memory leak when keys and values are owned by table. */
static void test_value_and_key_deleter(void) {
- census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64, &cmp_str_keys,
- &free_data, &free_data};
+ census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64,
+ &cmp_str_keys, &free_data, &free_data};
census_ht *ht = census_ht_create(&opt);
census_ht_key key;
char *val = NULL;
@@ -185,8 +185,8 @@ static void test_simple_add_and_erase(void) {
}
static void test_insertion_and_deletion_with_high_collision_rate(void) {
- census_ht_option opt = {CENSUS_HT_POINTER, 13, &force_collision,
- &cmp_str_keys, NULL, NULL};
+ census_ht_option opt = {CENSUS_HT_POINTER, 13, &force_collision,
+ &cmp_str_keys, NULL, NULL};
census_ht *ht = census_ht_create(&opt);
char key_str[1000][GPR_LTOA_MIN_BUFSIZE];
uint64_t val = 0;
@@ -209,12 +209,12 @@ static void test_insertion_and_deletion_with_high_collision_rate(void) {
}
static void test_table_with_string_key(void) {
- census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64, &cmp_str_keys, NULL,
- NULL};
+ census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64,
+ &cmp_str_keys, NULL, NULL};
census_ht *ht = census_ht_create(&opt);
- const char *keys[] = {"k1", "a", "000", "apple",
- "banana_a_long_long_long_banana", "%$", "111", "foo",
- "b"};
+ const char *keys[] = {
+ "k1", "a", "000", "apple", "banana_a_long_long_long_banana",
+ "%$", "111", "foo", "b"};
const int vals[] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
int i = 0;
GPR_ASSERT(ht != NULL);