File: 04_types.t

package info (click to toggle)
libpdl-vectorvalued-perl 1.0.23-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 232 kB
  • sloc: perl: 377; makefile: 3
file content (32 lines) | stat: -rw-r--r-- 849 bytes parent folder | download | duplicates (2)
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
# -*- Mode: CPerl -*-
# t/04_types.t: test PDL::VectorValued type-wrappers
use Test::More tests=>2;

##-- common subs
my $TEST_DIR;
BEGIN {
  use File::Basename;
  use Cwd;
  $TEST_DIR = Cwd::abs_path dirname( __FILE__ );
  eval qq{use lib ("$TEST_DIR/$_/blib/lib","$TEST_DIR/$_/blib/arch");} foreach (qw(..));
  do "$TEST_DIR/common.plt" or die("$0: failed to load $TEST_DIR/common.plt: $@");
}

##-- common modules
use PDL;
use PDL::VectorValued;
#use PDL::VectorValued::Dev;

##--------------------------------------------------------------
## data

## 1..2: types
isok("isa(vv_indx,PDL::Type)", UNIVERSAL::isa(vv_indx,'PDL::Type'));
if (defined(&PDL::indx)) {
  isok("vv_indx == PDL::indx (PDL >= v2.007)", vv_indx(), PDL::indx);
} else {
  isok("vv_indx == PDL::long (PDL < v2.007)", vv_indx(), PDL::long);
}

print "\n";
# end of t/04_types.t