Exemplo n.º 1
0
/* main:
 *
 * Description of test procedure here.
 */
int main(int argc, char *argv[])
{
    ibuf s = NULL;
    int result = 0;

    /* Create a tree */
    debug("Creating string... ");
    s = ibuf_init();
    if (s == NULL) {
        printf("FAILED\n");
        return 1;
    }
    debug("Succeeded.\n");

    /* Run tests */
    result |= test_add(s);
    result |= test_addchar(s);
    result |= test_delchar(s);
    result |= test_dup(s);
    result |= test_trim(s);

    debug("Destroying string...\n");
    ibuf_free(s);

    if (result) {
        printf("FAILED\n");
        return 2;
    }

    printf("PASSED\n");
    return 0;
}
Exemplo n.º 2
0
int main(int argc, char** argv)
{
	printf("KEY META     TESTS\n");
	printf("==================\n\n");

	init (argc, argv);
	test_basic();
	test_iterate();
	test_size();
	test_uid();
	test_dup();
	test_comment();
	test_owner();
	test_mode();
	test_type();
	test_examples();
	test_copy();
	test_ro();
	test_new();
	test_copyall();


	printf("\ntest_ks RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError);

	return nbError;
}
Exemplo n.º 3
0
int main()
{
    return (
        test_dup() ||
        0
    );
}
Exemplo n.º 4
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;
}