Пример #1
0
/*---------------------------------------------------------------------------*/
usys     test_full (usys test_num, usys arg)
{
    switch (test_num)
    {
       case 0:
	    test_core () ;
	    return GOOD ;

       case 1:
	    test_speed (arg) ;
	    return GOOD ;

       case 2:
	    test_timers (arg) ;
	    return GOOD ;

       case 3:
	    test_msgs (arg) ;
	    return GOOD ;

       case 4:
	    test_tasks (arg) ;
	    return GOOD ;

       default:
            break ;
    }

    return GOOD ;

} /* End of function test_full() */
Пример #2
0
/**
 * \brief Low power application entry point.
 *
 * \return Unused (ANSI-C compatibility).
 */
int main(void)
{
	/* Initialize the SAM system */
	sysclk_init();
	g_ul_current_mck = sysclk_get_cpu_hz();
	board_init();

	/* Initialize the console uart */
	configure_console();

	/* Output example information */
	puts(STRING_HEADER);

	/* Initialize the chip for the power consumption test */
	init_chip();

	/* Set default clock and re-configure UART */
	set_default_working_clock();
	reconfigure_console(g_ul_current_mck, CONF_UART_BAUDRATE);

	/* Test core consumption */
	test_core();

	while (1) {
	}
}
Пример #3
0
/*-------------------------------------------------------------------------
 * Function:    main
 *
 * Purpose:     Tests the basic features of Virtual File Drivers
 *
 * Return:      Success:        0
 *              Failure:        1
 *
 * Programmer:  Raymond Lu
 *              Tuesday, Sept 24, 2002
 *
 *-------------------------------------------------------------------------
 */
int
main(void)
{
    int nerrors = 0;

    h5_reset();

    printf("Testing basic Virtual File Driver functionality.\n");

    nerrors += test_sec2() < 0           ? 1 : 0;
    nerrors += test_core() < 0           ? 1 : 0;
    nerrors += test_family() < 0         ? 1 : 0;
    nerrors += test_family_compat() < 0  ? 1 : 0;
    nerrors += test_multi() < 0          ? 1 : 0;
    nerrors += test_multi_compat() < 0   ? 1 : 0;
    nerrors += test_direct() < 0         ? 1 : 0;
    nerrors += test_log() < 0            ? 1 : 0;
    nerrors += test_stdio() < 0          ? 1 : 0;
    nerrors += test_windows() < 0        ? 1 : 0;

    if(nerrors) {
  printf("***** %d Virtual File Driver TEST%s FAILED! *****\n",
    nerrors, nerrors > 1 ? "S" : "");
  return 1;
    }

    printf("All Virtual File Driver tests passed.\n");
    return 0;
}
Пример #4
0
int main(int argc, char *argv[]) {

	cunit_setup = setup;
	cunit_teardown = teardown;

	test_core();
	test_init_shutdown();

	freelist_init(HEAP_SIZE);

	test(malloc0);
	test(malloc1);
	test(malloc_word_size);
	test(malloc_2x_word_size);
	test(one_malloc);
	test(two_malloc);
	test(free_NULL);
	test(free_random);
	test(free_stale);
	test(malloc_then_free);
    test(three_malloc);
    test(five_malloc);
	test(free_without_merging);
	test(merge_with_head);
    test(merge_with_end);
    test(merge_with_middle);
    test(fuse_to_one);
    test(long_freelist);
    test(search_along_list);
    test(exact_fit);
    test(split_chunk);
}
Пример #5
0
Файл: core.c Проект: paa/vlc
int main (void)
{
    test_init();

    test_core (test_defaults_args, test_defaults_nargs);

    return 0;
}
Пример #6
0
/*-------------------------------------------------------------------------
 * Function:    main
 *
 * Purpose:     Tests the basic features of Virtual File Drivers
 *
 * Return:      Success:        exit(0)
 *              Failure:        exit(1)
 *
 * Programmer:  Raymond Lu
 *              Tuesday, Sept 24, 2002
 *
 *-------------------------------------------------------------------------
 */
int
main(void)
{
    int nerrors = 0;

    h5_reset();

    nerrors += test_sec2() < 0      ? 1 : 0;
    nerrors += test_core() < 0      ? 1 : 0;
    nerrors += test_family() < 0    ? 1 : 0;
    nerrors += test_family_compat() < 0    ? 1 : 0;
    nerrors += test_multi() < 0     ? 1 : 0;
    nerrors += test_direct() < 0      ? 1 : 0;

    if(nerrors) {
	printf("***** %d Virtual File Driver TEST%s FAILED! *****\n",
		nerrors, nerrors > 1 ? "S" : "");
	return 1;
    }

    printf("All Virtual File Driver tests passed.\n");
    return 0;
}
Пример #7
0
int main(int argc, char *argv[]) {
//	long pagesize = sysconf(_SC_PAGE_SIZE); // 4096 on my mac laptop
//	printf("pagesize == %ld\n", pagesize);

	cunit_setup = setup;
	cunit_teardown = teardown;

	test_core();
	test_init_shutdown();

	freelist_init(HEAP_SIZE);

	test(malloc0);
	test(malloc1);
	test(malloc_word_size);
	test(malloc_2x_word_size);
	test(one_malloc);
	test(two_malloc);
	test(free_NULL);
	test(free_random);
	test(free_stale);
	test(malloc_then_free);
}