#!/usr/bin/env perl
BEGIN {
$ENV
{RPERL_WARNINGS} = 0; }
our
$VERSION
= 0.014_000;
use
RPerl::DataStructure::Hash::SubTypes1D
qw(integer_hashref_typetest0 integer_hashref_typetest1 number_hashref_typetest0 number_hashref_typetest1 string_hashref_typetest0 string_hashref_typetest1)
;
use
RPerl::DataStructure::Hash::SubTypes2D
qw(integer_arrayref_hashref_typetest0 integer_arrayref_hashref_typetest1 number_arrayref_hashref_typetest0 number_arrayref_hashref_typetest1 string_arrayref_hashref_typetest0 string_arrayref_hashref_typetest1)
;
BEGIN {
if
(
$ENV
{RPERL_VERBOSE} ) {
Test::More::diag(
'[[[ Beginning Hash Type Pre-Test Loading, RPerl Type System ]]]'
);
}
lives_and(
sub
{ use_ok(
'RPerl::AfterSubclass'
); },
q{use_ok('RPerl::AfterSubclass') lives}
);
lives_and(
sub
{ use_ok(
'RPerl::DataStructure::Hash_cpp'
); },
q{use_ok('RPerl::DataStructure::Hash_cpp') lives}
);
}
foreach
my
integer
$mode_id
(
sort
keys
%{
$RPerl::MODES
} ) {
my
scalartype_hashref
$mode
=
$RPerl::MODES
->{
$mode_id
};
my
$ops
=
$mode
->{ops};
my
$types
=
$mode
->{types};
my
string
$mode_tagline
=
$ops
.
'OPS_'
.
$types
.
'TYPES'
;
if
(
$ENV
{RPERL_VERBOSE} ) {
Test::More::diag(
'[[[ Beginning RPerl Hash Type Tests, '
.
$ops
.
' Operations & '
.
$types
.
' Data Types'
.
' ]]]'
);
}
lives_ok(
sub
{ rperltypes::types_enable(
$types
) },
q{mode '}
.
$ops
. ' Operations &
' . $types . '
Data Types
' . q{'
enabled} );
if
(
$ops
eq
'PERL'
) {
lives_and(
sub
{ use_ok(
'RPerl::DataStructure::Hash'
); },
q{use_ok('RPerl::DataStructure::Hash') lives}
);
}
else
{
if
(
$types
eq
'CPP'
) {
delete
$main::
{
'RPerl__DataStructure__Hash__MODE_ID'
};
}
lives_and(
sub
{ require_ok(
'RPerl::DataStructure::Hash_cpp'
); },
q{require_ok('RPerl::DataStructure::Hash_cpp') lives}
);
lives_ok(
sub
{ RPerl::DataStructure::Hash_cpp::cpp_load(); },
q{RPerl::DataStructure::Hash_cpp::cpp_load() lives}
);
}
foreach
my
string
$type
(
qw(DataType__Integer DataType__Number DataType__String DataStructure__Hash)
) {
lives_and(
sub
{
is(
$RPerl::MODES
->{ main->can(
'RPerl__'
.
$type
.
'__MODE_ID'
)->() }->{ops},
$ops
,
'main::RPerl__'
.
$type
.
'__MODE_ID() ops returns '
.
$ops
);
},
'main::RPerl__'
.
$type
.
'__MODE_ID() lives'
);
lives_and(
sub
{
is(
$RPerl::MODES
->{ main->can(
'RPerl__'
.
$type
.
'__MODE_ID'
)->() }->{types},
$types
,
'main::RPerl__'
.
$type
.
'__MODE_ID() types returns '
.
$types
);
},
'main::RPerl__'
.
$type
.
'__MODE_ID() lives'
);
}
throws_ok(
sub
{ integer_hashref_to_string() },
"/(EIVHVRV00.*$mode_tagline)|(Usage.*integer_hashref_to_string)/"
,
q{TIVHVRV00 integer_hashref_to_string() throws correct exception}
);
throws_ok(
sub
{ integer_hashref_to_string(
undef
) },
"/EIVHVRV00.*$mode_tagline/"
,
q{TIVHVRV01 integer_hashref_to_string(undef) throws correct exception}
);
throws_ok(
sub
{ integer_hashref_to_string(2) },
"/EIVHVRV01.*$mode_tagline/"
,
q{TIVHVRV02 integer_hashref_to_string(2) throws correct exception}
);
throws_ok(
sub
{ integer_hashref_to_string(2.3) },
"/EIVHVRV01.*$mode_tagline/"
,
q{TIVHVRV03 integer_hashref_to_string(2.3) throws correct exception}
);
throws_ok(
sub
{ integer_hashref_to_string(
'2'
) },
"/EIVHVRV01.*$mode_tagline/"
,
q{TIVHVRV04 integer_hashref_to_string('2') throws correct exception}
);
throws_ok(
sub
{ integer_hashref_to_string([ 2 ]) },
"/EIVHVRV01.*$mode_tagline/"
,
q{TIVHVRV05 integer_hashref_to_string([ 2 ]) throws correct exception}
);
throws_ok(
sub
{
integer_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=>
undef
,
d_key
=> 23,
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
);
},
"/EIVHVRV02.*$mode_tagline/"
,
q{TIVHVRV10 integer_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => undef, d_key => 23, e_key => -877, f_key => -33, g_key => 1_701 }
) throws correct exception}
);
throws_ok(
sub
{
integer_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=> 42,
d_key
=> 23.3,
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
);
},
"/EIVHVRV03.*$mode_tagline/"
,
q{TIVHVRV11 integer_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42, d_key => 23.3, e_key => -877, f_key => -33, g_key => 1_701 }
) throws correct exception}
);
throws_ok(
sub
{
integer_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=> 42,
d_key
=>
'23'
,
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
);
},
"/EIVHVRV03.*$mode_tagline/"
,
q{TIVHVRV12 integer_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42, d_key => '23', e_key => -877, f_key => -33, g_key => 1_701 }
) throws correct exception}
);
throws_ok(
sub
{
integer_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=> 42,
d_key
=> [ 23 ],
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
);
},
"/EIVHVRV03.*$mode_tagline/"
,
q{TIVHVRV13 integer_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42, d_key => [ 23 ], e_key => -877, f_key => -33, g_key => 1_701 }
) throws correct exception}
);
throws_ok(
sub
{
integer_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=> 42,
d_key
=> {
a_subkey
=> 23 },
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
);
},
"/EIVHVRV03.*$mode_tagline/"
,
q{TIVHVRV14 integer_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42, d_key => {a_subkey => 23}
, ...,
g_key
=> 1_701 }) throws correct exception}
);
lives_and(
sub
{
is( integer_hashref_to_string( {
a_key
=> 23 } ),
q{{ 'a_key' => 23 }
},
q{TIVHVRV20 integer_hashref_to_string({ a_key => 23 }
) returns correct value} );
},
q{TIVHVRV20 integer_hashref_to_string({ a_key => 23 }
) lives}
);
lives_and(
sub
{
like(
integer_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=> 42,
d_key
=> 23,
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
),
q{/^\\\{\s(?=.*'a_key' => 2\b)(?=.*'b_key' => 2_112\b)(?=.*'c_key' => 42\b)(?=.*'d_key' => 23\b)(?=.*'e_key' => -877\b)(?=.*'f_key' => -33\b)(?=.*'g_key' => 1_701\b).*\s\}
$/m},
q{TIVHVRV21 integer_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42, d_key => 23, e_key => -877, f_key => -33, g_key => 1_701 }
) returns correct value}
);
},
q{TIVHVRV21 integer_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42, d_key => 23, e_key => -877, f_key => -33, g_key => 1_701 }
) lives}
);
throws_ok(
sub
{ integer_hashref_typetest0() },
"/(EIVHVRV00.*$mode_tagline)|(Usage.*integer_hashref_typetest0)/"
,
q{TIVHVRV30 integer_hashref_typetest0() throws correct exception}
);
throws_ok(
sub
{ integer_hashref_typetest0(2) },
"/EIVHVRV01.*$mode_tagline/"
,
q{TIVHVRV31 integer_hashref_typetest0(2) throws correct exception}
);
throws_ok(
sub
{
integer_hashref_typetest0(
{
'binary'
=> 2,
'rush'
=> 2_112,
'ERROR_FUNKEY'
=>
undef
,
'answer'
=> 42,
'fnord'
=> 23,
'units'
=> -877,
'degree'
=> -33,
'ncc'
=> 1_701
}
);
},
"/EIVHVRV02.*$mode_tagline/"
,
q{TIVHVRV32 integer_hashref_typetest0({ 'binary' => 2, 'rush' => 2_112, 'ERROR_FUNKEY' => undef, ..., 'ncc' => 1_701 }
) throws correct exception}
);
throws_ok(
sub
{
integer_hashref_typetest0(
{
'binary'
=> 2,
'rush'
=> 2_112,
'ERROR_FUNKEY'
=>
'abcdefg'
,
'answer'
=> 42,
'fnord'
=> 23,
'units'
=> -877,
'degree'
=> -33,
'ncc'
=> 1_701
}
);
},
"/EIVHVRV03.*$mode_tagline/"
,
q{TIVHVRV33 integer_hashref_typetest0({ 'binary' => 2, 'rush' => 2_112, 'ERROR_FUNKEY' => 'abcdefg', ..., 'ncc' => 1_701 }
) throws correct exception}
);
lives_and(
sub
{
like(
integer_hashref_typetest0(
{
'binary'
=> 2,
'rush'
=> 2_112,
'answer'
=> 42,
'fnord'
=> 23,
'units'
=> -877,
'degree'
=> -33,
'ncc'
=> 1_701
}
),
q{/^\\\{\s(?=.*'binary' => 2\b)(?=.*'rush' => 2_112\b)(?=.*'answer' => 42\b)(?=.*'fnord' => 23\b)(?=.*'units' => -877\b)(?=.*'degree' => -33\b)(?=.*'ncc' => 1_701\b).*\s\}
}
.
$mode_tagline
.
q{$/m}
,
q{TIVHVRV34 integer_hashref_typetest0({ 'binary' => 2, 'rush' => 2_112, ..., 'ncc' => 1_701 }
) returns correct value}
);
},
q{TIVHVRV34 integer_hashref_typetest0({ 'binary' => 2, 'rush' => 2_112, ..., 'ncc' => 1_701 }
) lives}
);
lives_and(
sub
{
is_deeply(
integer_hashref_typetest1(5),
{
"$mode_tagline\_funkey2"
=> 10,
"$mode_tagline\_funkey3"
=> 15,
"$mode_tagline\_funkey4"
=> 20,
"$mode_tagline\_funkey1"
=> 5,
"$mode_tagline\_funkey0"
=> 0
},
q{TIVHVRV40 integer_hashref_typetest1(5) returns correct value}
);
},
q{TIVHVRV40 integer_hashref_typetest1(5) lives}
);
throws_ok(
sub
{ number_hashref_to_string() },
"/(ENVHVRV00.*$mode_tagline)|(Usage.*number_hashref_to_string)/"
,
q{TNVHVRV00 number_hashref_to_string() throws correct exception}
);
throws_ok(
sub
{ number_hashref_to_string(
undef
) },
"/ENVHVRV00.*$mode_tagline/"
,
q{TNVHVRV01 number_hashref_to_string(undef) throws correct exception}
);
throws_ok(
sub
{ number_hashref_to_string(2) },
"/ENVHVRV01.*$mode_tagline/"
,
q{TNVHVRV02 number_hashref_to_string(2) throws correct exception}
);
throws_ok(
sub
{ number_hashref_to_string(2.3) },
"/ENVHVRV01.*$mode_tagline/"
,
q{TNVHVRV03 number_hashref_to_string(2.3) throws correct exception}
);
throws_ok(
sub
{ number_hashref_to_string(
'2'
) },
"/ENVHVRV01.*$mode_tagline/"
,
q{TNVHVRV04 number_hashref_to_string('2') throws correct exception}
);
throws_ok(
sub
{ number_hashref_to_string([ 2 ]) },
"/ENVHVRV01.*$mode_tagline/"
,
q{TNVHVRV05 number_hashref_to_string([ 2 ]) throws correct exception}
);
throws_ok(
sub
{
number_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=>
undef
,
d_key
=> 23,
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
);
},
"/ENVHVRV02.*$mode_tagline/"
,
q{TNVHVRV10 number_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => undef, d_key => 23, e_key => -877, f_key => -33, g_key => 1_701 }
) throws correct exception}
);
throws_ok(
sub
{
number_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=> 42.3,
d_key
=>
'23'
,
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
);
},
"/ENVHVRV03.*$mode_tagline/"
,
q{TNVHVRV11 number_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42.3, d_key => '23', e_key => -877, f_key => -33, g_key => 1_701 }
) throws correct exception}
);
throws_ok(
sub
{
number_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=> 42.3,
d_key
=> [ 23 ],
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
);
},
"/ENVHVRV03.*$mode_tagline/"
,
q{TNVHVRV12 number_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42.3, d_key => [ 23 ], e_key => -877, f_key => -33, g_key => 1_701 }
) throws correct exception}
);
throws_ok(
sub
{
number_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=> 42.3,
d_key
=> {
a_subkey
=> 23 },
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
);
},
"/ENVHVRV03.*$mode_tagline/"
,
q{TNVHVRV13 number_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42.3, d_key => {a_subkey => 23}
, ...,
g_key
=> 1_701 }) throws correct exception}
);
lives_and(
sub
{
is( number_hashref_to_string( {
a_key
=> 23 } ),
q{{ 'a_key' => 23 }
},
q{TNVHVRV20 number_hashref_to_string({a_key => 23}
) returns correct value} );
},
q{TNVHVRV20 number_hashref_to_string({ a_key => 23 }
) lives}
);
lives_and(
sub
{
like(
number_hashref_to_string(
{
a_key
=> 2,
b_key
=> 2_112,
c_key
=> 42,
d_key
=> 23,
e_key
=> -877,
f_key
=> -33,
g_key
=> 1_701
}
),
q{/^\\\{\s(?=.*'a_key' => 2\b)(?=.*'b_key' => 2_112\b)(?=.*'c_key' => 42\b)(?=.*'d_key' => 23\b)(?=.*'e_key' => -877\b)(?=.*'f_key' => -33\b)(?=.*'g_key' => 1_701\b).*\s\}
$/m},
q{TNVHVRV21 number_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42, d_key => 23, e_key => -877, f_key => -33, g_key => 1_701 }
) returns correct value}
);
},
q{TNVHVRV21 number_hashref_to_string({ a_key => 2, b_key => 2_112, c_key => 42, d_key => 23, e_key => -877, f_key => -33, g_key => 1_701 }
) lives}
);
lives_and(
sub
{
like(
number_hashref_to_string( {
a_key
=> 2.123_443_211_234_432_1 } ),
qr/\{\s'a_key' => 2\.123_443_211_234/
,
q{TNVHVRV22 number_hashref_to_string({ a_key => 2.123_443_211_234_432_1 }
) returns correct value}
);
},
q{TNVHVRV22 number_hashref_to_string({ a_key => 2.123_443_211_234_432_1 }
) lives}
);
lives_and(
sub
{
like(
number_hashref_to_string(
{
a_key
=> 2.123_443_211_234_432_1,
b_key
=> 2_112.432_1,
c_key
=> 42.456_7,
d_key
=> 23.765_444_444_444_444_444,
e_key
=> -877.567_8,
f_key
=> -33.876_587_658_765_875_687_658_765,
g_key
=> 1_701.678_9
}
),
q{/^\\\{\s(?=.*'a_key' => 2\.123_443_211_234)(?=.*'b_key' => 2_112\.432_1)(?=.*'c_key' => 42\.456_7)(?=.*'d_key' => 23\.765_444_444_44)(?=.*'e_key' => -877\.567_8)(?=.*'f_key' => -33\.876_587_658_76)(?=.*'g_key' => 1_701\.678_9).*\s\}
$/m},
q{TNVHVRV23 number_hashref_to_string({ a_key => 2.123_443_211_234_432_1, b_key => 2_112.432_1, c_key => 42.456_7, ..., g_key => 1_701.678_9 }
) returns correct value}
);
},
q{TNVHVRV23 number_hashref_to_string({ a_key => 2.123_443_211_234_432_1, b_key => 2_112.432_1, c_key => 42.456_7, d_key => 23.765_444_444_444_444_444, e_key => -877.567_8, f_key => -33.876_587_658_765_875_687_658_765, g_key => 1_701.678_9 }
) lives}
);
throws_ok(
sub
{ number_hashref_typetest0() },
"/(ENVHVRV00.*$mode_tagline)|(Usage.*number_hashref_typetest0)/"
,
q{TNVHVRV30 number_hashref_typetest0() throws correct exception}
);
throws_ok(
sub
{ number_hashref_typetest0(2) },
"/ENVHVRV01.*$mode_tagline/"
,
q{TNVHVRV31 number_hashref_typetest0(2) throws correct exception}
);
throws_ok(
sub
{
number_hashref_typetest0(
{
'binary'
=> 2.123_443_211_234_432_1,
'rush'
=> 2_112.432_1,
'ERROR_FUNKEY'
=>
undef
,
'answer'
=> 42.456_7,
'fnord'
=> 23.765_444_444_444_444_444,
'units'
=> -877.567_8,
'degree'
=> -33.876_587_658_765_875_687_658_765,
'ncc'
=> 1_701.678_9
}
);
},
"/ENVHVRV02.*$mode_tagline/"
,
q{TNVHVRV32 number_hashref_typetest0({ 'binary' => 2.123_443_211_234_432_1, 'ERROR_FUNKEY' => undef, ..., 'ncc' => 1_701.678_9 }
) throws correct exception}
);
throws_ok(
sub
{
number_hashref_typetest0(
{
'binary'
=> 2.123_443_211_234_432_1,
'rush'
=> 2_112.432_1,
'ERROR_FUNKEY'
=>
'abcdefg'
,
'answer'
=> 42.456_7,
'fnord'
=> 23.765_444_444_444_444_444,
'units'
=> -877.567_8,
'degree'
=> -33.876_587_658_765_875_687_658_765,
'ncc'
=> 1_701.678_9
}
);
},
"/ENVHVRV03.*$mode_tagline/"
,
q{TNVHVRV33 number_hashref_typetest0({ 'binary' => 2.123_443_211_234_432_1, 'ERROR_FUNKEY' => 'abcdefg', ..., 'ncc' => 1_701.678_9 }
) throws correct exception}
);
lives_and(
sub
{
like(
number_hashref_typetest0(
{
'binary'
=> 2.123_443_211_234_432_1,
'rush'
=> 2_112.432_1,
'answer'
=> 42.456_7,
'fnord'
=> 23.765_444_444_444_444_444,
'units'
=> -877.567_8,
'degree'
=> -33.876_587_658_765_875_687_658_765,
'ncc'
=> 1_701.678_9
}
),
q{/^\\\{\s(?=.*'binary' => 2\.123_443_211_234)(?=.*'rush' => 2_112\.432_1)(?=.*'answer' => 42\.456_7)(?=.*'fnord' => 23\.765_444_444_44)(?=.*'units' => -877\.567_8)(?=.*'degree' => -33\.876_587_658_76)(?=.*'ncc' => 1_701\.678_9).*\s\}
} .
$mode_tagline
.
q{$/m}
,
q{TNVHVRV34 number_hashref_typetest0({ 'binary' => 2.123_443_211_234_432_1, 'rush' => 2_112.432_1, ..., 'ncc' => 1_701.678_9 }
) returns correct value}
);
},
q{TNVHVRV34 number_hashref_typetest0({ 'binary' => 2.123_443_211_234_432_1, 'rush' => 2_112.432_1, ..., 'ncc' => 1_701.678_9 }
) lives}
);
lives_and(
sub
{
my
number_hashref
$tmp_retval
= number_hashref_typetest1(5);
my
number_hashref
$correct_retval
= {
"$mode_tagline\_funkey2"
=> 10.246_913_578,
"$mode_tagline\_funkey3"
=> 15.370_370_367,
"$mode_tagline\_funkey4"
=> 20.493_827_156,
"$mode_tagline\_funkey1"
=> 5.123_456_789,
"$mode_tagline\_funkey0"
=> 0
};
foreach
my
string
$correct_retval_key
(
keys
%{
$correct_retval
} ) {
ok( ( (
exists
$tmp_retval
->{
$correct_retval_key
} ) and (
defined
$tmp_retval
->{
$correct_retval_key
} ) ),
q{TNVHVRV40a number_hashref_typetest1(5) returns defined value, at key }
.
$correct_retval_key
);
delta_ok(
$correct_retval
->{
$correct_retval_key
},
$tmp_retval
->{
$correct_retval_key
},
q{TNVHVRV40b number_hashref_typetest1(5) returns correct value, at key }
.
$correct_retval_key
);
}
},
q{TNVHVRV40 number_hashref_typetest1(5) lives}
);
throws_ok(
sub
{ string_hashref_to_string() },
"/(EPVHVRV00.*$mode_tagline)|(Usage.*string_hashref_to_string)/"
,
q{TPVHVRV00 string_hashref_to_string() throws correct exception}
);
throws_ok(
sub
{ string_hashref_to_string(
undef
) },
"/EPVHVRV00.*$mode_tagline/"
,
q{TPVHVRV01 string_hashref_to_string(undef) throws correct exception}
);
throws_ok(
sub
{ string_hashref_to_string(2) },
"/EPVHVRV01.*$mode_tagline/"
,
q{TPVHVRV02 string_hashref_to_string(2) throws correct exception}
);
throws_ok(
sub
{ string_hashref_to_string(2.3) },
"/EPVHVRV01.*$mode_tagline/"
,
q{TPVHVRV03 string_hashref_to_string(2.3) throws correct exception}
);
throws_ok(
sub
{ string_hashref_to_string(
'Lone Ranger'
) },
"/EPVHVRV01.*$mode_tagline/"
,
q{TPVHVRV04 string_hashref_to_string('Lone Ranger') throws correct exception}
);
throws_ok(
sub
{ string_hashref_to_string([
'Lone Ranger'
]) },
"/EPVHVRV01.*$mode_tagline/"
,
q{TPVHVRV05 string_hashref_to_string([ 'Lone Ranger' ]) throws correct exception}
);
throws_ok(
sub
{
string_hashref_to_string(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
'UNDEF_NOT_STRING'
=>
undef
}
);
},
"/EPVHVRV02.*$mode_tagline/"
,
q{TPVHVRV10 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'UNDEF_NOT_STRING' => undef }
) throws correct exception}
);
throws_ok(
sub
{
string_hashref_to_string(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
'INTEGER_NOT_STRING'
=> 23
}
);
},
"/EPVHVRV03.*$mode_tagline/"
,
q{TPVHVRV11 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'INTEGER_NOT_STRING' => 23 }
) throws correct exception}
);
throws_ok(
sub
{
string_hashref_to_string(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
'NUMBER_NOT_STRING'
=> -2_112.23
}
);
},
"/EPVHVRV03.*$mode_tagline/"
,
q{TPVHVRV12 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'NUMBER_NOT_STRING' => -2_112.23 }
) throws correct exception}
);
throws_ok(
sub
{
string_hashref_to_string(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
'ARRAY_NOT_STRING'
=> [
'Tonto'
]
}
);
},
"/EPVHVRV03.*$mode_tagline/"
,
q{TPVHVRV13 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'ARRAY_NOT_STRING' => [ 'Tonto' ] }
) throws correct exception}
);
throws_ok(
sub
{
string_hashref_to_string(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
'HASH_NOT_STRING'
=> {
fizz
=> 3 }
}
);
},
"/EPVHVRV03.*$mode_tagline/"
,
q{TPVHVRV14 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'HASH_NOT_STRING' => { fizz => 3 }
}) throws correct exception}
);
lives_and(
sub
{
like(
string_hashref_to_string(
{
'stuckinaworldhenevercreated'
=>
'Howard The Duck'
,
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'gothamite_darkknight_brucewayne'
=>
'Batman'
,
'amazonian_dianathemyscira_dianaprince'
=>
'Wonder Woman'
,
'scarletspeedster_barryallenetal'
=>
'Flash'
,
'alanscottetal'
=>
'Green Lantern'
,
'atlanteanhybrid_aquaticace_arthurcurryorin'
=>
'Aquaman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
}
),
q{/^\\\{\s(?=.*'stuckinaworldhenevercreated' => 'Howard The Duck')(?=.*'kryptonian_manofsteel_clarkkent' => 'Superman')(?=.*'gothamite_darkknight_brucewayne' => 'Batman')(?=.*'amazonian_dianathemyscira_dianaprince' => 'Wonder Woman')(?=.*'scarletspeedster_barryallenetal' => 'Flash')(?=.*'alanscottetal' => 'Green Lantern')(?=.*'atlanteanhybrid_aquaticace_arthurcurryorin' => 'Aquaman')(?=.*'greenmartian_bloodwynd_jonnjonnz' => 'Martian Manhunter').*\s\}
$/m}
,
q{TPVHVRV20 string_hashref_to_string({ 'stuckinaworldhenevercreated' => 'Howard The Duck', 'kryptonian_manofsteel_clarkkent' => 'Superman', ... }
) returns correct value}
);
},
q{TPVHVRV20 string_hashref_to_string({ 'stuckinaworldhenevercreated' => 'Howard The Duck', 'kryptonian_manofsteel_clarkkent' => 'Superman', ... }
) lives}
);
lives_and(
sub
{
like(
string_hashref_to_string(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
'STRING_NOT_UNDEF'
=>
'undef'
}
),
q{/^\\\{\s(?=.*'kryptonian_manofsteel_clarkkent' => 'Superman')(?=.*'greenmartian_bloodwynd_jonnjonnz' => 'Martian Manhunter')(?=.*'STRING_NOT_UNDEF' => 'undef').*\s\}
$/m}
,
q{TPVHVRV21 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'STRING_NOT_UNDEF' => 'undef' }
) returns correct value}
);
},
q{TPVHVRV21 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'STRING_NOT_UNDEF' => 'undef' }
) lives}
);
lives_and(
sub
{
like(
string_hashref_to_string(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
'STRING_NOT_INTEGER'
=>
'23'
}
),
q{/^\\\{\s(?=.*'kryptonian_manofsteel_clarkkent' => 'Superman')(?=.*'greenmartian_bloodwynd_jonnjonnz' => 'Martian Manhunter')(?=.*'STRING_NOT_INTEGER' => '23').*\s\}
$/m}
,
q{TPVHVRV22 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'STRING_NOT_INTEGER' => '23' }
) returns correct value}
);
},
q{TPVHVRV22 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'STRING_NOT_INTEGER' => '23' }
) lives}
);
lives_and(
sub
{
like(
string_hashref_to_string(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
'STRING_NOT_NUMBER'
=>
'-2_112.23'
}
),
q{/^\\\{\s(?=.*'kryptonian_manofsteel_clarkkent' => 'Superman')(?=.*'greenmartian_bloodwynd_jonnjonnz' => 'Martian Manhunter')(?=.*'STRING_NOT_NUMBER' => '-2_112.23').*\s\}
$/m}
,
q{TPVHVRV23 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'STRING_NOT_NUMBER' => '-2_112.23' }
) returns correct value}
);
},
q{TPVHVRV23 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'STRING_NOT_NUMBER' => '-2_112.23' }
) lives}
);
lives_and(
sub
{
like(
string_hashref_to_string(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
"STRING_NOT_ARRAY"
=>
"[ Tonto ]"
}
),
q{/^\\\{\s(?=.*'kryptonian_manofsteel_clarkkent' => 'Superman')(?=.*'greenmartian_bloodwynd_jonnjonnz' => 'Martian Manhunter')(?=.*'STRING_NOT_ARRAY' => '\[ Tonto \]').*\s\}
$/m}
,
q{TPVHVRV24 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., "STRING_NOT_ARRAY" => "[ Tonto ]" }
) returns correct value}
);
},
q{TPVHVRV24 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., "STRING_NOT_ARRAY" => "[ Tonto ]" }
) lives}
);
lives_and(
sub
{
like(
string_hashref_to_string(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
"STRING_NOT_HASH"
=>
"{ buzz => 5 }"
}
),
q[/^\{\s(?=.*'kryptonian_manofsteel_clarkkent' => 'Superman')(?=.*'greenmartian_bloodwynd_jonnjonnz' => 'Martian Manhunter')(?=.*'STRING_NOT_HASH' => '\{ buzz => 5 \}').*\s\}$/m]
,
q{TPVHVRV25 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., "STRING_NOT_HASH" => "{ buzz => 5 }
" }) returns correct value}
);
},
q{TPVHVRV25 string_hashref_to_string({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., "STRING_NOT_HASH" => "{ buzz => 5 }
" }) lives}
);
throws_ok(
sub
{ string_hashref_typetest0() },
"/(EPVHVRV00.*$mode_tagline)|(Usage.*string_hashref_typetest0)/"
,
q{TPVHVRV30 string_hashref_typetest0() throws correct exception}
);
throws_ok(
sub
{ string_hashref_typetest0(2) },
"/EPVHVRV01.*$mode_tagline/"
,
q{TPVHVRV31 string_hashref_typetest0(2) throws correct exception}
);
throws_ok(
sub
{
string_hashref_typetest0(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'gothamite_darkknight_brucewayne'
=>
'Batman'
,
'amazonian_dianathemyscira_dianaprince'
=>
'Wonder Woman'
,
'scarletspeedster_barryallenetal'
=>
'Flash'
,
'alanscottetal'
=>
'Green Lantern'
,
'atlanteanhybrid_aquaticace_arthurcurryorin'
=>
'Aquaman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
'UNDEF_NOT_STRING'
=>
undef
}
);
},
"/EPVHVRV02.*$mode_tagline/"
,
q{TPVHVRV32 string_hashref_typetest0({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'UNDEF_NOT_STRING' => undef }
) throws correct exception}
);
throws_ok(
sub
{
string_hashref_typetest0(
{
'kryptonian_manofsteel_clarkkent'
=>
'Superman'
,
'gothamite_darkknight_brucewayne'
=>
'Batman'
,
'amazonian_dianathemyscira_dianaprince'
=>
'Wonder Woman'
,
'scarletspeedster_barryallenetal'
=>
'Flash'
,
'alanscottetal'
=>
'Green Lantern'
,
'atlanteanhybrid_aquaticace_arthurcurryorin'
=>
'Aquaman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
,
'ARRAY_NOT_STRING'
=> [ 23, -42.3 ]
}
);
},
"/EPVHVRV03.*$mode_tagline/"
,
q{TPVHVRV33 string_hashref_typetest0({ 'kryptonian_manofsteel_clarkkent' => 'Superman', ..., 'ARRAY_NOT_STRING' => [ 23, -42. 3 ] }
) throws correct exception}
);
lives_and(
sub
{
like(
string_hashref_typetest0(
{
'stuckinaworldhenevercreated'
=>
'Howard The Duck'
,
'atlanteanhybrid_aquaticace_arthurcurryorin'
=>
'Aquaman'
,
'greenmartian_bloodwynd_jonnjonnz'
=>
'Martian Manhunter'
}
),
q{/^\\\{\s(?=.*'stuckinaworldhenevercreated' => 'Howard The Duck')(?=.*'atlanteanhybrid_aquaticace_arthurcurryorin' => 'Aquaman')(?=.*'greenmartian_bloodwynd_jonnjonnz' => 'Martian Manhunter').*\s\}
} .
$mode_tagline
.
q{$/m}
,
q{TPVHVRV34 string_hashref_typetest0({ 'stuckinaworldhenevercreated' => 'Howard The Duck', ... }
) returns correct value}
);
},
q{TPVHVRV34 string_hashref_typetest0({ 'stuckinaworldhenevercreated' => 'Howard The Duck', ... }
) lives}
);
lives_and(
sub
{
is_deeply(
string_hashref_typetest1(5),
{
"$mode_tagline\_Luker_key3"
=>
'Jeffy Ten! 3/4'
,
"$mode_tagline\_Luker_key2"
=>
'Jeffy Ten! 2/4'
,
"$mode_tagline\_Luker_key1"
=>
'Jeffy Ten! 1/4'
,
"$mode_tagline\_Luker_key4"
=>
'Jeffy Ten! 4/4'
,
"$mode_tagline\_Luker_key0"
=>
'Jeffy Ten! 0/4'
},
q{TPVHVRV40 string_hashref_typetest1(5) returns correct value}
);
},
q{TPVHVRV40 string_hashref_typetest1(5) lives}
);
throws_ok(
sub
{ integer_arrayref_hashref_to_string() },
"/(EIVAVRVHVRV00.*$mode_tagline)|(Usage.*integer_arrayref_hashref_to_string)/"
,
q{TIVAVRVHVRV00 integer_arrayref_hashref_to_string() throws correct exception}
);
throws_ok(
sub
{ integer_arrayref_hashref_to_string(
undef
) },
"/EIVAVRVHVRV00.*$mode_tagline/"
,
q{TIVAVRVHVRV01 integer_arrayref_hashref_to_string(undef) throws correct exception}
);
throws_ok(
sub
{ integer_arrayref_hashref_to_string(2) },
"/EIVAVRVHVRV01.*$mode_tagline/"
,
q{TIVAVRVHVRV02 integer_arrayref_hashref_to_string(2) throws correct exception}
);
throws_ok(
sub
{ integer_arrayref_hashref_to_string(2.3) },
"/EIVAVRVHVRV01.*$mode_tagline/"
,
q{TIVAVRVHVRV03 integer_arrayref_hashref_to_string(2.3) throws correct exception}
);
throws_ok(
sub
{ integer_arrayref_hashref_to_string(
'2'
) },
"/EIVAVRVHVRV01.*$mode_tagline/"
,
q{TIVAVRVHVRV04 integer_arrayref_hashref_to_string('2') throws correct exception}
);
throws_ok(
sub
{ integer_arrayref_hashref_to_string([ 2 ]) },
"/EIVAVRVHVRV01.*$mode_tagline/"
,
q{TIVAVRVHVRV05 integer_arrayref_hashref_to_string([ 2 ]) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=>
undef
,
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV02.*$mode_tagline/"
,
q{TIVAVRVHVRV10 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => undef, key_2 => [ 0, -1, -2 ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=> 23,
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV03.*$mode_tagline/"
,
q{TIVAVRVHVRV11 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => 23, key_2 => [ 0, -1, -2 ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=> 23.42,
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV03.*$mode_tagline/"
,
q{TIVAVRVHVRV12 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => 23.42, key_2 => [ 0, -1, -2 ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=>
'howdy'
,
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV03.*$mode_tagline/"
,
q{TIVAVRVHVRV13 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => 'howdy', key_2 => [ 0, -1, -2 ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=> {
subkey_10
=> 23 },
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV03.*$mode_tagline/"
,
q{TIVAVRVHVRV14 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => { subkey_10 => 23 }
,
key_2
=> [ 0, -1, -2 ] }) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1,
undef
],
key_1
=> [ 5, 6, 7 ],
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV04.*$mode_tagline/"
,
q{TIVAVRVHVRV20 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, undef ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, -2 ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=> [ 5,
undef
, 7 ],
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV04.*$mode_tagline/"
,
q{TIVAVRVHVRV21 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, undef, 7 ], key_2 => [ 0, -1, -2 ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=> [ 5, 6, 7 ],
key_2
=> [
undef
, -1, -2 ]
});
},
"/EIVAVRVHVRV04.*$mode_tagline/"
,
q{TIVAVRVHVRV22 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ undef, -1, -2 ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2 ],
key_1
=> [ 5, 6, 7 ],
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV05.*$mode_tagline/"
,
q{TIVAVRVHVRV30 integer_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, -2 ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=> [ 5,
'6'
, 7 ],
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV05.*$mode_tagline/"
,
q{TIVAVRVHVRV31 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, '6', 7 ], key_2 => [ 0, -1, -2 ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=> [ 5, 6, 7 ],
key_2
=> [ 0, -1, [ -2 ] ]
});
},
"/EIVAVRVHVRV05.*$mode_tagline/"
,
q{TIVAVRVHVRV32 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, [ -2 ] ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=> [ 5, {
subkey_11
=> 6 }, 7 ],
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV05.*$mode_tagline/"
,
q{TIVAVRVHVRV33 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, { subkey_11 => 6 }
, 7 ],
key_2
=> [ 0, -1, -2 ] }) throws correct exception}
);
lives_and(
sub
{
is( integer_arrayref_hashref_to_string( {
key_0
=> [ 0, 1, 2 ] } ),
q{{ 'key_0' => [ 0, 1, 2 ] }
},
q{TIVAVRVHVRV40 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ] }
) returns correct value} );
},
q{TIVAVRVHVRV40 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ] }
) lives}
);
lives_and(
sub
{ like(
integer_arrayref_hashref_to_string({
key_0
=> [ 0, 1, 2 ],
key_1
=> [ 5, 6, 7 ],
key_2
=> [ 0, -1, -2 ]
}),
q{/^\\\{\s(?=.*'key_0' => \[ 0, 1, 2 \])(?=.*'key_1' => \[ 5, 6, 7 \])(?=.*'key_2' => \[ 0, -1, -2 \]).*\s\}
$/m},
q{TIVAVRVHVRV51 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, -2 ] }
) returns correct value}
); },
q{TIVAVRVHVRV51 integer_arrayref_hashref_to_string({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, -2 ] }
) lives}
);
lives_and(
sub
{ like(
integer_arrayref_hashref_to_string_compact({
key_0
=> [ 0, 1, 2 ],
key_1
=> [ 5, 6, 7 ],
key_2
=> [ 0, -1, -2 ]
}),
q{/^\\\{(?=.*'key_0'=>\[0,1,2\])(?=.*'key_1'=>\[5,6,7\])(?=.*'key_2'=>\[0,-1,-2\]).*\}
$/m},
q{TIVAVRVHVRV52 integer_arrayref_hashref_to_string_compact({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, -2 ] }
) returns correct value}
); },
q{TIVAVRVHVRV52 integer_arrayref_hashref_to_string_compact({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, -2 ] }
) lives}
);
lives_and(
sub
{ like(
integer_arrayref_hashref_to_string_pretty({
key_0
=> [ 0, 1, 2 ],
key_1
=> [ 5, 6, 7 ],
key_2
=> [ 0, -1, -2 ]
}),
q{/^\{(?=.*\n 'key_0' => \[ 0, 1, 2 \])(?=.*\n 'key_1' => \[ 5, 6, 7 \])(?=.*\n 'key_2' => \[ 0, -1, -2 \]).*\}
$/ms},
q{TIVAVRVHVRV53 integer_arrayref_hashref_to_string_pretty({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, -2 ] }
) returns correct value}
); },
q{TIVAVRVHVRV53 integer_arrayref_hashref_to_string_pretty({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, -2 ] }
) lives}
);
throws_ok(
sub
{ integer_arrayref_hashref_typetest0() },
"/(EIVAVRVHVRV00.*$mode_tagline)|(Usage.*integer_arrayref_hashref_typetest0)/"
,
q{TIVAVRVHVRV60 integer_arrayref_hashref_typetest0() throws correct exception}
);
throws_ok(
sub
{ integer_arrayref_hashref_typetest0(2) },
"/EIVAVRVHVRV01.*$mode_tagline/"
,
q{TIVAVRVHVRV61 integer_arrayref_hashref_typetest0(2) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_typetest0({
key_0
=> [ 0, 1, 2 ],
key_1
=>
undef
,
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV02.*$mode_tagline/"
,
q{TIVAVRVHVRV62 integer_arrayref_hashref_typetest0({ key_0 => [ 0, 1, 2 ], key_1 => undef, key_2 => [ 0, -1, -2 ] }
) throws correct exception}
);
throws_ok(
sub
{
integer_arrayref_hashref_typetest0({
key_0
=> [ 0, 1, 2 ],
key_1
=> 5,
key_2
=> [ 0, -1, -2 ]
});
},
"/EIVAVRVHVRV03.*$mode_tagline/"
,
q{TIVAVRVHVRV63 integer_arrayref_hashref_typetest0({ key_0 => [ 0, 1, 2 ], key_1 => 5, key_2 => [ 0, -1, -2 ] }
) throws correct exception}
);
lives_and(
sub
{
like( integer_arrayref_hashref_typetest0({
key_0
=> [ 0, 1, 2 ],
key_1
=> [ 5, 6, 7 ],
key_2
=> [ 0, -1, -2 ]
} ),
q{/^\{(?=.*'key_0' => \[ 0, 1, 2 \])(?=.*'key_1' => \[ 5, 6, 7 \])(?=.*'key_2' => \[ 0, -1, -2 \]).*\}
} .
$mode_tagline
.
q{$/ms}
,
q{TIVAVRVHVRV64 integer_arrayref_hashref_typetest0({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, -2 ] }
) returns correct value}
);
},
q{TIVAVRVHVRV64 integer_arrayref_hashref_typetest0({ key_0 => [ 0, 1, 2 ], key_1 => [ 5, 6, 7 ], key_2 => [ 0, -1, -2 ] }
) lives}
);
lives_and(
sub
{
is_deeply(
integer_arrayref_hashref_typetest1(5),
{
"$mode_tagline\_funkey0"
=> [0, 0, 0, 0, 0],
"$mode_tagline\_funkey1"
=> [0, 1, 2, 3, 4],
"$mode_tagline\_funkey2"
=> [0, 2, 4, 6, 8],
"$mode_tagline\_funkey3"
=> [0, 3, 6, 9, 12],
"$mode_tagline\_funkey4"
=> [0, 4, 8, 12, 16]
},
q{TIVAVRVHVRV70 integer_arrayref_hashref_typetest1(5) returns correct value}
);
},
q{TIVAVRVHVRV70 integer_arrayref_hashref_typetest1(5) lives}
);
throws_ok(
sub
{ number_arrayref_hashref_to_string() },
"/(ENVAVRVHVRV00.*$mode_tagline)|(Usage.*number_arrayref_hashref_to_string)/"
,
q{TNVAVRVHVRV00 number_arrayref_hashref_to_string() throws correct exception}
);
throws_ok(
sub
{ number_arrayref_hashref_to_string(
undef
) },
"/ENVAVRVHVRV00.*$mode_tagline/"
,
q{TNVAVRVHVRV01 number_arrayref_hashref_to_string(undef) throws correct exception}
);
throws_ok(
sub
{ number_arrayref_hashref_to_string(2) },
"/ENVAVRVHVRV01.*$mode_tagline/"
,
q{TNVAVRVHVRV02 number_arrayref_hashref_to_string(2) throws correct exception}
);
throws_ok(
sub
{ number_arrayref_hashref_to_string(2.3) },
"/ENVAVRVHVRV01.*$mode_tagline/"
,
q{TNVAVRVHVRV03 number_arrayref_hashref_to_string(2.3) throws correct exception}
);
throws_ok(
sub
{ number_arrayref_hashref_to_string(
'2'
) },
"/ENVAVRVHVRV01.*$mode_tagline/"
,
q{TNVAVRVHVRV04 number_arrayref_hashref_to_string('2') throws correct exception}
);
throws_ok(
sub
{ number_arrayref_hashref_to_string([ 2 ]) },
"/ENVAVRVHVRV01.*$mode_tagline/"
,
q{TNVAVRVHVRV05 number_arrayref_hashref_to_string([ 2 ]) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=>
undef
,
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV02.*$mode_tagline/"
,
q{TNVAVRVHVRV10 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => undef, key_2 => [ 0.123, -1.234, -2.345 ] }
) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> 23,
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV03.*$mode_tagline/"
,
q{TNVAVRVHVRV11 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => 23, key_2 => [ 0.123, -1.234, -2.345 ] }
) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> 23.42,
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV03.*$mode_tagline/"
,
q{TNVAVRVHVRV12 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => 23.42, key_2 => [ 0.123, -1.234, -2.345 ] }
) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=>
'howdy'
,
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV03.*$mode_tagline/"
,
q{TNVAVRVHVRV13 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => 'howdy', key_2 => [ 0.123, -1.234, -2.345 ] }
) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> {
subkey_10
=> 23.42 },
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV03.*$mode_tagline/"
,
q{TNVAVRVHVRV14 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => { subkey_10 => 23.42 }
,
key_2
=> [ 0.123, -1.234, -2.345 ] }) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1,
undef
],
key_1
=> [ 5.67, 6.78, 7.89 ],
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV04.*$mode_tagline/"
,
q{TNVAVRVHVRV20 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, undef ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> [ 5.67,
undef
, 7.89 ],
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV04.*$mode_tagline/"
,
q{TNVAVRVHVRV21 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, undef, 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> [ 5.67, 6.78, 7.89 ],
key_2
=> [
undef
, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV04.*$mode_tagline/"
,
q{TNVAVRVHVRV22 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ undef, -1.234, -2.345 ] }
) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> [ 5.67,
'6.78'
, 7.89 ],
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV05.*$mode_tagline/"
,
q{TNVAVRVHVRV30 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, '6.78', 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> [ 5.67, 6.78, 7.89 ],
key_2
=> [ 0.123, -1.234, [ -2.345 ] ]
});
},
"/ENVAVRVHVRV05.*$mode_tagline/"
,
q{TNVAVRVHVRV31 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ 0.123, -1.234, [ -2.345 ] ] }
) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> [ 5.67, {
subkey_11
=> 6.78 }, 7.89 ],
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV05.*$mode_tagline/"
,
q{TNVAVRVHVRV32 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, { subkey_11 => 6.78 }
, 7.89 ],
key_2
=> [ 0.123, -1.234, -2.345 ] }) throws correct exception}
);
lives_and(
sub
{
is( number_arrayref_hashref_to_string( {
key_0
=> [ 0.1, 1, 2.3 ] } ),
q{{ 'key_0' => [ 0.1, 1, 2.3 ] }
},
q{TNVAVRVHVRV40 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ] }
) returns correct value} );
},
q{TNVAVRVHVRV40 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ] }
) lives}
);
lives_and(
sub
{ like(
number_arrayref_hashref_to_string({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> [ 5.67, 6.78, 7.89 ],
key_2
=> [ 0.123, -1.234, -2.345 ]
}),
q{/^\\\{\s(?=.*'key_0' => \[ 0.1, 1, 2.3 \])(?=.*'key_1' => \[ 5.67, 6.78, 7.89 \])(?=.*'key_2' => \[ 0.123, -1.234, -2.345 \]).*\s\}
$/m},
q{TNVAVRVHVRV51 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) returns correct value}
); },
q{TNVAVRVHVRV51 number_arrayref_hashref_to_string({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) lives}
);
lives_and(
sub
{ like(
number_arrayref_hashref_to_string_compact({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> [ 5.67, 6.78, 7.89 ],
key_2
=> [ 0.123, -1.234, -2.345 ]
}),
q{/^\\\{(?=.*'key_0'=>\[0.1,1,2.3\])(?=.*'key_1'=>\[5.67,6.78,7.89\])(?=.*'key_2'=>\[0.123,-1.234,-2.345\]).*\}
$/m},
q{TNVAVRVHVRV52 number_arrayref_hashref_to_string_compact({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) returns correct value}
); },
q{TNVAVRVHVRV52 number_arrayref_hashref_to_string_compact({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) lives}
);
lives_and(
sub
{ like(
number_arrayref_hashref_to_string_pretty({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> [ 5.67, 6.78, 7.89 ],
key_2
=> [ 0.123, -1.234, -2.345 ]
}),
q{/^\{(?=.*\n 'key_0' => \[ 0.1, 1, 2.3 \])(?=.*\n 'key_1' => \[ 5.67, 6.78, 7.89 \])(?=.*\n 'key_2' => \[ 0.123, -1.234, -2.345 \]).*\}
$/ms},
q{TNVAVRVHVRV53 number_arrayref_hashref_to_string_pretty({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) returns correct value}
); },
q{TNVAVRVHVRV53 number_arrayref_hashref_to_string_pretty({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) lives}
);
throws_ok(
sub
{ number_arrayref_hashref_typetest0() },
"/(ENVAVRVHVRV00.*$mode_tagline)|(Usage.*number_arrayref_hashref_typetest0)/"
,
q{TNVAVRVHVRV60 number_arrayref_hashref_typetest0() throws correct exception}
);
throws_ok(
sub
{ number_arrayref_hashref_typetest0(2) },
"/ENVAVRVHVRV01.*$mode_tagline/"
,
q{TNVAVRVHVRV61 number_arrayref_hashref_typetest0(2) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_typetest0({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=>
undef
,
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV02.*$mode_tagline/"
,
q{TNVAVRVHVRV62 number_arrayref_hashref_typetest0({ key_0 => [ 0.1, 1, 2.3 ], key_1 => undef, key_2 => [ 0.123, -1.234, -2.345 ] }
) throws correct exception}
);
throws_ok(
sub
{
number_arrayref_hashref_typetest0({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> 5.67,
key_2
=> [ 0.123, -1.234, -2.345 ]
});
},
"/ENVAVRVHVRV03.*$mode_tagline/"
,
q{TNVAVRVHVRV63 number_arrayref_hashref_typetest0({ key_0 => [ 0.1, 1, 2.3 ], key_1 => 5.67, key_2 => [ 0.123, -1.234, -2.345 ] }
) throws correct exception}
);
lives_and(
sub
{
like( number_arrayref_hashref_typetest0({
key_0
=> [ 0.1, 1, 2.3 ],
key_1
=> [ 5.67, 6.78, 7.89 ],
key_2
=> [ 0.123, -1.234, -2.345 ]
}),
q{/^\{(?=.*'key_0' => \[ 0.1, 1, 2.3 \])(?=.*'key_1' => \[ 5.67, 6.78, 7.89 \])(?=.*'key_2' => \[ 0.123, -1.234, -2.345 \]).*\}
} .
$mode_tagline
.
q{$/ms}
,
q{TNVAVRVHVRV64 number_arrayref_hashref_typetest0({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) returns correct value}
);
},
q{TNVAVRVHVRV64 number_arrayref_hashref_typetest0({ key_0 => [ 0.1, 1, 2.3 ], key_1 => [ 5.67, 6.78, 7.89 ], key_2 => [ 0.123, -1.234, -2.345 ] }
) lives}
);
lives_and(
sub
{
is_deeply(
number_arrayref_hashref_typetest1(5),
{
"$mode_tagline\_funkey0"
=> [ 0, 0, 0, 0, 0 ],
"$mode_tagline\_funkey1"
=> [ 0, 5.123_456_789, 10.246_913_578, 15.370_370_367, 20.493_827_156 ],
"$mode_tagline\_funkey2"
=> [ 0, 10.246_913_578, 20.493_827_156, 30.740_740_734, 40.987_654_312 ],
"$mode_tagline\_funkey3"
=> [ 0, 15.370_370_367, 30.740_740_734, 46.111_111_101, 61.481_481_468 ],
"$mode_tagline\_funkey4"
=> [ 0, 20.493_827_156, 40.987_654_312, 61.481_481_468, 81.975_308_624 ]
},
q{TNVAVRVHVRV70 number_arrayref_hashref_typetest1(5) returns correct value}
);
},
q{TNVAVRVHVRV70 number_arrayref_hashref_typetest1(5) lives}
);
throws_ok(
sub
{ string_arrayref_hashref_to_string() },
"/(EPVAVRVHVRV00.*$mode_tagline)|(Usage.*string_arrayref_hashref_to_string)/"
,
q{TPVAVRVHVRV00 string_arrayref_hashref_to_string() throws correct exception}
);
throws_ok(
sub
{ string_arrayref_hashref_to_string(
undef
) },
"/EPVAVRVHVRV00.*$mode_tagline/"
,
q{TPVAVRVHVRV01 string_arrayref_hashref_to_string(undef) throws correct exception}
);
throws_ok(
sub
{ string_arrayref_hashref_to_string(2) },
"/EPVAVRVHVRV01.*$mode_tagline/"
,
q{TPVAVRVHVRV02 string_arrayref_hashref_to_string(2) throws correct exception}
);
throws_ok(
sub
{ string_arrayref_hashref_to_string(2.3) },
"/EPVAVRVHVRV01.*$mode_tagline/"
,
q{TPVAVRVHVRV03 string_arrayref_hashref_to_string(2.3) throws correct exception}
);
throws_ok(
sub
{ string_arrayref_hashref_to_string(
'2'
) },
"/EPVAVRVHVRV01.*$mode_tagline/"
,
q{TPVAVRVHVRV04 string_arrayref_hashref_to_string('2') throws correct exception}
);
throws_ok(
sub
{ string_arrayref_hashref_to_string([ 2 ]) },
"/EPVAVRVHVRV01.*$mode_tagline/"
,
q{TPVAVRVHVRV05 string_arrayref_hashref_to_string([ 2 ]) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=>
undef
,
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV02.*$mode_tagline/"
,
q{TPVAVRVHVRV10 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => undef, key_2 => [ 'h i', '', "\n" ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> 23,
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV03.*$mode_tagline/"
,
q{TPVAVRVHVRV11 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => 23, key_2 => [ 'h i', '', "\n" ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> 23.42,
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV03.*$mode_tagline/"
,
q{TPVAVRVHVRV12 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => 23.42, key_2 => [ 'h i', '', "\n" ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=>
'h i'
,
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV03.*$mode_tagline/"
,
q{TPVAVRVHVRV13 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => 'h i', key_2 => [ 'h i', '', "\n" ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> {
subkey_10
=>
'h i'
},
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV03.*$mode_tagline/"
,
q{TPVAVRVHVRV14 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => { subkey_10 => 'h i' }
,
key_2
=> [
'h i'
,
''
,
"\n"
] }) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
undef
],
key_1
=> [
'a'
,
'b'
,
'c'
],
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV04.*$mode_tagline/"
,
q{TPVAVRVHVRV20 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', undef ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', "\n" ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> [
'a'
,
undef
,
'c'
],
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV04.*$mode_tagline/"
,
q{TPVAVRVHVRV21 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', undef, 'c' ], key_2 => [ 'h i', '', "\n" ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> [
'a'
,
'b'
,
'c'
],
key_2
=> [
undef
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV04.*$mode_tagline/"
,
q{TPVAVRVHVRV22 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ undef, '', "\n" ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [ 0,
'1'
,
'2'
],
key_1
=> [
'a'
,
'b'
,
'c'
],
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV05.*$mode_tagline/"
,
q{TPVAVRVHVRV30 string_arrayref_hashref_to_string({ key_0 => [ 0, '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', "\n" ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> [
'a'
, 6.78,
'c'
],
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV05.*$mode_tagline/"
,
q{TPVAVRVHVRV31 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 6.78, 'c' ], key_2 => [ 'h i', '', "\n" ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> [
'a'
,
'b'
,
'c'
],
key_2
=> [
'h i'
,
''
, [
"\n"
] ]
});
},
"/EPVAVRVHVRV05.*$mode_tagline/"
,
q{TPVAVRVHVRV32 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', [ "\n" ] ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> [
'a'
, {
subkey_11
=>
'b'
},
'c'
],
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV05.*$mode_tagline/"
,
q{TPVAVRVHVRV33 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', { subkey_11 => 'b' }
,
'c'
],
key_2
=> [
'h i'
,
''
,
"\n"
] }) throws correct exception}
);
lives_and(
sub
{
is( string_arrayref_hashref_to_string( {
key_0
=> [
'0'
,
'1'
,
'2'
] } ),
q{{ 'key_0' => [ '0', '1', '2' ] }
},
q{TPVAVRVHVRV40 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ] }
) returns correct value} );
},
q{TPVAVRVHVRV40 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ] }
) lives}
);
lives_and(
sub
{ like(
string_arrayref_hashref_to_string({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> [
'a'
,
'b'
,
'c'
],
key_2
=> [
'h i'
,
''
,
"\n"
]
}),
q{/^\\\{\s(?=.*'key_0' => \[ '0', '1', '2' \])(?=.*'key_1' => \[ 'a', 'b', 'c' \])(?=.*'key_2' => \[ 'h i', '', '\n' \]).*\s\}
$/ms},
q{TPVAVRVHVRV51 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', "\n" ] }
) returns correct value}
); },
q{TPVAVRVHVRV51 string_arrayref_hashref_to_string({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', "\n" ] }
) lives}
);
lives_and(
sub
{ like(
string_arrayref_hashref_to_string_compact({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> [
'a'
,
'b'
,
'c'
],
key_2
=> [
'h i'
,
''
,
"\n"
]
}),
q{/^\\\{(?=.*'key_0'=>\['0','1','2'\])(?=.*'key_1'=>\['a','b','c'\])(?=.*'key_2'=>\['h i','','\n'\]).*\}
$/ms},
q{TPVAVRVHVRV52 string_arrayref_hashref_to_string_compact({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', "\n" ] }
) returns correct value}
); },
q{TPVAVRVHVRV52 string_arrayref_hashref_to_string_compact({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', "\n" ] }
) lives}
);
lives_and(
sub
{ like(
string_arrayref_hashref_to_string_pretty({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> [
'a'
,
'b'
,
'c'
],
key_2
=> [
'h i'
,
''
,
"\n"
]
}),
q{/^\{(?=.*\n 'key_0' => \[ '0', '1', '2' \])(?=.*\n 'key_1' => \[ 'a', 'b', 'c' \])(?=.*\n 'key_2' => \[ 'h i', '', '\n' \]).*\}
$/ms},
q{TPVAVRVHVRV53 string_arrayref_hashref_to_string_pretty({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', "\n" ] }
) returns correct value}
); },
q{TPVAVRVHVRV53 string_arrayref_hashref_to_string_pretty({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', "\n" ] }
) lives}
);
throws_ok(
sub
{ string_arrayref_hashref_typetest0() },
"/(EPVAVRVHVRV00.*$mode_tagline)|(Usage.*string_arrayref_hashref_typetest0)/"
,
q{TPVAVRVHVRV60 string_arrayref_hashref_typetest0() throws correct exception}
);
throws_ok(
sub
{ string_arrayref_hashref_typetest0(2) },
"/EPVAVRVHVRV01.*$mode_tagline/"
,
q{TPVAVRVHVRV61 string_arrayref_hashref_typetest0(2) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_typetest0({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=>
undef
,
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV02.*$mode_tagline/"
,
q{TPVAVRVHVRV62 string_arrayref_hashref_typetest0({ key_0 => [ '0', '1', '2' ], key_1 => undef, key_2 => [ 'h i', '', "\n" ] }
) throws correct exception}
);
throws_ok(
sub
{
string_arrayref_hashref_typetest0({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=>
'b'
,
key_2
=> [
'h i'
,
''
,
"\n"
]
});
},
"/EPVAVRVHVRV03.*$mode_tagline/"
,
q{TPVAVRVHVRV63 string_arrayref_hashref_typetest0({ key_0 => [ '0', '1', '2' ], key_1 => 'b', key_2 => [ 'h i', '', "\n" ] }
) throws correct exception}
);
lives_and(
sub
{
like( string_arrayref_hashref_typetest0({
key_0
=> [
'0'
,
'1'
,
'2'
],
key_1
=> [
'a'
,
'b'
,
'c'
],
key_2
=> [
'h i'
,
''
,
"\n"
]
} ),
q{/^\{(?=.*'key_0' => \[ '0', '1', '2' \])(?=.*'key_1' => \[ 'a', 'b', 'c' \])(?=.*'key_2' => \[ 'h i', '', '\n' \]).*\}
} .
$mode_tagline
.
q{$/ms}
,
q{TPVAVRVHVRV64 string_arrayref_hashref_typetest0({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', "\n" ] }
) returns correct value}
);
},
q{TPVAVRVHVRV64 string_arrayref_hashref_typetest0({ key_0 => [ '0', '1', '2' ], key_1 => [ 'a', 'b', 'c' ], key_2 => [ 'h i', '', "\n" ] }
) lives}
);
lives_and(
sub
{
is_deeply(
string_arrayref_hashref_typetest1(5),
{
"$mode_tagline\_funkey0"
=> [
'Jeffy Ten! (0, 0)/4'
,
'Jeffy Ten! (0, 1)/4'
,
'Jeffy Ten! (0, 2)/4'
,
'Jeffy Ten! (0, 3)/4'
,
'Jeffy Ten! (0, 4)/4'
],
"$mode_tagline\_funkey1"
=> [
'Jeffy Ten! (1, 0)/4'
,
'Jeffy Ten! (1, 1)/4'
,
'Jeffy Ten! (1, 2)/4'
,
'Jeffy Ten! (1, 3)/4'
,
'Jeffy Ten! (1, 4)/4'
],
"$mode_tagline\_funkey2"
=> [
'Jeffy Ten! (2, 0)/4'
,
'Jeffy Ten! (2, 1)/4'
,
'Jeffy Ten! (2, 2)/4'
,
'Jeffy Ten! (2, 3)/4'
,
'Jeffy Ten! (2, 4)/4'
],
"$mode_tagline\_funkey3"
=> [
'Jeffy Ten! (3, 0)/4'
,
'Jeffy Ten! (3, 1)/4'
,
'Jeffy Ten! (3, 2)/4'
,
'Jeffy Ten! (3, 3)/4'
,
'Jeffy Ten! (3, 4)/4'
],
"$mode_tagline\_funkey4"
=> [
'Jeffy Ten! (4, 0)/4'
,
'Jeffy Ten! (4, 1)/4'
,
'Jeffy Ten! (4, 2)/4'
,
'Jeffy Ten! (4, 3)/4'
,
'Jeffy Ten! (4, 4)/4'
]
},
q{TPVAVRVHVRV70 string_arrayref_hashref_typetest1(5) returns correct value}
);
},
q{TPVAVRVHVRV70 string_arrayref_hashref_typetest1(5) lives}
);
}
done_testing();