Beispiel #1
0
int main(int argc, char *argv[]) {
	int idx;
	for (idx = 1; idx < argc; ++idx) {
		if (strcmp(argv[idx], "--env-file-name") == 0) {
			printf("envDefault");
			return 0;
		} else {
			printf("error:\tinvalid option '%s'\n", argv[idx]);
			return 2;
		}
	}

	/* this is our global suite */
	CuSuite *suite  = CuSuiteNew();

	/* register the functions in the order that we should run them */
	CuSuiteAddSuite(suite, GetSuiteTXT());
	CuSuiteAddSuite(suite, GetSuiteTXTCompare());
	CuSuiteAddSuite(suite, GetSuiteTXTConcat());

	/* run them */
	CuSuiteRun(suite);

	/* format our output for the log */
	CuString *output = CuStringNew();
	CuSuiteSummary(suite, output);
	CuSuiteDetails(suite, output);
	printf("%s:\t%s\n", argv[0], output->buffer);

	/* there's no public interface to the failCount, so cheat
	 * and use the value directly
	 */
	return suite->failCount == 0 ? 0 : 2;
}
int halMafRunAllTests(void) {
  CuString *output = CuStringNew();
  CuSuite* suite = CuSuiteNew();
  CuSuiteAddSuite(suite, halMafExportTestSuite());
  CuSuiteAddSuite(suite, halMafBlockTestSuite());
  CuSuiteRun(suite);
  CuSuiteSummary(suite, output);
  CuSuiteDetails(suite, output);
  printf("%s\n", output->buffer);
  return suite->failCount > 0;
}
Beispiel #3
0
int main(int argc, const char* args[]) {
  CuString *output = CuStringNew();
  CuSuite* suite = CuSuiteNew();

  CuSuiteAddSuite(suite, em4x05_suite());
  CuSuiteAddSuite(suite, ring_buffer_suite());

  CuSuiteRun(suite);
  CuSuiteSummary(suite, output);
  CuSuiteDetails(suite, output);
  printf("%s\n", output->buffer);
}
Beispiel #4
0
void RunAllTests() {
  CuString *output = CuStringNew();
  CuSuite* suite = CuSuiteNew();

  CuSuiteAddSuite(suite, CHStackPeekGetSuite());
  CuSuiteAddSuite(suite, CHStackPushGetSuite());
  CuSuiteAddSuite(suite, CHStackPopGetSuite());

  CuSuiteRun(suite);
  CuSuiteSummary(suite, output);
  CuSuiteDetails(suite, output);
  printf("%s\n", output->buffer);
}
Beispiel #5
0
void RunAllTests(void)
{
	CuString *output = CuStringNew();
	CuSuite* suite = CuSuiteNew();

	CuSuiteAddSuite(suite, CuGetSuite());
	CuSuiteAddSuite(suite, CuStringGetSuite());

	CuSuiteRun(suite);
	CuSuiteSummary(suite, output);
	CuSuiteDetails(suite, output);
	printf("%s\n", output->buffer);
}
Beispiel #6
0
int stBaseAlignerRunAllTests(void) {
	CuString *output = CuStringNew();
	CuSuite* suite = CuSuiteNew();
	CuSuiteAddSuite(suite, adjacencySequenceTestSuite());
	CuSuiteAddSuite(suite, endAlignerTestSuite());
	CuSuiteAddSuite(suite, flowerAlignerTestSuite());
    CuSuiteAddSuite(suite, rescueTestSuite());
	CuSuiteRun(suite);
	CuSuiteSummary(suite, output);
	CuSuiteDetails(suite, output);
	printf("%s\n", output->buffer);
	return suite->failCount > 0;
}
Beispiel #7
0
void RunAllTests(void)
{
	CuString *output = CuStringNew();
	CuSuite* suite = CuSuiteNew();

	CuSuiteAddSuite(suite, WSTableSuite());
	CuSuiteAddSuite(suite, ProtocolSuite());
	CuSuiteAddSuite(suite, WakeupSuite());

	CuSuiteRun(suite);
	CuSuiteSummary(suite, output);
	CuSuiteDetails(suite, output);
	printf("%s\n", output->buffer);
}
Beispiel #8
0
void runAllTests(void)
{
	CuString *output = CuStringNew();
	CuSuite* suite = CuSuiteNew();
	
	/* Create suites from other tests. */
	//CuSuite *agg_suite = DBAggregateGetSuite();
	CuSuite *dbqmm_suite = DBQueryMMGetSuite();
	CuSuite *lex_suite = LexerGetSuite();
	CuSuite *dbparseexpr_suite = DBParseExprGetSuite();
	CuSuite *eet_suite = DBEETGetSuite();
	CuSuite *ntjoin_suite = DBNTJoinGetSuite();
	CuSuite *osijoin_suite = DBOSIJoinGetSuite();
	CuSuite *project_suite = DBProjectGetSuite();
	CuSuite *scan_suite = DBScanGetSuite();
	CuSuite *select_suite = DBSelectGetSuite();
	CuSuite *sort_suite = DBSortGetSuite();
	
	//CuSuiteAddSuite(suite, agg_suite);
	CuSuiteAddSuite(suite, dbqmm_suite);
	CuSuiteAddSuite(suite, lex_suite);
	CuSuiteAddSuite(suite, dbparseexpr_suite);
	CuSuiteAddSuite(suite, eet_suite);
	CuSuiteAddSuite(suite, ntjoin_suite);
	CuSuiteAddSuite(suite, osijoin_suite);
	CuSuiteAddSuite(suite, project_suite);
	CuSuiteAddSuite(suite, scan_suite);
	CuSuiteAddSuite(suite, select_suite);
	CuSuiteAddSuite(suite, sort_suite);
	
	CuSuiteRun(suite);
	CuSuiteSummary(suite, output);
	CuSuiteDetails(suite, output);
	printf("%s\n", output->buffer);
	
	//CuSuiteDelete(agg_suite);
	CuSuiteDelete(dbqmm_suite);
	CuSuiteDelete(lex_suite);
	CuSuiteDelete(dbparseexpr_suite);
	CuSuiteDelete(eet_suite);
	CuSuiteDelete(ntjoin_suite);
	CuSuiteDelete(osijoin_suite);
	CuSuiteDelete(project_suite);
	CuSuiteDelete(scan_suite);
	CuSuiteDelete(select_suite);
	CuSuiteDelete(sort_suite);
	free(suite);
	CuStringDelete(output);
}
Beispiel #9
0
int main() {
    CuSuite *suites[] = {
        strtrim_get_cusuite(),
        strrpl_get_cusuite(),
        iv_parse_config_get_cusuite(),
        iv_parse_index_get_cusuite(),
        iv_parse_series_get_cusuite(),
        iv_parse_auth_get_cusuite(),
        iv_parse_categories_get_cusuite(),
    };
    CuString *output = CuStringNew();
    CuSuite *suite = CuSuiteNew();
    unsigned int i;
    for(i=0; i<SUITE_COUNT(suites); i++) {
        if(suites[i]) { CuSuiteAddSuite(suite, suites[i]); }
        /* Hack for CuTest odditiy - CuSuiteAddSuite() implementation copies
         * tests attached to suites[i] into suite and doesn't internally free
         * suites[i]. Documentation doesn't mention anything about this. */
        free(suites[i]);
    }
    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s\n", output->buffer);
    CuSuiteDelete(suite);
    CuStringDelete(output);
    return 0;
}
Beispiel #10
0
void RunAllTests(void)
{
	CuString *output = CuStringNew();
	CuSuite* suite = CuSuiteNew();

    //CuSuiteAddSuite(suite, CuGetSuite());
    //CuSuiteAddSuite(suite, CuStringGetSuite());
    CuSuiteAddSuite(suite, AtomGetSuite());
    CuSuiteAddSuite(suite, BuiltinGetSuite());
    CuSuiteAddSuite(suite, EnvironmentGetSuite());
    CuSuiteAddSuite(suite, ParserGetSuite());
    CuSuiteAddSuite(suite, GcGetSuite());

	CuSuiteRun(suite);
	CuSuiteSummary(suite, output);
	CuSuiteDetails(suite, output);
	printf("%s\n", output->buffer);
}
Beispiel #11
0
int include_RunAllTests(void) {
    CuString *output = CuStringNew();
    CuSuite *suite = CuSuiteNew();
    CuSuite *common_s = common_TestSuite();
    CuSuite *maf_s = mafShared_TestSuite();
    CuSuiteAddSuite(suite, common_s);
    CuSuiteAddSuite(suite, maf_s);
    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s\n", output->buffer);
    CuStringDelete(output);
    int status = (suite->failCount > 0);
    free(common_s);
    free(maf_s);
    CuSuiteDelete(suite);
    return status;
}
Beispiel #12
0
int runAllTests(void) {
  CuString *output = CuStringNew();
  CuSuite* suite = CuSuiteNew(); 
  CuSuiteAddSuite(suite, pathMapperTestSuite());
  CuSuiteRun(suite);
  CuSuiteSummary(suite, output);
  CuSuiteDetails(suite, output);
  printf("%s\n", output->buffer);
  return suite->failCount > 0;
}
Beispiel #13
0
int main(){
  CuString *output = CuStringNew();
  CuSuite* suite = CuSuiteNew();
  CuSuiteAddSuite(suite, geometry_get_suite());
  CuSuiteRun(suite);
  CuSuiteSummary(suite, output);
  CuSuiteDetails(suite, output);
  printf("%s\n", output->buffer);
  return suite->failCount;  
}
Beispiel #14
0
int halRunAllTests(void) {
  CuString *output = CuStringNew();
  CuSuite* suite = CuSuiteNew(); 
  CuSuiteAddSuite(suite, halAlignmentTestSuite());
  CuSuiteAddSuite(suite, halMetaDataTestSuite());
  CuSuiteAddSuite(suite, halGenomeTestSuite()); 
  CuSuiteAddSuite(suite, halTopSegmentTestSuite()); 
  CuSuiteAddSuite(suite, halBottomSegmentTestSuite());
  CuSuiteAddSuite(suite, halSequenceTestSuite()); 
  CuSuiteAddSuite(suite, halColumnIteratorTestSuite()); 
  CuSuiteAddSuite(suite, halGappedSegmentIteratorTestSuite());
  CuSuiteAddSuite(suite, halRearrangementTestSuite()); 
  CuSuiteAddSuite(suite, halValidateTestSuite());  
  CuSuiteRun(suite);
  CuSuiteSummary(suite, output);
  CuSuiteDetails(suite, output);
  printf("%s\n", output->buffer);
  return suite->failCount > 0;
}
Beispiel #15
0
void RunC4Tests(void) {
   CuString *output = CuStringNew();
   CuSuite* suite = CuSuiteNew();

   CuSuiteAddSuite(suite, c4_engine_suite());
   CuSuiteRun(suite);
   CuSuiteSummary(suite, output);
   CuSuiteDetails(suite, output);
   printf("%s\n", output->buffer);
}
Beispiel #16
0
static int runTests(void) {
    CuString *output = CuStringNew();
    CuSuite* suite = CuSuiteNew();
    CuSuiteAddSuite(suite, stKVDatabaseTestSuite());

    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s\n", output->buffer);
    return suite->failCount > 0;
}
int
main()
{
        CuSuite  *suite  = CuSuiteNew();
        CuString *output = CuStringNew();
        CuSuiteAddSuite( suite, GetSuite());
        CuSuiteRun(suite);
        CuSuiteSummary( suite, output);
        fprintf( stdout, "%s\n", output->buffer);
        exit(suite->failCount);
}
Beispiel #18
0
int
main(void) {
    CuString *output = CuStringNew();
    CuSuite *suite = CuSuiteNew();

    CuSuiteAddSuite(suite, grid_test_suite());

    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s\n", output->buffer);
}
Beispiel #19
0
void RunAllTests(void) {
  CuString *output = CuStringNew();
  CuSuite* suite = CuSuiteNew();
     
  //CuSuiteAddSuite(suite, (CuSuite*)daysInMonthGetSuite());  // Adding our test suite
  CuSuiteAddSuite(suite, (CuSuite*)quadraticSuite());  // Adding our test suite
 
  CuSuiteRun(suite);
  CuSuiteSummary(suite, output);
  CuSuiteDetails(suite, output);
  printf("%s\n", output->buffer);
}
Beispiel #20
0
void RunAllTests(void) {
    CuString* output = CuStringNew();
    CuSuite* suite = CuSuiteNew();

    CuSuiteAddSuite(suite, get_arglit_testsuite());
    CuSuiteAddSuite(suite, get_argstr_testsuite());
    CuSuiteAddSuite(suite, get_argint_testsuite());
    CuSuiteAddSuite(suite, get_argdate_testsuite());
    CuSuiteAddSuite(suite, get_argdbl_testsuite());
    CuSuiteAddSuite(suite, get_argfile_testsuite());
    CuSuiteAddSuite(suite, get_argrex_testsuite());
    CuSuiteAddSuite(suite, get_argdstr_testsuite());
    CuSuiteAddSuite(suite, get_argcmd_testsuite());
#ifndef ARGTABLE3_TEST_PUBLIC_ONLY
    CuSuiteAddSuite(suite, get_arghashtable_testsuite());
#endif

    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s\n", output->buffer);
}
Beispiel #21
0
void run_all_tests(void)
{
	CuString *output = CuStringNew();
	CuSuite* suite = CuSuiteNew();

	//add tests suits below
	CuSuiteAddSuite(suite, VOP2_GetSuite());

	CuSuiteRun(suite);
	CuSuiteSummary(suite, output);
	CuSuiteDetails(suite, output);
	printf("%s\n", output->buffer);
}
Beispiel #22
0
void run_all_tests(void){
	
	CuString *output = CuStringNew();
	CuSuite *suite = CuSuiteNew();

	CuSuiteAddSuite(suite, TestHashLib());
        
	CuSuiteRun(suite);
	CuSuiteSummary(suite, output);
	CuSuiteDetails(suite, output);
	printf("%s\n", output->buffer);

	CuStringDelete(output);
	CuSuiteDelete(suite);
}
void RunAllTests(void) {
    CuString *output = CuStringNew();
    CuSuite* suite = CuSuiteNew();

    CuSuiteAddSuite(suite, StrUtilGetSuite());

    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s\n", output->buffer);

//******************** MATRIX SUITE *******************
    CuString *output2 = CuStringNew();
    CuSuite* suite2 = CuSuiteNew();

    CuSuiteAddSuite(suite2, MatrixUtilGetSuite());

    CuSuiteRun(suite2);
    CuSuiteSummary(suite2, output2);
    CuSuiteDetails(suite2, output2);
    printf("%s\n", output2->buffer);
//********************************************************

}
void RunAllTests(void) {

    printf("Running Test Suite: lib_clinalg\n");

    CuString * output = CuStringNew();
    CuSuite * suite = CuSuiteNew();

    CuSuite * clin = CLinalgSuite();
    CuSuiteAddSuite(suite, clin);
    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s \n", output->buffer);

    CuSuiteDelete(clin);
    CuStringDelete(output);
    free(suite);
}
void RunAllTests(void) {
    
    printf("Running Test Suite: lib_stringmanip\n");

    CuString * output = CuStringNew();
    CuSuite * suite = CuSuiteNew();
    
    CuSuite * st = StringUtilGetSuite();
    CuSuiteAddSuite(suite, st);
    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s \n", output->buffer);
    
    CuSuiteDelete(st);
    CuStringDelete(output);
    free(suite);
}
void RunAllTests(void) {
    
    printf("Running Test Suite: lib_tensor\n");

    CuString * output = CuStringNew();
    CuSuite * suite = CuSuiteNew();
    
    CuSuite * tensor = TensorGetSuite();
    CuSuiteAddSuite(suite, tensor);
    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s \n", output->buffer);
    
    CuSuiteDelete(tensor);
    CuStringDelete(output);
    free(suite);
   
}
Beispiel #27
0
void TestCuSuiteAddSuite(CuTest* tc)
{
	CuSuite* ts1 = CuSuiteNew();
	CuSuite* ts2 = CuSuiteNew();

	CuSuiteAdd(ts1, CuTestNew("TestFails1", zTestFails));
	CuSuiteAdd(ts1, CuTestNew("TestFails2", zTestFails));

	CuSuiteAdd(ts2, CuTestNew("TestFails3", zTestFails));
	CuSuiteAdd(ts2, CuTestNew("TestFails4", zTestFails));

	CuSuiteAddSuite(ts1, ts2);
	CuAssertIntEquals(tc, 4, ts1->count);

	CuAssertStrEquals(tc, "TestFails1", ts1->list[0]->name);
	CuAssertStrEquals(tc, "TestFails2", ts1->list[1]->name);
	CuAssertStrEquals(tc, "TestFails3", ts1->list[2]->name);
	CuAssertStrEquals(tc, "TestFails4", ts1->list[3]->name);
}
Beispiel #28
0
void run_all_tests(void)
{
	api_msg_set_level(API_MSG_ERROR);

	CuString *output = CuStringNew();
	CuSuite *suite = CuSuiteNew();
	CuSuite *tsmapi_suite = tsmapi_get_suite();

	CuSuiteAddSuite(suite, tsmapi_suite);

	CuSuiteRun(suite);
	CuSuiteSummary(suite, output);
	CuSuiteDetails(suite, output);
	printf("%s\n", output->buffer);

	CuSuiteDelete(tsmapi_suite);

	free(suite);
	CuStringDelete(output);
}
void RunAllTests(void) {
    
    printf("Running test suite for: lib_probability\n");
    CuString * output = CuStringNew();
    CuSuite * suite = CuSuiteNew();
    
    CuSuite * prob = ProbGetSuite();
    CuSuiteAddSuite(suite, prob);

    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s \n", output->buffer);
    
    CuSuiteDelete(prob);
    
    CuStringDelete(output);
    free(suite);
   
}
Beispiel #30
0
void RunAllTests(void)
{
    CuString *output = CuStringNew();
    CuSuite* suite = CuSuiteNew();

    CuSuiteAddSuite(suite, CuGetSuite());
    CuSuiteAddSuite(suite, CuGetBlockSuite());
    CuSuiteAddSuite(suite, CuGetDCTSuite());
    CuSuiteAddSuite(suite, CuGetImageSuite());
    CuSuiteAddSuite(suite, CuGetStackSuite());
    CuSuiteAddSuite(suite, CuGetNodeSuite());
    CuSuiteAddSuite(suite, CuGetHuffmanSuite());

    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s\n", output->buffer);
    CuSuiteDelete(suite);
}