pike.git / bin / test_pike.pike

version» Context lines:

pike.git/bin/test_pike.pike:1:   #!/usr/local/bin/pike    - /* $Id: test_pike.pike,v 1.47 2000/04/15 05:03:41 hubbe Exp $ */ + /* $Id: test_pike.pike,v 1.48 2000/05/16 08:35:06 hubbe Exp $ */      import Stdio;      #if !constant(_verify_internals)   #define _verify_internals()   #endif      #if !constant(_dmalloc_set_name)   void _dmalloc_set_name(mixed ... args) {}   #endif
pike.git/bin/test_pike.pike:397:    werror("Not doing test "+(e+1)+"\n");    successes++;    skipped++;    skip=1;    }    }          if(istty())    { +  if(!verbose)    werror("%6d\r",e+1);    }else{    /* Use + instead of . so that sendmail and    * cron will not cut us off... :(    */    switch( (e-start) % 50)    {    case 0:    werror("%5d: ",e);    break;
pike.git/bin/test_pike.pike:472:       if((shift/3)&1)    {    fname+=" (CRNL)";    to_compile=replace(to_compile,"\n","\r\n");    }       if(verbose>9) bzot(to_compile);    switch(type)    { +  mixed at,bt; +  mixed err;    case "COMPILE":    _dmalloc_set_name(fname,0);    if(catch(compile_string(to_compile, fname)))    {    _dmalloc_set_name();    werror(fname + " failed.\n");    bzot(test);    errors++;    }else{    _dmalloc_set_name();
pike.git/bin/test_pike.pike:505:    werror(fname + " failed.\n");    bzot(test);    errors++;    }    master()->set_inhibit_compile_errors(0);    break;       case "EVAL_ERROR":    master()->set_inhibit_compile_errors(1);    _dmalloc_set_name(fname,0); -  if(catch(clone(compile_string(to_compile, fname))->a())) +  +  at = gauge { +  err=catch { +  clone(compile_string(to_compile, fname))->a(); +  }; +  }; +  if(err)    {    _dmalloc_set_name();    successes++; -  +  if(verbose>2) +  werror("Time in a(): %f\n",at);    }else{    _dmalloc_set_name();    werror(fname + " failed.\n");    bzot(test);    errors++;    }    master()->set_inhibit_compile_errors(0);    break;       default: -  mixed err; +     if (err = catch{    _dmalloc_set_name(fname,0);    o=clone(compile_string(to_compile,fname));    _dmalloc_set_name();       if(check > 1) _verify_internals();       a=b=0;    if(t) trace(t);    _dmalloc_set_name(fname,1); -  if(functionp(o->a)) a=o->a(); -  if(functionp(o->b)) b=o->b(); +  if(functionp(o->a)) +  { +  at = gauge { a=o->a(); }; +  } +  +  if(functionp(o->b)) +  { +  bt = gauge { b=o->b(); }; +  } +     _dmalloc_set_name();       if(t) trace(0);    if(check > 1) _verify_internals();       }) {    werror(fname + " failed.\n");    bzot(test);    if (arrayp(err) && sizeof(err) && stringp(err[0])) {    werror("Error: " + master()->describe_backtrace(err));
pike.git/bin/test_pike.pike:562:    {    werror(fname + " Line numbering failed.\n");    bzot(test + linetester);    werror(" CPP lines: %d\n",o->__cpp_line);    werror(" RTL lines: %d\n",o->__rtl_line);    if(computed_line)    werror("Actual lines: %d\n",computed_line);    errors++;    }    +  if(verbose>2) +  werror("Time in a(): %f, Time in b(): %O\n",at,bt); +     switch(type)    {    case "FALSE":    if(a)    {    werror(fname + " failed.\n");    bzot(test);    werror(sprintf("o->a(): %O\n",a));    errors++;    }else{