コード例 #1
0
int main( int argc, char* argv[] )
{
  REGISTER_TEST( test_tag_iterate );
  REGISTER_TEST( test_step_iter );

  return RUN_TESTS( argc, argv ); 
}
コード例 #2
0
ファイル: main.c プロジェクト: Koldar/koldar-c-tester
int main(){

	addTest(testOK,true);

	RUN_TESTS();
	return 0;
}
コード例 #3
0
int main( int argc, char* argv[] )
{
  REGISTER_TEST( test_getEntArrAdj_conn );
  REGISTER_TEST( test_getEntArrAdj_vertex );
  REGISTER_TEST( test_getEntArrAdj_up );
  REGISTER_TEST( test_getEntArrAdj_down );
  REGISTER_TEST( test_getEntArrAdj_invalid_size );
  REGISTER_TEST( test_getEntArrAdj_none );
  REGISTER_TEST( test_existinterface );
#ifdef  HDF5_FILE
  REGISTER_TEST( test_tags_retrieval );
#endif
  return RUN_TESTS( argc, argv ); 
}
コード例 #4
0
int main(int argc, char *argv[]) {
	const char* files[] =  { "a.html", "2500", "x",
		"b.html", "2500", "y",
		"c.html", "5000", "z",
		"1.html", "2048", "1",
		"2.html", "2048", "2",
		"3.html", "2048", "3",
		"4.html", "2048", "4",
	"5.html", "2048", "5"  };
	size_t size = sizeof(files)/sizeof(files[0]);
	FileFixture ff(files, size);
	ff.startUp();
	
	int res = RUN_TESTS(argc, argv);
	
	ff.tearDown();
	return res;
}
コード例 #5
0
ファイル: MOAB_iMesh_unit_tests.cpp プロジェクト: obmun/moab
int main( int argc, char* argv[] )
{
  REGISTER_TEST( test_getEntArrAdj_conn );
  REGISTER_TEST( test_getEntArrAdj_vertex );
  REGISTER_TEST( test_getEntArrAdj_up );
  REGISTER_TEST( test_getEntArrAdj_down );
  REGISTER_TEST( test_getEntArrAdj_invalid_size );
  REGISTER_TEST( test_getEntArrAdj_none );
  REGISTER_TEST( test_existinterface );
#ifdef  MOAB_HAVE_HDF5
  REGISTER_TEST( test_tags_retrieval );
#endif
  int result = RUN_TESTS( argc, argv );

  // Delete the static iMesh instance defined in create_mesh()
  iMesh_Instance mesh = create_mesh();
  int err;
  iMesh_dtor(mesh, &err);
  CHECK_EQUAL(iBase_SUCCESS, err);

  return result;
}
コード例 #6
0
ファイル: test_prog_opt.cpp プロジェクト: vijaysm/MOAB
int main( int argc, char* argv[] )
{
    // make ProgOptions abort() rather than exiting with an
    // error code for invalid options so that we can catch
    // the signal and continue with later tests
#ifndef WIN32
    setenv("MOAB_PROG_OPT_ABORT","1",0);
#endif

    REGISTER_TEST( test_flag_opt_short );
    REGISTER_TEST( test_flag_opt_long_short );
    REGISTER_TEST( test_flag_opt_long );
    REGISTER_TEST( test_flag_cancel );
    REGISTER_TEST( test_flag_store_false );

    REGISTER_TEST( test_int_opt );
    REGISTER_TEST( test_int_arg );
    REGISTER_TEST( test_real_opt );
    REGISTER_TEST( test_real_arg );

    REGISTER_TEST( test_string_opt );
    REGISTER_TEST( test_string_arg );
    REGISTER_TEST( test_string_rank_subst );

    REGISTER_TEST( test_int_vect_opt );
    REGISTER_TEST( test_int_vect_arg );
    REGISTER_TEST( test_optional_args );
    REGISTER_TEST( test_optional_arg );
    REGISTER_TEST( test_squashed_short );

#ifdef MOAB_HAVE_MPI
    MPI_Init( &argc, &argv );
#endif
    int result = RUN_TESTS( argc, argv );
#ifdef MOAB_HAVE_MPI
    MPI_Finalize();
#endif
    return result;
}
コード例 #7
0
int main(int argc, char *argv[])
{

	/* initialize the CUnit test registry */
	NEW_REGISTRY();

	/*
	 * Test our file_name_utils helper functions.
	 */
	if (init_file_name_utils_suite() != CUE_SUCCESS) {
		return CU_get_error();
	}

	/*
	 * Make sure glibc calls don't lose their normal behavior when accessing files
	 * outside of the build tree.
	 */
	if (init_regress_glibc_suite() != CUE_SUCCESS) {
		return CU_get_error();
	}

	/*
	 * Directly test the trace buffer by invoking the trace buffer's API.
	 */
	if (init_trace_buffer_suite() != CUE_SUCCESS) {
		return CU_get_error();
	}

	/* Run all tests using the CUnit Basic interface */
	RUN_TESTS();

	/* clean up, and return a non-zero exit code if there were failures */
	int failures = 	CU_get_number_of_tests_failed();
	CU_cleanup_registry();
	return failures != 0;
}
コード例 #8
0
ファイル: main.cpp プロジェクト: rbewley4/cpp-events
int main()
{
	RUN_TESTS();
	std::cin.get(); // pause
	return(0);
}
コード例 #9
0
int main()
{
    RTR3Init();

    int cErrors = 0;
    static const struct TstU64 aTstU64[] =
    {
        { "0",                      0,  VINF_SUCCESS,           0 },
        { "1",                      0,  VINF_SUCCESS,           1 },
        { "-1",                     0,  VWRN_NEGATIVE_UNSIGNED,  ~0ULL },
        { "0x",                     0,  VWRN_TRAILING_CHARS,    0 },
        { "0x1",                    0,  VINF_SUCCESS,           1 },
        { "0x0fffffffffffffff",     0,  VINF_SUCCESS,           0x0fffffffffffffffULL },
        { "0x0ffffffffffffffffffffff",0,  VWRN_NUMBER_TOO_BIG,  0xffffffffffffffffULL },
        { "asdfasdfasdf",           0,  VERR_NO_DIGITS,         0 },
        { "0x111111111",            0,  VINF_SUCCESS,           0x111111111ULL },
        { "4D9702C5CBD9B778",      16,  VINF_SUCCESS,           UINT64_C(0x4D9702C5CBD9B778) },
    };
    RUN_TESTS(aTstU64, uint64_t, "%#llx", RTStrToUInt64Ex);

    static const struct TstI64 aTstI64[] =
    {
        { "0",                      0,  VINF_SUCCESS,           0 },
        { "1",                      0,  VINF_SUCCESS,           1 },
        { "-1",                     0,  VINF_SUCCESS,          -1 },
        { "-1",                    10,  VINF_SUCCESS,          -1 },
        { "-31",                    0,  VINF_SUCCESS,          -31 },
        { "-31",                   10,  VINF_SUCCESS,          -31 },
        { "-32",                    0,  VINF_SUCCESS,          -32 },
        { "-33",                    0,  VINF_SUCCESS,          -33 },
        { "-64",                    0,  VINF_SUCCESS,          -64 },
        { "-127",                   0,  VINF_SUCCESS,          -127 },
        { "-128",                   0,  VINF_SUCCESS,          -128 },
        { "-129",                   0,  VINF_SUCCESS,          -129 },
        { "-254",                   0,  VINF_SUCCESS,          -254 },
        { "-255",                   0,  VINF_SUCCESS,          -255 },
        { "-256",                   0,  VINF_SUCCESS,          -256 },
        { "-257",                   0,  VINF_SUCCESS,          -257 },
        { "-511",                   0,  VINF_SUCCESS,          -511 },
        { "-512",                   0,  VINF_SUCCESS,          -512 },
        { "-513",                   0,  VINF_SUCCESS,          -513 },
        { "-1023",                  0,  VINF_SUCCESS,          -1023 },
        { "-1023",                  0,  VINF_SUCCESS,          -1023 },
        { "-1023",                  0,  VINF_SUCCESS,          -1023},
        { "-1023",                 10,  VINF_SUCCESS,          -1023 },
        { "-4564678",               0,  VINF_SUCCESS,          -4564678 },
        { "-4564678",              10,  VINF_SUCCESS,          -4564678 },
        { "-1234567890123456789",   0,  VINF_SUCCESS,          -1234567890123456789LL },
        { "-1234567890123456789",  10,  VINF_SUCCESS,          -1234567890123456789LL },
        { "0x",                     0,  VWRN_TRAILING_CHARS,    0 },
        { "0x1",                    0,  VINF_SUCCESS,           1 },
        { "0x1",                   10,  VWRN_TRAILING_CHARS,    0 },
        { "0x1",                   16,  VINF_SUCCESS,           1 },
        { "0x0fffffffffffffff",     0,  VINF_SUCCESS,           0x0fffffffffffffffULL },
        { "0x7fffffffffffffff",     0,  VINF_SUCCESS,           0x7fffffffffffffffULL },
        { "0xffffffffffffffff",     0,  VWRN_NUMBER_TOO_BIG,    -1 },
        { "0x01111111111111111111111",0,  VWRN_NUMBER_TOO_BIG,  0x1111111111111111ULL },
        { "0x02222222222222222222222",0,  VWRN_NUMBER_TOO_BIG,  0x2222222222222222ULL },
        { "0x03333333333333333333333",0,  VWRN_NUMBER_TOO_BIG,  0x3333333333333333ULL },
        { "0x04444444444444444444444",0,  VWRN_NUMBER_TOO_BIG,  0x4444444444444444ULL },
        { "0x07777777777777777777777",0,  VWRN_NUMBER_TOO_BIG,  0x7777777777777777ULL },
        { "0x07f7f7f7f7f7f7f7f7f7f7f",0,  VWRN_NUMBER_TOO_BIG,  0x7f7f7f7f7f7f7f7fULL },
        { "0x0ffffffffffffffffffffff",0,  VWRN_NUMBER_TOO_BIG,  0xffffffffffffffffULL },
        { "asdfasdfasdf",           0,  VERR_NO_DIGITS,         0 },
        { "0x111111111",            0,  VINF_SUCCESS,           0x111111111ULL },
    };
    RUN_TESTS(aTstI64, int64_t, "%#lld", RTStrToInt64Ex);



    static const struct TstI32 aTstI32[] =
    {
        { "0",                      0,  VINF_SUCCESS,           0 },
        { "1",                      0,  VINF_SUCCESS,           1 },
        { "-1",                     0,  VINF_SUCCESS,          -1 },
        { "-1",                    10,  VINF_SUCCESS,          -1 },
        { "-31",                    0,  VINF_SUCCESS,          -31 },
        { "-31",                   10,  VINF_SUCCESS,          -31 },
        { "-32",                    0,  VINF_SUCCESS,          -32 },
        { "-33",                    0,  VINF_SUCCESS,          -33 },
        { "-64",                    0,  VINF_SUCCESS,          -64 },
        { "-127",                   0,  VINF_SUCCESS,          -127 },
        { "-128",                   0,  VINF_SUCCESS,          -128 },
        { "-129",                   0,  VINF_SUCCESS,          -129 },
        { "-254",                   0,  VINF_SUCCESS,          -254 },
        { "-255",                   0,  VINF_SUCCESS,          -255 },
        { "-256",                   0,  VINF_SUCCESS,          -256 },
        { "-257",                   0,  VINF_SUCCESS,          -257 },
        { "-511",                   0,  VINF_SUCCESS,          -511 },
        { "-512",                   0,  VINF_SUCCESS,          -512 },
        { "-513",                   0,  VINF_SUCCESS,          -513 },
        { "-1023",                  0,  VINF_SUCCESS,          -1023 },
        { "-1023",                  0,  VINF_SUCCESS,          -1023 },
        { "-1023",                  0,  VINF_SUCCESS,          -1023},
        { "-1023",                 10,  VINF_SUCCESS,          -1023 },
        { "-4564678",               0,  VINF_SUCCESS,          -4564678 },
        { "-4564678",              10,  VINF_SUCCESS,          -4564678 },
        { "4564678",                0,  VINF_SUCCESS,          4564678 },
        { "4564678",               10,  VINF_SUCCESS,          4564678 },
        { "-1234567890123456789",   0,  VWRN_NUMBER_TOO_BIG,   (int32_t)-1234567890123456789LL },
        { "-1234567890123456789",  10,  VWRN_NUMBER_TOO_BIG,   (int32_t)-1234567890123456789LL },
        { "1234567890123456789",    0,  VWRN_NUMBER_TOO_BIG,   (int32_t)1234567890123456789LL },
        { "1234567890123456789",   10,  VWRN_NUMBER_TOO_BIG,   (int32_t)1234567890123456789LL },
        { "0x",                     0,  VWRN_TRAILING_CHARS,    0 },
        { "0x1",                    0,  VINF_SUCCESS,           1 },
        { "0x1",                   10,  VWRN_TRAILING_CHARS,    0 },
        { "0x1",                   16,  VINF_SUCCESS,           1 },
        { "0x7fffffff",             0,  VINF_SUCCESS,           0x7fffffff },
        { "0x80000000",             0,  VWRN_NUMBER_TOO_BIG,    INT32_MIN },
        { "0xffffffff",             0,  VWRN_NUMBER_TOO_BIG,    -1 },
        { "0x0fffffffffffffff",     0,  VWRN_NUMBER_TOO_BIG,    0xffffffff },
        { "0x01111111111111111111111",0,  VWRN_NUMBER_TOO_BIG,  0x11111111 },
        { "0x0ffffffffffffffffffffff",0,  VWRN_NUMBER_TOO_BIG,  0xffffffff },
        { "asdfasdfasdf",           0,  VERR_NO_DIGITS,         0 },
        { "0x1111111",              0,  VINF_SUCCESS,           0x01111111 },
    };
    RUN_TESTS(aTstI32, int32_t, "%#d", RTStrToInt32Ex);

    static const struct TstU32 aTstU32[] =
    {
        { "0",                      0,  VINF_SUCCESS,           0 },
        { "1",                      0,  VINF_SUCCESS,           1 },
        /// @todo { "-1",                     0,  VWRN_NEGATIVE_UNSIGNED, ~0 }, - no longer true. bad idea?
        { "-1",                     0,  VWRN_NUMBER_TOO_BIG,    ~0 },
        { "0x",                     0,  VWRN_TRAILING_CHARS,    0 },
        { "0x1",                    0,  VINF_SUCCESS,           1 },
        { "0x0fffffffffffffff",     0,  VWRN_NUMBER_TOO_BIG,    0xffffffffU },
        { "0x0ffffffffffffffffffffff",0,  VWRN_NUMBER_TOO_BIG,  0xffffffffU },
        { "asdfasdfasdf",           0,  VERR_NO_DIGITS,         0 },
        { "0x1111111",              0,  VINF_SUCCESS,           0x1111111 },
    };
    RUN_TESTS(aTstU32, uint32_t, "%#x", RTStrToUInt32Ex);

    /*
     * Summary.
     */
    if (!cErrors)
        RTPrintf("tstStrToNum: SUCCESS\n");
    else
        RTPrintf("tstStrToNum: FAILURE - %d errors\n", cErrors);
    return !!cErrors;
}
コード例 #10
0
int main(int argc, char* argv[]) {
  return RUN_TESTS(argc, argv);
}
コード例 #11
0
ファイル: main.cpp プロジェクト: signatal/codeography
int main(int argc, char** argv)
{
    QApplication app(argc, argv, false);
    int return_code = RUN_TESTS(argc, argv);
    return return_code;
}
コード例 #12
0
void run_tests()
{
   RUN_TESTS(basic_tests);
   RUN_TESTS(test_simple_repeats);
   RUN_TESTS(test_alt);
   RUN_TESTS(test_sets);
   RUN_TESTS(test_sets2);
   RUN_TESTS(test_anchors);
   RUN_TESTS(test_backrefs);
   RUN_TESTS(test_character_escapes);
   RUN_TESTS(test_assertion_escapes);
   RUN_TESTS(test_tricky_cases);
   RUN_TESTS(test_grep);
   RUN_TESTS(test_replace);
   RUN_TESTS(test_non_greedy_repeats);
   RUN_TESTS(test_non_marking_paren);
   RUN_TESTS(test_partial_match);
   RUN_TESTS(test_forward_lookahead_asserts);
   RUN_TESTS(test_fast_repeats);
   RUN_TESTS(test_fast_repeats2);
   RUN_TESTS(test_independent_subs);
   RUN_TESTS(test_nosubs);
   RUN_TESTS(test_conditionals);
   RUN_TESTS(test_options);
   RUN_TESTS(test_options2);
#ifndef TEST_THREADS
   RUN_TESTS(test_en_locale);
#endif
   RUN_TESTS(test_emacs);
   RUN_TESTS(test_operators);
   RUN_TESTS(test_overloads);
   RUN_TESTS(test_unicode);
   RUN_TESTS(test_pocessive_repeats);
   RUN_TESTS(test_mark_resets);
   RUN_TESTS(test_recursion);
}
int main(int argc, char* argv[]) {
  base::installSignalHandler();
  return RUN_TESTS(argc, argv);
}