File: use-int.t

package info (click to toggle)
libset-intspan-perl 1.19-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 224 kB
  • sloc: perl: 1,236; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 457 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- perl -*-

use strict;
use Config;

BEGIN { $Set::IntSpan::integer = 1 }
use Set::IntSpan 1.17;

my $N = 1;
sub Not { print "not " }
sub OK  { print "ok ", $N++, " @_\n" }

print "1..1\n";

my $set = new Set::IntSpan '1_000_000_000_000-1_000_000_000_100';

for my $i (0..100)
{	
    insert $set 2e12+$i;
}

if ($Config{ivsize}==4)
{
    $set eq '1000000000000-1000000000100' or Not; OK 'use integer';
}
else
{
    OK '# SKIP not a 32-bit platform';
}