Skip to content
Snippets Groups Projects
Commit 1869a952 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

now tests compiler shift sizes

Rev: bin/test_pike.pike:1.19
parent 15451d5e
No related branches found
No related tags found
No related merge requests found
#!/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,8 +8,6 @@
#define _verify_internals()
#endif
#define SHIFT_MAX 0 /* 2 */
int foo(string opt)
{
if(opt=="" || !opt) return 1;
......@@ -31,7 +29,7 @@ int main(int argc, string *argv)
int loop=1;
int end=0x7fffffff;
string extra_info="";
int shift;
#if constant(signal) && constant(signum)
if(signum("SIGQUIT")>=0)
......@@ -130,7 +128,6 @@ int main(int argc, string *argv)
werror("Doing tests in %s (%d tests)\n",argv[f],sizeof(tests));
for(e=start;e<sizeof(tests);e++)
{
string test,condition;
......@@ -170,16 +167,15 @@ int main(int argc, string *argv)
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,13 +296,10 @@ int main(int argc, string *argv)
if(fail && errors)
exit(1);
}
if(!--end) exit(0);
a=b=0;
}
}
if(mem)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment