Exemple #1
0
void test_string() {
	test_alloc_string();
	test_alloc_string_array();
	test_realloc_string();
	test_init_string();
	test_copy_string();
	test_trim_string();
	test_substr_before();
	test_substr_between();
	test_substr_after();
	test_dyna_strcat();
	test_append_char();
	test_split_string();
	test_split_string_once();
	test_equals_string();
	test_hash_code_string();
	test_strlwr();
}
Exemple #2
0
int main(int argc, char *argv[])
{
    int error_count;

    error_count = 0;
    printf("\n    testing pod_string\n");
    if (POD_STRING_TYPE != 0x61) {
        error_count++;
        printf("    POD_STRING_TYPE is not the expected value.\n");
        printf("        (expected 0x61, got 0x%x.)\n", POD_STRING_TYPE);
    }
    error_count += test_create_and_destroy();
    error_count += test_copy_string();
    error_count += test_compare_string();
    error_count += test_dup();
    error_count += test_append();

    return error_count;
}