This package is Combine, not Combined
[gitmo/MooseX-Types.git] / t / 16_introspection.t
CommitLineData
5885c4f4 1#!/usr/bin/env perl
2use strict;
3use warnings;
4
5885c4f4 5use Test::More tests => 1;
6
1616a2ca 7use FindBin;
8use lib "$FindBin::Bin/lib";
9
5885c4f4 10do {
11 package IntrospectionTest;
12 use IntrospectTypeExports __PACKAGE__, qw( TwentyThree NonEmptyStr MyNonEmptyStr );
13 use TestLibrary qw( TwentyThree );
14 use IntrospectTypeExports __PACKAGE__, qw( TwentyThree NonEmptyStr MyNonEmptyStr );
15 use TestLibrary NonEmptyStr => { -as => 'MyNonEmptyStr' };
16 use IntrospectTypeExports __PACKAGE__, qw( TwentyThree NonEmptyStr MyNonEmptyStr );
17 BEGIN {
18 no strict 'refs';
19 delete ${'IntrospectionTest::'}{TwentyThree};
20 }
21};
22
23use IntrospectTypeExports IntrospectionTest => qw( TwentyThree NonEmptyStr MyNonEmptyStr );
24
25my $P = 'IntrospectionTest';
26
27is_deeply(IntrospectTypeExports->get_memory, [
28
29 [$P, TwentyThree => undef],
30 [$P, NonEmptyStr => undef],
31 [$P, MyNonEmptyStr => undef],
32
33 [$P, TwentyThree => 'TestLibrary::TwentyThree'],
34 [$P, NonEmptyStr => undef],
35 [$P, MyNonEmptyStr => undef],
36
37 [$P, TwentyThree => 'TestLibrary::TwentyThree'],
38 [$P, NonEmptyStr => undef],
39 [$P, MyNonEmptyStr => 'TestLibrary::NonEmptyStr'],
40
41 [$P, TwentyThree => undef],
42 [$P, NonEmptyStr => undef],
43 [$P, MyNonEmptyStr => 'TestLibrary::NonEmptyStr'],
44
45], 'all calls to has_available_type_export returned correct results');
46