mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-24 07:50:12 +08:00
Improve the test coverage: !val for float/double/long long f.
This commit is contained in:
parent
fcf2e5981f
commit
0e239e2ba5
@ -1420,6 +1420,8 @@ void prefix ## cmp(type a, type b)\
|
|||||||
printf(fmt "\n", ++a);\
|
printf(fmt "\n", ++a);\
|
||||||
printf(fmt "\n", a++);\
|
printf(fmt "\n", a++);\
|
||||||
printf(fmt "\n", a);\
|
printf(fmt "\n", a);\
|
||||||
|
b = 0;\
|
||||||
|
printf("%d %d\n", !a, !b);\
|
||||||
}\
|
}\
|
||||||
void prefix ## fcast(type a)\
|
void prefix ## fcast(type a)\
|
||||||
{\
|
{\
|
||||||
@ -1583,6 +1585,8 @@ void lloptest(long long a, long long b)
|
|||||||
printf("arith2: %Ld %Ld\n", a++, b++);
|
printf("arith2: %Ld %Ld\n", a++, b++);
|
||||||
printf("arith2: %Ld %Ld\n", --a, --b);
|
printf("arith2: %Ld %Ld\n", --a, --b);
|
||||||
printf("arith2: %Ld %Ld\n", a, b);
|
printf("arith2: %Ld %Ld\n", a, b);
|
||||||
|
b = ub = 0;
|
||||||
|
printf("not: %d %d %d %d\n", !a, !ua, !b, !ub);
|
||||||
}
|
}
|
||||||
|
|
||||||
void llshift(long long a, int b)
|
void llshift(long long a, int b)
|
||||||
|
@ -888,7 +888,6 @@ int gtst(int inv, int t)
|
|||||||
gsym(vtop->c.i);
|
gsym(vtop->c.i);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* XXX: not tested */
|
|
||||||
if (is_float(vtop->type.t) ||
|
if (is_float(vtop->type.t) ||
|
||||||
(vtop->type.t & VT_BTYPE) == VT_LLONG) {
|
(vtop->type.t & VT_BTYPE) == VT_LLONG) {
|
||||||
vpushi(0);
|
vpushi(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user