4 use Test::More tests => 16;
5 BEGIN { use_ok('template_typedef_cplx3') }
6 require_ok('template_typedef_cplx3');
8 # adapted from ../python/template_typedef_cplx3_runme.py
10 { # kids, don't try this at home (glob hijinks)
11 my $cvar = *template_typedef_cplx3::;
12 map { ${*::}{$_} = ${$cvar}{$_} } keys %{$cvar};
16 is($s->get_base_value(), 0);
17 is($s->get_value(), 1);
18 is($s->get_arith_value(), 2);
20 isa_ok(make_Multiplies_double_double_double_double($s,$s),
21 "template_typedef_cplx3::ArithUnaryFunction_double_double");
24 is($z->get_base_value(), 0);
25 is($z->get_value(), 1);
26 is($z->get_arith_value(), 2);
28 isa_ok(make_Multiplies_complex_complex_complex_complex($z,$z),
29 "template_typedef_cplx3::ArithUnaryFunction_complex_complex");
31 my $d = eval { make_Identity_double() };
32 isa_ok($d, "template_typedef_cplx3::ArithUnaryFunction_double_double");
35 my $c = eval { make_Identity_complex() };
36 isa_ok($d, "template_typedef_cplx3::ArithUnaryFunction_double_double");