File: 00_____version.t

package info (click to toggle)
libbit-vector-perl 7.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,008 kB
  • sloc: perl: 6,703; ansic: 3,654; makefile: 9
file content (89 lines) | stat: -rw-r--r-- 2,278 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!perl -w

use strict;
no strict "vars";

$Bit::Vector::VERSION           = 0;
$Bit::Vector::Overload::VERSION = 0;
$Bit::Vector::String::VERSION   = 0;

# ======================================================================
#   $ver = $Bit::Vector::VERSION;
#   $ver = Bit::Vector::Version();
#   $ver = Bit::Vector->Version();
#   $bits = Bit::Vector::Word_Bits();
#   $bits = Bit::Vector->Word_Bits();
#   $bits = Bit::Vector::Long_Bits();
#   $bits = Bit::Vector->Long_Bits();
#   $ver = $Bit::Vector::String::VERSION;
#   $ver = $Bit::Vector::Overload::VERSION;
# ======================================================================

print "1..15\n";

$n = 1;
if ($Bit::Vector::VERSION eq "0")
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;

require Bit::Vector;

if ($Bit::Vector::VERSION eq "7.4")
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;

if (Bit::Vector::Version() eq "7.4")
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Bit::Vector::Word_Bits() >= 32)
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Bit::Vector::Long_Bits() >= 32)
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;

if (Bit::Vector->Version() eq "7.4")
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Bit::Vector->Word_Bits() >= 32)
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Bit::Vector->Long_Bits() >= 32)
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;

eval { Bit::Vector->Version(0); };
if ($@ =~ /Usage: Bit::Vector->Version\(\)/)
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
eval { Bit::Vector->Word_Bits(0); };
if ($@ =~ /Usage: Bit::Vector->Word_Bits\(\)/)
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
eval { Bit::Vector->Long_Bits(0); };
if ($@ =~ /Usage: Bit::Vector->Long_Bits\(\)/)
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;

if ($Bit::Vector::Overload::VERSION eq "0")
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;

require Bit::Vector::Overload;

if ($Bit::Vector::Overload::VERSION eq "7.4")
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;

if ($Bit::Vector::String::VERSION eq "0")
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;

require Bit::Vector::String;

if ($Bit::Vector::String::VERSION eq "7.4")
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;

__END__