File: 02Utils01basic.t

package info (click to toggle)
libpod-wsdl-perl 0.063-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 316 kB
  • sloc: perl: 1,808; xml: 44; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl -w
use Test::More tests => 5;
BEGIN {use_ok('Pod::WSDL::Utils')}
use strict;
use warnings;

# test getTypeDescr()
ok(Pod::WSDL::Utils::getTypeDescr('int', 0, undef) eq 'xsd:int', 'getTypeDescr() returns simple scalar type correctly');
ok(Pod::WSDL::Utils::getTypeDescr('int', 1, undef) eq 'tns1:ArrayOfInt', 'getTypeDescr() returns simple array type correctly');
ok(Pod::WSDL::Utils::getTypeDescr('foo', 0, OwnType->new) eq 'tns1:wsdlName', 'getTypeDescr() returns complex scalar type correctly');
ok(Pod::WSDL::Utils::getTypeDescr('foo', 1, OwnType->new) eq 'tns1:ArrayOfWsdlName', 'getTypeDescr() returns complex array type correctly');

package OwnType;

sub new {
	bless {}, 'OwnType';
}

sub wsdlName {
	return 'wsdlName';
}