| 1 | # Before `make install' is performed this script should be runnable with | ||
| 2 | # `make test'. After `make install' it should work as `perl 1.t' | ||
| 3 | |||
| 4 | ######################### | ||
| 5 | |||
| 6 | # change 'tests => 1' to 'tests => last_test_to_print'; | ||
| 7 | |||
| 8 | 1 | ▶ | use Test::More tests => 5; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | ▶ | BEGIN { use_ok('Lingua::Treebank::Const') }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | ######################### | ||
| 12 | |||
| 13 | # Insert your test code below, the Test::More module is use()ed here so read | ||
| 14 | # its man page ( perldoc Test::More ) for help writing this test script. | ||
| 15 | |||
| 16 | 1 | ▶ | use constant PACK => 'Lingua::Treebank::Const'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | 1 | can_ok(PACK, | |
| 19 | qw( insert_at detach_at ), | ||
| 20 | # qw ( flatten retract replace detach prepend append) , | ||
| 21 | ); | ||
| 22 | |||
| 23 | 1 | my $d = PACK->new(); | |
| 24 | |||
| 25 | 1 | ok( defined $d, "new() returned something" ); | |
| 26 | |||
| 27 | 1 | isa_ok($d, PACK, 'root node'); | |
| 28 | |||
| 29 | 1 | my $ex1 = <<EOEX1; | |
| 30 | (S | ||
| 31 | (NP | ||
| 32 | (NNP Joe) | ||
| 33 | ) | ||
| 34 | (VP | ||
| 35 | (VB likes) | ||
| 36 | (NP | ||
| 37 | (NNP Bach) | ||
| 38 | ) | ||
| 39 | ) | ||
| 40 | (. .) | ||
| 41 | ) | ||
| 42 | EOEX1 | ||
| 43 | |||
| 44 | 1 | $d->from_penn_string($ex1); | |
| 45 | |||
| 46 | #05 | ||
| 47 | 1 | ok(1, "passed from_penn_string"); | |