当前位置: 首页>>代码示例>>C++>>正文


C++ run_tests函数代码示例

本文整理汇总了C++中run_tests函数的典型用法代码示例。如果您正苦于以下问题:C++ run_tests函数的具体用法?C++ run_tests怎么用?C++ run_tests使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了run_tests函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int
main (int   argc,
      char *argv[])
{

	#ifdef __SYMBIAN32__
  	g_log_set_handler (NULL, G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG, &mrtLogHandler, NULL);
  	g_set_print_handler(mrtPrintHandler);
  	#endif

  run_tests ();
  
	#ifdef __SYMBIAN32__
  	testResultXml("spawn_test");
  	#endif /* EMULATOR */
	
  return 0;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:18,代码来源:spawn-test.c

示例2: main

int main()
{
	UnitTest tests[] = {
		unit_test_setup(enron_suite, fixture_setup_enron),
		unit_test_setup_teardown(test_isend1, setup, teardown),
		unit_test_setup_teardown(test_isend2, setup, teardown),
		unit_test_setup_teardown(test_irecv, setup, teardown),
		unit_test_setup_teardown(test_nsend, setup, teardown),
		unit_test_setup_teardown(test_nrecv, setup, teardown),
		unit_test_setup_teardown(test_nsend2, setup, teardown),
		unit_test_setup_teardown(test_nrecv2, setup, teardown),
		unit_test_setup_teardown(test_ncosib, setup, teardown),
		unit_test_setup_teardown(test_nsib, setup, teardown),
		unit_test_teardown(enron_suite, fixture_teardown),

	};
	return run_tests(tests);
}
开发者ID:patperry,项目名称:iproc,代码行数:18,代码来源:design2_test.c

示例3: main

int main(int argc, char **argv) {
  grpc_closure destroyed;
  grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
  grpc_test_init(argc, argv);
  grpc_init();
  g_pollset = gpr_zalloc(grpc_pollset_size());
  grpc_pollset_init(g_pollset, &g_mu);
  grpc_endpoint_tests(configs[0], g_pollset, g_mu);
  run_tests();
  grpc_closure_init(&destroyed, destroy_pollset, g_pollset,
                    grpc_schedule_on_exec_ctx);
  grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed);
  grpc_exec_ctx_finish(&exec_ctx);
  grpc_shutdown();
  gpr_free(g_pollset);

  return 0;
}
开发者ID:royalharsh,项目名称:grpc,代码行数:18,代码来源:tcp_posix_test.c

示例4: main

int
main() {
  const UnitTest tests[] = {
    unit_test( test_lookup_empty_table_returns_NULL ),
    unit_test( test_insert_and_lookup ),
    unit_test( test_insert_and_lookup_by_atom_hash ),
    unit_test( test_insert_twice_overwrites_old_value ),
    unit_test( test_delete_entry ),
    unit_test( test_nonexistent_entry_returns_NULL ),
    unit_test( test_map ),
    unit_test( test_foreach ),
    unit_test( test_iterator ),
    unit_test( test_multiple_inserts_and_deletes_then_iterate ),
    unit_test( test_iterate_empty_hash ),
  };
  setup_leak_detector();
  return run_tests( tests );
}
开发者ID:Epictetus,项目名称:trema,代码行数:18,代码来源:hash_table_test.c

示例5: main

int main()
{
    const UnitTest tests[] =
        {
            unit_test(test_newentry),
            unit_test(test_update),
            unit_test(test_reverse_missing),
            unit_test(test_reverse_conflict),
            unit_test(test_reverse_missing_forward),
            unit_test(test_remove),
        };

    int ret = run_tests(tests);

    teardown();

    return ret;
}
开发者ID:dnaeon,项目名称:core,代码行数:18,代码来源:lastseen_test.c

示例6: main

int main()
{
    PRINT_TEST_BANNER();
    const UnitTest tests[] =
    {
        unit_test(test_split_empty),
        unit_test(test_split_easy),
        unit_test(test_split_quoted_beginning),
        unit_test(test_split_quoted_middle),
        unit_test(test_split_quoted_end),
        unit_test(test_complex_quoting),
        unit_test(test_arguments_resize_for_null),
        unit_test(test_arguments_resize),
        unit_test(test_command_promiser),
    };

    return run_tests(tests);
}
开发者ID:chrishiestand,项目名称:core,代码行数:18,代码来源:arg_split_test.c

示例7: torture_run_tests

int torture_run_tests(void)
{
    const UnitTest tests[] = {
        unit_test_setup_teardown(check_csync_detect_update, setup, teardown_rm),
        unit_test_setup_teardown(check_csync_detect_update_db_none, setup, teardown),
        unit_test_setup_teardown(check_csync_detect_update_db_eval, setup, teardown),
        unit_test_setup_teardown(check_csync_detect_update_db_rename, setup, teardown),
        unit_test_setup_teardown(check_csync_detect_update_db_new, setup, teardown_rm),
        unit_test_setup_teardown(check_csync_detect_update_nlink, setup, teardown_rm),
        unit_test_setup_teardown(check_csync_detect_update_null, setup, teardown_rm),

        unit_test_setup_teardown(check_csync_ftw, setup_ftw, teardown_rm),
        unit_test_setup_teardown(check_csync_ftw_empty_uri, setup_ftw, teardown_rm),
        unit_test_setup_teardown(check_csync_ftw_failing_fn, setup_ftw, teardown_rm),
    };

    return run_tests(tests);
}
开发者ID:24killen,项目名称:client,代码行数:18,代码来源:check_csync_update.c

示例8: main

int main()
{
    tests_setup();

    const UnitTest tests[] =
        {
            unit_test(test_no_migration),
            unit_test(test_up_to_date),
            unit_test(test_migrate_unqualified_names),
        };

    PRINT_TEST_BANNER();
    int ret = run_tests(tests);

    tests_teardown();

    return ret;
}
开发者ID:fkoner,项目名称:core,代码行数:18,代码来源:dbm_migration_bundles_test.c

示例9: main

int main()
{
    PRINT_TEST_BANNER();
    const UnitTest tests[] =
    {
        unit_test(test_plain_variable_with_no_stuff_in_it),
        unit_test(test_namespaced),
        unit_test(test_scoped),
        unit_test(test_full),
        unit_test(test_dotted_array),
        unit_test(test_levels),
        unit_test(test_unqualified_array),
        unit_test(test_qualified_array),
        unit_test(test_to_string)
    };

    return run_tests(tests);
}
开发者ID:rpoyner,项目名称:core,代码行数:18,代码来源:var_expressions_test.c

示例10: test_main

int test_main(int argc, char *argv[])
{
    int ret;

    bio_err = dup_bio_err(FORMAT_TEXT);

#ifndef OPENSSL_NO_UI
    ADD_TEST(test_old);
    ADD_TEST(test_new_ui);
#endif

    ret = run_tests(argv[0]);

    (void)BIO_flush(bio_err);
    BIO_free(bio_err);

    return ret;
}
开发者ID:Castaglia,项目名称:openssl,代码行数:18,代码来源:uitest.c

示例11: main

int main()
{
    PRINT_TEST_BANNER();
    const UnitTest tests[] =
    {
        unit_test(test_create_destroy),
        unit_test(test_append),
        unit_test(test_lookup),
        unit_test(test_index_of),
        unit_test(test_sort),
        unit_test(test_remove_range),
        unit_test(test_remove),
        unit_test(test_reverse),
        unit_test(test_len)
    };

    return run_tests(tests);
}
开发者ID:nperron,项目名称:core,代码行数:18,代码来源:sequence_test.c

示例12: main

int main(int argc, char **argv) {
  if (platform_init(argc, argv))
    return EXIT_FAILURE;

  argv = uv_setup_args(argc, argv);

  switch (argc) {
  case 1: return run_tests(0);
  case 2: return maybe_run_test(argc, argv);
  case 3: return run_test_part(argv[1], argv[2]);
  default:
    fprintf(stderr, "Too many arguments.\n");
    fflush(stderr);
    return EXIT_FAILURE;
  }

  return EXIT_SUCCESS;
}
开发者ID:0-wiz-0,项目名称:libuv,代码行数:18,代码来源:run-tests.c

示例13: main

int main(int argc, char **argv) {
  struct sigaction sigact;

  /* Make stdout line buffered */
  if (0 != setvbuf(stdout, NULL, _IOLBF, 0)) {
    perror("Setting stdout to line buffered mode");
    return 99;
  }

  if (argc < 2) {
    fprintf(stderr, "Usage: %s <prog>\n", argv[0]);
    return 99;
  }

  /* Set up pipe for SIGCHLD */
  if (0 != pipe(chld_fds)) {
    perror("Making pipe");
    return 99;
  }
  if (0 != setnonblock("child pipe read end", chld_fds[0])
      || 0 != setnonblock("child pipe write end", chld_fds[1])) {
    return 99;
  }

  /* Set up signal handlers */
  sigact.sa_handler = sig_handler;
  sigemptyset(&sigact.sa_mask);
  sigact.sa_flags = SA_NOCLDSTOP;
  if (0 != sigaction(SIGCHLD, &sigact, NULL)) {
    perror("Setting up SIGCHLD handler");
    return 99;
  }

  sigact.sa_handler = SIG_IGN;
  sigact.sa_flags = 0;
  if (0 != sigaction(SIGPIPE, &sigact, NULL)) {
    perror("Setting SIGPIPE to ignore");
    return EXIT_FAILURE;
  }

  /* Run the tests */
  if (run_tests(argc - 1, argv + 1) != 0) return 1;
  return 0;
}
开发者ID:wtsi-npg,项目名称:teepot,代码行数:44,代码来源:test_tp.c

示例14: main

int main(int argc, char **argv) {
    char do_read = 0;
    char *infile = NULL;

    argc--, argv++;

    /* process the args */
    for (; *argv != NULL; argc--, argv++) {

        if (**argv != '-') {
            continue;
        }

        switch (*(*argv + 1)) {

            case 'r':
                do_read = 1;
                argc--;
                argv++;
                if (argc == 0) {
                    usage();
                }
                infile = *argv;
                break;

            default:
                usage();
                break;
        }
    }

    if (argc > 0) {
        usage();
    }

    /* do we need to read in from stdin */
    if (do_read) {
        read_file(infile);
    } else {
        run_tests();
    }

    return 0;
}
开发者ID:BloodyMen,项目名称:imp-libpurple,代码行数:44,代码来源:md5_t.c

示例15: main

int main(int argc, char **argv)
{
    int i;

    /* If there are no arguments then show help */
    if (argc <= 1) {
        show_help();
        return 0;
    }

    /* Parse the arguments */
    for (i = 1; i < argc; i++) {
        /* show help */
        if ((strcmp(argv[i],"-h")==0) ||
            (strcmp(argv[i],"--help")==0)) {
            show_help();
            return 0;
        }
        if ((strcmp(argv[i],"-t")==0) ||
            (strcmp(argv[i],"--tests")==0)) {
            run_tests();
            return 0;
        }
        if (((strcmp(argv[i],"-r")==0) ||
            (strcmp(argv[i],"--run")==0)) &&
            argc == 4) {
            
            
            char * repos_dir;
            int generation_max;
            
            repos_dir=argv[i+1];
            generation_max=atoi(argv[i+2]);
            run_simulation(repos_dir, generation_max);
            return 0;
        }
    }

    printf("Error: Unexpected arguments\n\n");
    printf("%d passed\n",argc);
    show_help();
    
    return 0;
}
开发者ID:CodethinkLabs,项目名称:scalam,代码行数:44,代码来源:main.c


注:本文中的run_tests函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。