Skip to content

Commit

Permalink
even harder Mojo::JSON tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 11, 2014
1 parent fa1b2d1 commit 55c78d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/mojo/json.t
Expand Up @@ -308,10 +308,10 @@ is $json->encode({test => [$num, $str]}), '{"test":[1,0]}',
'upgraded number detected';

# Ensure numbers and strings are not upgraded
my @values = (3, 'three', '3');
is $json->encode(\@values), '[3,"three","3"]',
my $mixed = [3, 'three', '3', 0, "0"];
is $json->encode($mixed), '[3,"three","3",0,"0"]',
'all have been detected correctly';
is $json->encode(\@values), '[3,"three","3"]',
is $json->encode($mixed), '[3,"three","3",0,"0"]',
'all have been detected correctly again';

# "inf" and "nan"
Expand Down

0 comments on commit 55c78d7

Please sign in to comment.