Branch: Tag:

1998-04-11

1998-04-11 11:53:35 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Now tells which file the test was in.

Rev: bin/test_pike.pike:1.11

1:   #!/usr/local/bin/pike    - /* $Id: test_pike.pike,v 1.10 1998/04/09 21:10:19 hubbe Exp $ */ + /* $Id: test_pike.pike,v 1.11 1998/04/11 11:53:35 grubba Exp $ */      #include <simulate.h>   
117:       if(check > 1) _verify_internals();    +  string fname = argv[f] + ": Test " + (e + 1); +     switch(type)    {    case "COMPILE": -  if(catch(compile_string(test,"Test "+(e+1)))) +  if(catch(compile_string(test, fname)))    { -  werror("Test "+(e+1)+" failed.\n"); +  werror(fname + " failed.\n");    werror(test+"\n");    errors++;    }else{
132:       case "COMPILE_ERROR":    master()->set_inhibit_compile_errors(1); -  if(catch(compile_string(test,"Test "+(e+1)))) +  if(catch(compile_string(test, fname)))    {    successes++;    }else{ -  werror("Test "+(e+1)+" failed.\n"); +  werror(fname + " failed.\n");    werror(test+"\n");    errors++;    }
145:       case "EVAL_ERROR":    master()->set_inhibit_compile_errors(1); -  if(catch(clone(compile_string(test,"Test "+(e+1)))->a())) +  if(catch(clone(compile_string(test, fname))->a()))    {    successes++;    }else{ -  werror("Test "+(e+1)+" failed.\n"); +  werror(fname + " failed.\n");    werror(test+"\n");    errors++;    }
157:    break;       default: -  o=clone(compile_string(test,"Test "+(e+1))); +  o=clone(compile_string(test,fname));       if(check > 1) _verify_internals();   
177:    case "TRUE":    if(!a)    { -  werror("Test "+(e+1)+" failed.\n"); +  werror(fname + " failed.\n");    werror(test+"\n");    werror(sprintf("o->a(): %O\n",a));    errors++;
193:    case "EQ":    if(a!=b)    { -  werror("Test "+(e+1)+" failed.\n"); +  werror(fname + " failed.\n");    werror(test+"\n");    werror(sprintf("o->a(): %O\n",a));    werror(sprintf("o->b(): %O\n",b));
206:    case "EQUAL":    if(!equal(a,b))    { -  werror("Test "+(e+1)+" failed.\n"); +  werror(fname + " failed.\n");    werror(test+"\n");    werror(sprintf("o->a(): %O\n",a));    werror(sprintf("o->b(): %O\n",b));
217:    break;       default: -  werror(sprintf("Unknown test type (%O).\n",type)); +  werror(sprintf("%s: Unknown test type (%O).\n", fname, type));    errors++;    }    }