version 1.11, 2010/07/13 04:37:47 |
version 1.13, 2010/07/14 02:54:03 |
|
|
#!perl |
#!perl |
package NetworkTests; |
package NetworkTests; |
|
|
# $AFresh1: network_tests.t,v 1.10 2010/07/13 03:23:48 andrew Exp $ |
# $AFresh1: network_tests.t,v 1.12 2010/07/13 06:10:31 andrew Exp $ |
|
|
use strict; |
use strict; |
use warnings; |
use warnings; |
|
|
|
|
if ( !caller() ) { |
if ( !caller() ) { |
if ( $ENV{'NETWORK_TESTS'} ) { |
if ( $ENV{'NETWORK_TESTS'} ) { |
plan tests => 13; |
plan tests => 31; |
} |
} |
else { |
else { |
plan skip_all => |
plan skip_all => |
|
|
|
|
$cmp{user} = [ |
$cmp{user} = [ |
$cmp{single_line}, |
$cmp{single_line}, |
{ name => $cmp{single_line}, |
superhashof( |
|
{ name => $cmp{single_line}, |
|
|
#interests => array_each( $cmp{interests} ), |
#interests => array_each( $cmp{interests} ), |
#x => $cmp{coordinate}, |
#x => $cmp{coordinate}, |
#y => $cmp{coordinate}, |
#y => $cmp{coordinate}, |
} |
} |
|
), |
]; |
]; |
|
|
$cmp{speaker} = [ |
$cmp{speaker} = [ |
|
|
} |
} |
]; |
]; |
|
|
|
$cmp{location} = superhashof( |
|
{ area => $cmp{area}, |
|
user => $cmp{digits}, |
|
|
|
#button => $cmp{boolean}, |
|
x => $cmp{coordinate}, |
|
y => $cmp{coordinate}, |
|
|
|
#time => $cmp{single_line}, |
|
} |
|
); |
|
|
my %tests = ( |
my %tests = ( |
location => [ |
location => [ |
{ args => undef, |
{ args => undef, |
expect => array_each( |
expect => array_each( $cmp{location} ), |
{ area => $cmp{area}, |
|
user => $cmp{digits}, |
|
button => $cmp{boolean}, |
|
x => $cmp{coordinate}, |
|
y => $cmp{coordinate}, |
|
time => $cmp{single_line}, |
|
} |
|
), |
|
}, |
}, |
{ args => { user => 'user0' }, |
{ args => { user => 'user0' }, |
expect => array_each(), |
expect => array_each(), |
}, |
}, |
{ args => { user => 'user0', limit => 20 }, |
{ args => { user => 'user0', limit => 5 }, |
expect => array_each(), |
expect => array_each(), |
}, |
}, |
{ args => { area => 'Engressa' }, |
{ args => { area => 'Engressa' }, |