pike.git/
bin/
test_pike.pike
Branch:
Tag:
Non-build tags
All tags
No tags
1999-03-01
1999-03-01 05:32:08 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
1869a952b64303a3425fee2747dca255f8fd8cbd (
296
lines) (+
145
/-
151
)
[
Show
|
Annotate
]
Branch:
7.9
now tests compiler shift sizes
Rev: bin/test_pike.pike:1.19
1:
#!/usr/local/bin/pike
-
/* $Id: test_pike.pike,v 1.
18
1999/
02
/
20
21
:
28
:
09
grubba
Exp $ */
+
/* $Id: test_pike.pike,v 1.
19
1999/
03
/
01
05
:
32
:
08
hubbe
Exp $ */
#include <simulate.h>
8:
#define _verify_internals() #endif
-
#define SHIFT_MAX 0 /* 2 */
-
+
int foo(string opt) { if(opt=="" || !opt) return 1;
31:
int loop=1; int end=0x7fffffff; string extra_info="";
+
int shift;
-
+
#if constant(signal) && constant(signum) if(signum("SIGQUIT")>=0) {
130:
werror("Doing tests in %s (%d tests)\n",argv[f],sizeof(tests));
-
+
for(e=start;e<sizeof(tests);e++) { string test,condition;
170:
werror(test+"\n"); }
-
for(int shift=0;shift <= SHIFT_MAX;shift++) {
-
+
if(check > 1) _verify_internals();
-
+
shift++;
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];
+
2:"\nint \x10001=0;\n" ])[shift
%3
];
switch(type) {
300:
if(fail && errors) exit(1);
-
}
-
+
if(!--end) exit(0); a=b=0; }
-
+
} if(mem) {