Branch: Tag:

2004-03-06

2004-03-06 01:31:10 by Martin Nilsson <mani@lysator.liu.se>

More debug when a condition fails.

Rev: bin/test_pike.pike:1.93

1:   #! /usr/bin/env pike    - /* $Id: test_pike.pike,v 1.92 2004/02/28 23:23:46 nilsson Exp $ */ + /* $Id: test_pike.pike,v 1.93 2004/03/06 01:31:10 nilsson Exp $ */      #if !constant(_verify_internals)   #define _verify_internals()
403:    werror("Doing tests in %s (%d tests)\n", testsuite, sizeof(tests));    int qmade, qskipped, qmadep, qskipp;    +  int testno, testline;    for(e=start;e<sizeof(tests);e++)    {    signal_watchdog();
437:    };       if(err) { -  werror( "\nConditional %d failed:\n" -  "%s\n", e+1, describe_backtrace(err) ); +  werror( "\nConditional %d %s failed:\n" +  "%s\n", e+1, testline?"(line "+testline+")":"", +  describe_backtrace(err) );    errors++;    tmp = -1;    }
460:    string|int type;    sscanf(test, "%s\n%s", type, test);    -  int testno, testline; +     string testfile;    sscanf(type, "%s: test %d, expected result: %s", testfile, testno, type);