Example #1
0
void lfile_lfun (SRunner *sr, FILE *file, enum print_output printmode,
                 void *obj, enum cl_event evt)
{
    TestResult *tr;
    Suite *s;

    switch (evt) {
    case CLINITLOG_SR:
        break;
    case CLENDLOG_SR:
        break;
    case CLSTART_SR:
        break;
    case CLSTART_S:
        s = obj;
        fprintf(file, "Running suite %s\n", s->name);
        break;
    case CLEND_SR:
        fprintf (file, "Results for all suites run:\n");
        srunner_fprint (file, sr, CK_MINIMAL);
        break;
    case CLEND_S:
        s = obj;
        break;
    case CLEND_T:
        tr = obj;
        tr_fprint(file, tr, CK_VERBOSE);
        break;
    default:
        eprintf("Bad event type received in stdout_lfun", __FILE__, __LINE__);
    }


}
Example #2
0
void stdout_lfun(SRunner * sr, FILE * file, enum print_output printmode,
                 void *obj, enum cl_event evt)
{
    Suite *s;

    switch (evt)
    {
        case CLINITLOG_SR:
            break;
        case CLENDLOG_SR:
            break;
        case CLSTART_SR:
            if(printmode > CK_SILENT)
            {
                fprintf(file, "Running suite(s):");
            }
            break;
        case CLSTART_S:
            s = (Suite *)obj;
            if(printmode > CK_SILENT)
            {
                fprintf(file, " %s\n", s->name);
            }
            break;
        case CLEND_SR:
            if(printmode > CK_SILENT)
            {
                /* we don't want a newline before printing here, newlines should
                   come after printing a string, not before.  it's better to add
                   the newline above in CLSTART_S.
                 */
                srunner_fprint(file, sr, printmode);
            }
            break;
        case CLEND_S:
            break;
        case CLSTART_T:
            break;
        case CLEND_T:
            break;
        default:
            eprintf("Bad event type received in stdout_lfun", __FILE__,
                    __LINE__);
    }


}
Example #3
0
void srunner_print (SRunner *sr, enum print_output print_mode)
{
  srunner_fprint (stdout, sr, print_mode);
}