Searched refs:assert_return (Results 1 – 7 of 7) sorted by relevance
/external/kmod/testsuite/ |
D | test-array.c | 36 assert_return(array.count == 1, EXIT_FAILURE); in test_array_append1() 37 assert_return(array.array[0] == c1, EXIT_FAILURE); in test_array_append1() 57 assert_return(array.count == 3, EXIT_FAILURE); in test_array_append2() 58 assert_return(array.array[0] == c1, EXIT_FAILURE); in test_array_append2() 59 assert_return(array.array[1] == c2, EXIT_FAILURE); in test_array_append2() 60 assert_return(array.array[2] == c3, EXIT_FAILURE); in test_array_append2() 82 assert_return(array.count == 3, EXIT_FAILURE); in test_array_append_unique() 83 assert_return(array.array[0] == c1, EXIT_FAILURE); in test_array_append_unique() 84 assert_return(array.array[1] == c2, EXIT_FAILURE); in test_array_append_unique() 85 assert_return(array.array[2] == c3, EXIT_FAILURE); in test_array_append_unique() [all …]
|
D | test-list.c | 46 assert_return(len(list) == N, EXIT_FAILURE); in test_list_last() 49 assert_return(last->data == v[N - 1], EXIT_FAILURE); in test_list_last() 65 assert_return(l == NULL, EXIT_FAILURE); in test_list_prev() 71 assert_return(l == NULL, EXIT_FAILURE); in test_list_prev() 77 assert_return(p->data == v[i], EXIT_FAILURE); in test_list_prev() 95 assert_return(len(list) == N, EXIT_FAILURE); in test_list_remove_n_latest() 98 assert_return(len(list) == N - M, EXIT_FAILURE); in test_list_remove_n_latest() 102 assert_return(l->data == v[i], EXIT_FAILURE); in test_list_remove_n_latest() 124 assert_return(len(list) == N - 1, EXIT_FAILURE); in test_list_remove_data() 127 assert_return(l->data != removed, EXIT_FAILURE); in test_list_remove_data() [all …]
|
D | test-scratchbuf.c | 34 assert_return(scratchbuf_alloc(&sbuf, strlen(smallstr) + 1) == 0, EXIT_FAILURE); in test_scratchbuf_onlystack() 35 assert_return(sbuf.need_free == false, EXIT_FAILURE); in test_scratchbuf_onlystack() 39 assert_return(scratchbuf_alloc(&sbuf, strlen(smallstr) + 1) == 0, EXIT_FAILURE); in test_scratchbuf_onlystack() 40 assert_return(sbuf.need_free == false, EXIT_FAILURE); in test_scratchbuf_onlystack() 44 assert_return(strcmp(scratchbuf_str(&sbuf), smallstr) == 0, EXIT_FAILURE); in test_scratchbuf_onlystack() 63 assert_return(scratchbuf_alloc(&sbuf, strlen(smallstr) + 1) == 0, EXIT_FAILURE); in test_scratchbuf_heap() 64 assert_return(sbuf.need_free == false, EXIT_FAILURE); in test_scratchbuf_heap() 68 assert_return(scratchbuf_alloc(&sbuf, strlen(largestr) + 1) == 0, EXIT_FAILURE); in test_scratchbuf_heap() 69 assert_return(sbuf.need_free == true, EXIT_FAILURE); in test_scratchbuf_heap() 70 assert_return(sbuf.size == strlen(largestr) + 1, EXIT_FAILURE); in test_scratchbuf_heap() [all …]
|
D | test-hash.c | 40 assert_return(h != NULL, EXIT_FAILURE); in test_hash_new() 58 assert_return(hash_get_count(h) == 3, EXIT_FAILURE); in test_hash_get_count() 82 assert_return(r == 0, EXIT_FAILURE); in test_hash_replace() 83 assert_return(hash_get_count(h) == 3, EXIT_FAILURE); in test_hash_replace() 86 assert_return(streq(v, v4), EXIT_FAILURE); in test_hash_replace() 88 assert_return(freecount == 1, EXIT_FAILURE); in test_hash_replace() 109 assert_return(r == 0, EXIT_FAILURE); in test_hash_replace_failing() 113 assert_return(r != 0, EXIT_FAILURE); in test_hash_replace_failing() 114 assert_return(hash_get_count(h) == 3, EXIT_FAILURE); in test_hash_replace_failing() 117 assert_return(streq(v, v1), EXIT_FAILURE); in test_hash_replace_failing() [all …]
|
D | test-strbuf.c | 45 assert_return(result1 == buf.bytes, EXIT_FAILURE); in test_strbuf_pushchar() 46 assert_return(streq(result1, TEXT), EXIT_FAILURE); in test_strbuf_pushchar() 50 assert_return(streq(result1, result2), EXIT_FAILURE); in test_strbuf_pushchar() 78 assert_return(result1 == buf.bytes, EXIT_FAILURE); in test_strbuf_pushchars() 79 assert_return(streq(result1, TEXT), EXIT_FAILURE); in test_strbuf_pushchars() 83 assert_return(!streq(TEXT, result2), EXIT_FAILURE); in test_strbuf_pushchars() 84 assert_return(strncmp(TEXT, result2, strlen(TEXT) - lastwordlen) == 0, in test_strbuf_pushchars() 86 assert_return(result2[strlen(TEXT) - lastwordlen] == '\0', in test_strbuf_pushchars()
|
D | test-util.c | 110 assert_return(streq(s, res), EXIT_FAILURE); in test_strchr_replace() 137 assert_return(streq(val, iter->res), EXIT_FAILURE); in test_underscores() 171 assert_return(path_ends_with_kmod_ext(iter->val, in test_path_ends_with_kmod_ext() 191 assert_return(fd >= 0, EXIT_FAILURE); in test_write_str_safe() 218 assert_return(!overflow, EXIT_FAILURE); in test_addu64_overflow() 219 assert_return(res == UINT64_MAX, EXIT_FAILURE); in test_addu64_overflow() 222 assert_return(overflow, EXIT_FAILURE); in test_addu64_overflow()
|
D | testsuite.h | 130 #define assert_return(expr, r) \ macro
|