pike.git / bin / test_pike.pike

version» Context lines:

pike.git/bin/test_pike.pike:1:   #! /usr/bin/env pike    - /* $Id: test_pike.pike,v 1.85 2003/06/02 18:15:05 mast Exp $ */ + /* $Id: test_pike.pike,v 1.86 2003/06/05 12:57:59 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:760:    break;       case "EQ":    if(a!=b)    {    werror(pad_on_error + fname + " failed.\n");    bzot(test);    werror(sprintf("o->a(): %O\n",a));    werror(sprintf("o->b(): %O\n",b));    errors++; +  if (stringp(a) && stringp(b) && (sizeof(a) == sizeof(b)) && +  (sizeof(a) > 20)) { +  werror("Differences at:\n"); +  int i; +  for(i = 0; i < sizeof(a); i++) { +  if (a[i] != b[i]) { +  werror(" %4d: 0x%04x != 0x%04x\n", i, a[i], b[i]);    } -  +  } +  } +  }    else {    successes++;    }    break;       case "EQUAL":    if(!equal(a,b))    {    werror(pad_on_error + fname + " failed.\n");    bzot(test);    werror(sprintf("o->a(): %O\n",a));    werror(sprintf("o->b(): %O\n",b));    errors++; -  +  if (stringp(a) && stringp(b) && (sizeof(a) == sizeof(b)) && +  (sizeof(a) > 20)) { +  werror("Differences at:\n"); +  int i; +  for(i = 0; i < sizeof(a); i++) { +  if (a[i] != b[i]) { +  werror(" %4d: 0x%04x != 0x%04x\n", i, a[i], b[i]);    } -  +  } +  } +  }    else {    successes++;    }    break;       default:    werror(sprintf("\n%s: Unknown test type (%O).\n", fname, type));    errors++;    }    }