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
21 ok(scalar eval { vec($v, 0x80000000, 1) = 1 }, "set a bit at a large offset");
22 ok(vec($v, 0x80000000, 1), "check a bit at a large offset");
24 ok(scalar eval { vec($v, 0x100000000, 1) = 1 },
25 "set a bit at a larger offset");
26 ok(vec($v, 0x100000000, 1), "check a bit at a larger offset");
28 # real out of range values
29 ok(!eval { vec($v, -0x80000000, 1) = 1 },
30 "shouldn't be able to set at a large negative offset");
31 ok(!eval { vec($v, -0x100000000, 1) = 1 },
32 "shouldn't be able to set at a larger negative offset");
34 ok(!vec($v, 0, 1), "make sure we didn't wrap");