File: 01-use.t

package info (click to toggle)
libjson-perl 1.00-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 168 kB
  • ctags: 116
  • sloc: perl: 1,158; makefile: 45
file content (25 lines) | stat: -rwxr-xr-x 724 bytes parent folder | download
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
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 1.t'

#########################

use Test::More;
BEGIN { plan tests => 6 };
use JSON;
ok(1); # If we made it this far, we're ok.

#########################

# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.

my $parser = new JSON::Parser;
my $conv   = new JSON::Converter;

isa_ok($parser,'JSON::Parser');
isa_ok($conv,'JSON::Converter');

ok($parser->parse('{}'));
ok($parser->parse('[]'));

ok(jsonToObj(qq|//   \n ["a","b", /*  */ {},123, null, true, false ]|));