Commit | Line | Data |
4a3d023d |
1 | #!/usr/bin/perl -w |
2 | |
3 | use strict; |
4 | use Test::More tests => 2; |
5 | use Devel::Size ':all'; |
6 | use Config; |
7 | |
8 | use constant PVBM => 'galumphing'; |
9 | my $dummy = index 'galumphing', PVBM; |
10 | |
11 | if($Config{useithreads}) { |
12 | cmp_ok(total_size(PVBM), '>', 0, "PVBMs don't cause SEGVs"); |
13 | # Really a core bug: |
14 | local $TODO = 'Under ithreads, pad constants are no longer PVBMs'; |
15 | cmp_ok(total_size(PVBM), '>', total_size(PVBM . '') + 256, |
16 | "PVBMs use 256 bytes for a lookup table"); |
17 | } else { |
18 | cmp_ok(total_size(PVBM), '>', total_size(PVBM . ''), |
19 | "PVBMs don't cause SEGVs"); |
4a3d023d |
20 | cmp_ok(total_size(PVBM), '>', total_size(PVBM . '') + 256, |
21 | "PVBMs use 256 bytes for a lookup table"); |
22 | } |