File: pvbm.t

package info (click to toggle)
libdevel-size-perl 0.85-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 388 kB
  • sloc: perl: 737; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl -w

use strict;
use Test::More tests => 2;
use Devel::Size ':all';
use Config;

use constant PVBM => 'galumphing';
my $dummy = index 'galumphing', PVBM;

if($Config{useithreads}) {
    cmp_ok(total_size(PVBM), '>', 0, "PVBMs don't cause SEGVs");
    # Really a core bug:
    local $TODO = 'Under ithreads, pad constants are no longer PVBMs';
    cmp_ok(total_size(PVBM), '>', total_size(PVBM . '') + 256,
	   "PVBMs use 256 bytes for a lookup table");
} else {
    cmp_ok(total_size(PVBM), '>', total_size(PVBM . ''),
	   "PVBMs don't cause SEGVs");
    cmp_ok(total_size(PVBM), '>', total_size(PVBM . '') + 256,
	   "PVBMs use 256 bytes for a lookup table");
}