11 # compile time evaluation
13 if (int(1.234) == 1) {pass()} else {fail()}
15 if (int(-1.234) == -1) {pass()} else {fail()}
20 cmp_ok(int($x), '==', 1);
21 cmp_ok(int(-$x), '==', -1);
23 $x = length("abc") % -10;
29 $x = length("abc") % -10;
31 ok($x+$y == 3) or ++$fail;
32 ok(abs($x) < 10) or ++$fail;
34 diag("\$x == $x", "\$y == $y");
39 cmp_ok($x["1foo"], '==', 8, 'check bad strings still get converted');
43 is($y, "4294967303", 'check values > 32 bits work');
47 is($y, "-4294967303");
59 $x = 4294967296.11312;
64 $y = int(279964589018079/59);
65 cmp_ok($y, '==', 4745162525730);
69 cmp_ok($y, '==', 4745162525730);