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.30 1999/10/29 00:13:38 hubbe Exp $ */ + /* $Id: test_pike.pike,v 1.31 1999/12/10 00:51:43 grubba 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:171:    tmp=0;    tests=tests[0..sizeof(tests)-2];       werror("Doing tests in %s (%d tests)\n",argv[f],sizeof(tests));       for(e=start;e<sizeof(tests);e++)    {    werror("%6d\r",e+1);       string test,condition; -  int type; +  string|int type;    object o;    mixed a,b;       if(check) _verify_internals();    if(check>3) {    gc();    _verify_internals();    }       test=tests[e];
pike.git/bin/test_pike.pike:222:       shift++;    shift%=3;    string fname = argv[f] + ": Test " + (e + 1) +    " (shift " + shift + ")";       string widener = ([ 0:"",    1:"\nint \x30c6\x30b9\x30c8=0;\n",    2:"\nint \x10001=0;\n" ])[shift%3];    +  widener += "#pragma strict_types\n"; +     if(test[-1]!='\n') test+="\n";       int computed_line=sizeof(test/"\n");    array gnapp= test/"#";    for(int e=0;e<sizeof(gnapp);e++)    {    if(sscanf(gnapp[e],"%*d"))    {    computed_line=0;    break;    }    } -  string linetester="int __cpp_line=__LINE__; int __rtl_line=backtrace()[-1][1];\n"; +  string linetester="int __cpp_line=__LINE__; int __rtl_line=[int]backtrace()[-1][1];\n";       string to_compile = test + linetester + widener;    switch(type)    {    case "COMPILE":    _dmalloc_set_name(fname,0);    if(catch(compile_string(to_compile, fname)))    {    _dmalloc_set_name();    werror(fname + " failed.\n");