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

version» Context lines:

Roxen.git/server/etc/test/tests/pike_test_common.pike:198:   void check_error( mixed res, mixed err,    function|string|array cb, array args, int st,    bool|void throw_error )   {    if( err ) {    report_test_ok( err, cb, args, st );    }    else {    report_test_failure( "Expected error", cb, args, st );    if( throw_error ) { -  error( "Expected error but none was thrown." ); +  error( "Expected error but none was thrown.\n" );    }    }   }      private void assert_throws_error( mixed res, mixed err,    function|string|array cb, array args, int st )   {    check_error( res, err, cb, args, st, true );   }   
Roxen.git/server/etc/test/tests/pike_test_common.pike:244:   void silent_check_true( mixed res, mixed err,    function|string|array cb, array args, int st,    bool|void throw_error )   {    if( err || !res ) {    report_test_failure( err, cb, args, st );    if( throw_error ) {    if( err ) {    throw( err );    } else { -  error( "Condition failed" ); +  error( "Condition failed.\n" );    }    }    } else {    report_test_ok( 0, cb, args, st );    }   }      void check_true( mixed res, mixed err,    function|string|array cb, array args, int st,    bool|void throw_error )
Roxen.git/server/etc/test/tests/pike_test_common.pike:266:    if( err ) {    report_test_failure( err, cb, args, st );    if( throw_error ) {    throw( err );    }    }    else if( !res ) {    report_test_failure( sprintf ("expected non-zero, got %O", res),    cb, args, st);    if( throw_error ) { -  error( sprintf ("expected non-zero, got %O", res) ); +  error( sprintf ("expected non-zero, got %O\n", res) );    }    } else {    report_test_ok( err, cb, args, st );    }   }      private void assert_result_true( mixed res, mixed err,    function|string|array cb, array args, int st )   {    check_true(res, err, cb, args, st, true);
Roxen.git/server/etc/test/tests/pike_test_common.pike:295:    if( err ) {    report_test_failure( err, cb, args, st );    if( throw_error ) {    throw( err );    }    }    else    if( res ) {    report_test_failure( sprintf("expected zero, got %O",res), cb, args, st);    if( throw_error ) { -  error( sprintf("expected zero, got %O",res) ); +  error( sprintf("expected zero, got %O\n", res) );    }    }    else    report_test_ok( err, cb, args, st );   }      private void assert_result_false( mixed res, mixed err,    function|string|array cb, array args, int st )   {    check_false( res, err, cb, args, st, true );
Roxen.git/server/etc/test/tests/pike_test_common.pike:341:    return    lambda( mixed res, mixed err, function|string|array cb, array args, int st,    bool|void throw_error )    {    if( err ) {    report_test_failure( err, cb, args, st );    if( throw_error ) {    throw( err );    }    } else if( !equal( res, m )) { -  string message = sprintf("Got %O, expected %O", res,m); +  string message = sprintf("Got %O, expected %O.\n", res,m);    report_test_failure( message, cb, args, st );    if( throw_error ) {    error( message );    }    } else {    report_test_ok( err, cb, args, st );    }    };   }   
Roxen.git/server/etc/test/tests/pike_test_common.pike:364:    return    lambda( mixed res, mixed err, function|string|array cb, array args, int st,    bool|void throw_error )    {    if( err ) {    report_test_failure( err, cb, args, st );    if( throw_error ) {    throw( err );    }    } else if( equal( res, m )) { -  string message = sprintf("Got %O, expected different value", res); +  string message = sprintf("Got %O, expected different value.\n", res);    report_test_failure( message, cb, args, st );    if( throw_error ) {    error( message );    }    } else {    report_test_ok( err, cb, args, st );    }    };   }