File: 02_support.t

package info (click to toggle)
libparams-coerce-perl 0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 284 kB
  • sloc: perl: 433; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 875 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
#!/usr/bin/perl -w

# Support method testing for Params::Coerce

use strict;
BEGIN {
	$|  = 1;
	$^W = 1;
}

use Test::More tests => 5;
use Params::Coerce ();





#####################################################################
# Begin testing support methods

# Test _loaded
ok(   Params::Coerce::_loaded('Params::Coerce'), '_loaded returns true for Params::Coerce' );
ok( ! Params::Coerce::_loaded('Params::Coerce::Bad'), '_loaded returns false for Params::Coerce::Bad' );

# Test _function_exists
ok(   Params::Coerce::_function_exists('Params::Coerce', '_function_exists'), '_function_exists sees itself' );
ok( ! Params::Coerce::_function_exists('Foo', 'bar'), '_function_exists doesn\' see non-existant function' );
ok( ! Params::Coerce::_function_exists('Params::Coerce', 'VERSION'),
	'_function_exists does not return true for other variable types' );

exit(0);