Roxen.git / server / etc / test / tests / pike_test_common.pike

version» Context lines:

Roxen.git/server/etc/test/tests/pike_test_common.pike:23:   {    int checkid = ' ';    if( check == check_error )    checkid = '#';    else if( check == check_false )    checkid = '!';    else if( check != check_is_configuration &&    check == check_is_module )    checkid = '~';    -  report_error(" Test %3d %c%-40s ", current_test, -  checkid,sprintf("%O("+describe_arglist( args )+")",cb)[..39] +  report_error("%3d %c%-66s ", current_test, +  checkid,sprintf("%O("+describe_arglist( args )+")",cb)[..65]    );   }      string do_describe_error( mixed err )   {    if( stringp( err ) )    return err + (strlen(err)?(err[-1] == '\n' ? "": "\n" ):"");    err = (array)err;    err[1] = err[1][sizeof(err[1])-3..];    return describe_backtrace( err );
Roxen.git/server/etc/test/tests/pike_test_common.pike:47:   void report_test_failure( mixed err, function cb, array args, int st )   {    report_error("FAILED\n");    if( err ) report_error( do_describe_error( err ) );    tests_failed++;   }         void report_test_ok( mixed err, function cb, array args, int st )   { -  report_error("OK [%dms]\n", (gethrtime()-st)/1000); +  int tt = (gethrtime()-st); +  report_debug(" %4dms\n", tt/1000);   // if( err ) report_error( do_describe_error( err ) );   }         mixed do_test( function check_return, function cb, mixed ... args )   {    current_test++;    mixed result;    report_1st( cb, args, check_return );    int st = gethrtime();