Exemplo n.º 1
0
void			find_len(t_list **lst, t_display *display)
{
	t_list			*tmp;

	tmp = *lst;
	while (tmp)
	{
		test_links(display, tmp);
		test_owner(display, tmp);
		test_group(display, tmp);
		test_size(display, tmp);
		tmp = tmp->next;
	}
}
Exemplo n.º 2
0
/****************************************************************
**
**  test_iterate(): Main iteration testing routine.
**
****************************************************************/
void
test_iterate(void)
{
    hid_t fapl, fapl2;          /* File access property lists */
    unsigned new_format;        /* Whether to use the new format or not */
    herr_t ret;		        /* Generic return value */

    /* Output message about test being performed */
    MESSAGE(5, ("Testing Iteration Operations\n"));

    /* Get the default FAPL */
    fapl = H5Pcreate(H5P_FILE_ACCESS);
    CHECK(fapl, FAIL, "H5Pcreate");

    /* Copy the file access property list */
    fapl2 = H5Pcopy(fapl);
    CHECK(fapl2, FAIL, "H5Pcopy");

    /* Set the "use the latest version of the format" bounds for creating objects in the file */
    ret = H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
    CHECK(ret, FAIL, "H5Pset_libver_bounds");

    /* These next tests use the same file */
    for(new_format = FALSE; new_format <= TRUE; new_format++) {
        test_iter_group(new_format ? fapl2 : fapl, new_format); /* Test group iteration */
        test_iter_group_large(new_format ? fapl2 : fapl);   /* Test group iteration for large # of objects */
        test_iter_attr(new_format ? fapl2 : fapl, new_format);  /* Test attribute iteration */
        test_grp_memb_funcs(new_format ? fapl2 : fapl);     /* Test group member information functions */
        test_links(new_format ? fapl2 : fapl);              /* Test soft and hard link iteration */
    } /* end for */

    /* Close FAPLs */
    ret = H5Pclose(fapl);
    CHECK(ret, FAIL, "H5Pclose");
    ret = H5Pclose(fapl2);
    CHECK(ret, FAIL, "H5Pclose");
}   /* test_iterate() */
Exemplo n.º 3
0
Arquivo: main.c Projeto: ShabbyX/shDS
int main(int argc, char **argv)
{
	bool good = true;

	srand(time(NULL));
	if (argc < 2)
	{
		if (generate_data(RANDOM_SIZE))
			goto exit_no_mem;
	}
	else
	{
		if (read_data(argv[1]))
			goto exit_bad_input;
	}

	good = good && test_init() == 0;
	good = good && test_append() == 0;
	good = good && test_duplicate() == 0;
	good = good && test_links() == 0;
	good = good && test_prepend() == 0;
	good = good && test_links() == 0;
	good = good && test_concat() == 0;
	good = good && test_links() == 0;
	good = good && test_break() == 0;
	good = good && test_links() == 0;
	good = good && test_insert() == 0;
	good = good && test_links() == 0;
	good = good && test_compare() == 0;
	good = good && test_delete() == 0;
	good = good && test_links() == 0;
	good = good && test_clear() == 0;
	good = good && test_free() == 0;

	cleanup_data();

	return good?EXIT_SUCCESS:EXIT_FAILURE;
exit_bad_input:
exit_no_mem:
	cleanup_data();
	return EXIT_FAILURE;
}