Lines Matching defs:val
249 void *val1 = (void*) "val 1";
250 void *val2 = (void*) "val 2";
280 hashmap_put(m, "key 1", (void*) "val 1");
281 hashmap_put(m, "key 2", (void*) "val 2");
284 assert_se(streq(r, "val 1"));
287 assert_se(streq(r, "val 2"));
295 char val1[] = "val 1";
296 char val2[] = "val 2";
326 r = hashmap_remove_value(NULL, "key 1", (void*) "val 1");
332 r = hashmap_remove_value(m, "key 1", (void*) "val 1");
335 hashmap_put(m, "key 1", (void*) "val 1");
336 hashmap_put(m, "key 2", (void*) "val 2");
338 r = hashmap_remove_value(m, "key 1", (void*) "val 1");
339 assert_se(streq(r, "val 1"));
342 assert_se(streq(r, "val 2"));
345 r = hashmap_remove_value(m, "key 2", (void*) "val 1");
349 assert_se(streq(r, "val 2"));
364 valid = hashmap_put(m, "key 1", (void*) (const char *) "val 1");
367 valid = hashmap_remove_and_put(NULL, "key 1", "key 2", (void*) (const char *) "val 2");
370 valid = hashmap_remove_and_put(m, "key 1", "key 2", (void*) (const char *) "val 2");
374 assert_se(streq(r, "val 2"));
377 valid = hashmap_put(m, "key 3", (void*) (const char *) "val 3");
379 valid = hashmap_remove_and_put(m, "key 3", "key 2", (void*) (const char *) "val 2");
467 hashmap_put(m, key, (void*) (const char*) "my dummy val");
577 val1 = strdup("my val");
597 val1 = strdup("my val");
614 val1 = strdup("my val");
616 val2 = strdup("my val");
618 val3 = strdup("my val");
620 val4 = strdup("my val");
642 char *val;
644 val = strdup("my val");
645 assert_se(val);
652 hashmap_put(m, "Key 1", val);
655 assert_se(streq(r, val));
667 char *val;
671 val = strdup("my val");
672 assert_se(val);
682 hashmap_put(m, key_copy, val);
686 assert_se(streq(r, val));
752 assert_se(hashmap_put(m, "key 1", (void*) "val 1") == 1);
753 assert_se(streq(hashmap_first(m), "val 1"));
754 assert_se(hashmap_put(m, "key 2", (void*) "val 2") == 1);
756 assert_se(streq(hashmap_first(m), "val 1"));
758 assert_se(streq(hashmap_first(m), "val 2"));
795 char *val;
804 while ((val = hashmap_steal_first(m)))
805 seen[strlen(val) - 1]++;
837 assert_se(hashmap_put(m, "key 1", (void*) "val 1") == 1);