4 unshift @INC, "../lib";
9 use Config qw(%Config);
11 $ENV{PERL_TEST_MEMORY} >= 1
12 or skip_all("Need ~1Gb for this test");
14 or skip_all("Need 64-bit pointers for this test");
18 # RT #111730: Negative offset to vec in lvalue context
19 local $::TODO = "RT #111730 - vec uses I32 for offsets";
22 ok(scalar eval { vec($v, 0x80000000, 1) = 1 }, "set a bit at a large offset");
23 ok(vec($v, 0x80000000, 1), "check a bit at a large offset");
24 { local $::TODO; # succeeds but shouldn't at this point
25 ok(scalar eval { vec($v, 0x100000000, 1) = 1 },
26 "set a bit at a larger offset");
27 ok(vec($v, 0x100000000, 1), "check a bit at a larger offset");
29 # real out of range values
30 ok(!eval { vec($v, -0x80000000, 1) = 1 },
31 "shouldn't be able to set at a large negative offset");
33 ok(!eval { vec($v, -0x100000000, 1) = 1 },
34 "shouldn't be able to set at a larger negative offset");
36 ok(!vec($v, 0, 1), "make sure we didn't wrap");