Branch: Tag:

2003-06-05

2003-06-05 12:57:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

More information about string mismatches.

Rev: bin/test_pike.pike:1.86

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;   
767:    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++;    }
781:    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++;    }