Branch: Tag:

2001-10-01

2001-10-01 19:55:01 by Martin Nilsson <mani@lysator.liu.se>

Nicer output

Rev: bin/test_pike.pike:1.59
Rev: src/modules/_Crypto/rijndaeltest.pike:1.5
Rev: src/modules/files/sendfiletest.pike:1.7
Rev: src/modules/files/socktest.pike:1.19
Rev: src/test_co.pike:1.7
Rev: src/testsuite.in:1.457

1:   #!/usr/local/bin/pike    - /* $Id: test_pike.pike,v 1.58 2001/09/11 05:36:17 hubbe Exp $ */ + /* $Id: test_pike.pike,v 1.59 2001/10/01 19:53:35 nilsson Exp $ */      import Stdio;   
524:    if(catch(compile_string(to_compile, fname)))    {    _dmalloc_set_name(); -  werror(fname + " failed.\n"); +  werror("\n" + fname + " failed.\n");    bzot(test);    errors++;    }else{
542:    successes++;    }else{    _dmalloc_set_name(); -  werror(fname + " failed (expected compile error).\n"); +  werror("\n" + fname + " failed (expected compile error).\n");    bzot(test);    errors++;    }
566:    werror("Time in a(): %f\n",at);    }else{    _dmalloc_set_name(); -  werror(fname + " failed (expected eval error).\n"); +  werror("\n" + fname + " failed (expected eval error).\n");    bzot(test);    errors++;    }
603:       }) {    // trace(0); -  werror(fname + " failed.\n"); +  werror("\n" + fname + " failed.\n");    bzot(test);    if (arrayp(err) && sizeof(err) && stringp(err[0])) {    werror("Error: " + master()->describe_backtrace(err));
618:    if( o->__cpp_line != o->__rtl_line ||    ( computed_line && computed_line!=o->__cpp_line))    { -  werror(fname + " Line numbering failed.\n"); +  werror("\n" + fname + " Line numbering failed.\n");    bzot(test + linetester);    werror(" CPP lines: %d\n",o->__cpp_line);    werror(" RTL lines: %d\n",o->__rtl_line);
635:    case "FALSE":    if(a)    { -  werror(fname + " failed.\n"); +  werror("\n" + fname + " failed.\n");    bzot(test);    werror(sprintf("o->a(): %O\n",a));    errors++;
647:    case "TRUE":    if(!a)    { -  werror(fname + " failed.\n"); +  werror("\n" + fname + " failed.\n");    bzot(test);    werror(sprintf("o->a(): %O\n",a));    errors++;
663:    case "EQ":    if(a!=b)    { -  werror(fname + " failed.\n"); +  werror("\n" + fname + " failed.\n");    bzot(test);    werror(sprintf("o->a(): %O\n",a));    werror(sprintf("o->b(): %O\n",b));
676:    case "EQUAL":    if(!equal(a,b))    { -  werror(fname + " failed.\n"); +  werror("\n" + fname + " failed.\n");    bzot(test);    werror(sprintf("o->a(): %O\n",a));    werror(sprintf("o->b(): %O\n",b));
687:    break;       default: -  werror(sprintf("%s: Unknown test type (%O).\n", fname, type)); +  werror(sprintf("\n%s: Unknown test type (%O).\n", fname, type));    errors++;    }    }