Lines Matching +full:3 +full:a

21 	/* Test the different ways of initialising a hashtable. */  in hashtable_test_hash_init()
23 DECLARE_HASHTABLE(hash2, 3); in hashtable_test_hash_init()
36 struct hashtable_test_entry a; in hashtable_test_hash_empty() local
41 a.key = 1; in hashtable_test_hash_empty()
42 a.data = 13; in hashtable_test_hash_empty()
43 hash_add(hash, &a.node, a.key); in hashtable_test_hash_empty()
51 struct hashtable_test_entry a, b; in hashtable_test_hash_hashed() local
54 a.key = 1; in hashtable_test_hash_hashed()
55 a.data = 13; in hashtable_test_hash_hashed()
56 hash_add(hash, &a.node, a.key); in hashtable_test_hash_hashed()
61 KUNIT_EXPECT_TRUE(test, hash_hashed(&a.node)); in hashtable_test_hash_hashed()
67 struct hashtable_test_entry a, b, *x; in hashtable_test_hash_add() local
69 DEFINE_HASHTABLE(hash, 3); in hashtable_test_hash_add()
71 a.key = 1; in hashtable_test_hash_add()
72 a.data = 13; in hashtable_test_hash_add()
73 a.visited = 0; in hashtable_test_hash_add()
74 hash_add(hash, &a.node, a.key); in hashtable_test_hash_add()
82 if (x->key == a.key) in hashtable_test_hash_add()
91 KUNIT_EXPECT_EQ(test, a.visited, 1); in hashtable_test_hash_add()
97 struct hashtable_test_entry a, b, *x; in hashtable_test_hash_del() local
100 a.key = 1; in hashtable_test_hash_del()
101 a.data = 13; in hashtable_test_hash_del()
102 hash_add(hash, &a.node, a.key); in hashtable_test_hash_del()
117 hash_del(&a.node); in hashtable_test_hash_del()
125 struct hashtable_test_entry entries[3]; in hashtable_test_hash_for_each()
128 DEFINE_HASHTABLE(hash, 3); in hashtable_test_hash_for_each()
131 for (i = 0; i < 3; i++) { in hashtable_test_hash_for_each()
142 KUNIT_ASSERT_LT_MSG(test, x->key, 3, "Unexpected key in hashtable."); in hashtable_test_hash_for_each()
147 KUNIT_EXPECT_EQ(test, count, 3); in hashtable_test_hash_for_each()
148 for (j = 0; j < 3; j++) in hashtable_test_hash_for_each()
154 struct hashtable_test_entry entries[3]; in hashtable_test_hash_for_each_safe()
158 DEFINE_HASHTABLE(hash, 3); in hashtable_test_hash_for_each_safe()
161 for (i = 0; i < 3; i++) { in hashtable_test_hash_for_each_safe()
172 KUNIT_ASSERT_LT_MSG(test, x->key, 3, "Unexpected key in hashtable."); in hashtable_test_hash_for_each_safe()
180 KUNIT_EXPECT_EQ(test, count, 3); in hashtable_test_hash_for_each_safe()
181 for (j = 0; j < 3; j++) in hashtable_test_hash_for_each_safe()
194 for (i = 0; i < 3; i++) { in hashtable_test_hash_for_each_possible()
202 entries[3].key = 1; in hashtable_test_hash_for_each_possible()
203 entries[3].data = 3; in hashtable_test_hash_for_each_possible()
204 entries[3].visited = 0; in hashtable_test_hash_for_each_possible()
205 hash_add(hash, &entries[3].node, entries[3].key); in hashtable_test_hash_for_each_possible()
216 for (j = 0; j < 3; j++) in hashtable_test_hash_for_each_possible()
232 KUNIT_EXPECT_EQ(test, entries[3].visited, 1); in hashtable_test_hash_for_each_possible()
234 KUNIT_EXPECT_EQ(test, count, 3); in hashtable_test_hash_for_each_possible()
235 KUNIT_EXPECT_EQ(test, entries[3].visited, 0); in hashtable_test_hash_for_each_possible()
249 for (i = 0; i < 3; i++) { in hashtable_test_hash_for_each_possible_safe()
257 entries[3].key = 1; in hashtable_test_hash_for_each_possible_safe()
258 entries[3].data = 3; in hashtable_test_hash_for_each_possible_safe()
259 entries[3].visited = 0; in hashtable_test_hash_for_each_possible_safe()
260 hash_add(hash, &entries[3].node, entries[3].key); in hashtable_test_hash_for_each_possible_safe()
274 for (j = 0; j < 3; j++) in hashtable_test_hash_for_each_possible_safe()
290 KUNIT_EXPECT_EQ(test, entries[3].visited, 1); in hashtable_test_hash_for_each_possible_safe()
292 KUNIT_EXPECT_EQ(test, count, 3); in hashtable_test_hash_for_each_possible_safe()
293 KUNIT_EXPECT_EQ(test, entries[3].visited, 0); in hashtable_test_hash_for_each_possible_safe()