Revision 88, 1.4 kB
(checked in by naoya_t, 16 years ago)
|
cabocha-gauche: added signature
|
Rev | Line | |
---|
[86] | 1 | ;;; |
---|
| 2 | ;;; Test cabocha |
---|
| 3 | ;;; |
---|
[88] | 4 | ;;; 2009.3.15 by naoya_t |
---|
| 5 | ;;; |
---|
[86] | 6 | |
---|
| 7 | (use gauche.test) |
---|
| 8 | |
---|
| 9 | (test-start "cabocha") |
---|
| 10 | (use cabocha) |
---|
| 11 | (test-module 'cabocha) |
---|
| 12 | |
---|
| 13 | (test-section "cabocha-new") |
---|
| 14 | (let1 c (cabocha-new) |
---|
| 15 | (test* "cabocha?" #t (cabocha? c)) |
---|
| 16 | |
---|
| 17 | (test-section "cabocha-destroy") |
---|
| 18 | (test* "cabocha-destroyed?" #f (cabocha-destroyed? c)) |
---|
| 19 | (cabocha-destroy c) |
---|
| 20 | (test* "cabocha?" #t (cabocha? c)) |
---|
| 21 | (test* "cabocha-destroyed?" #t (cabocha-destroyed? c)) |
---|
| 22 | ) |
---|
| 23 | |
---|
| 24 | (test-section "cabocha-new2") |
---|
| 25 | (let1 c (cabocha-new2 "") |
---|
| 26 | (test* "cabocha?" #t (cabocha? c)) |
---|
| 27 | (test* "cabocha-destroyed?" #f (cabocha-destroyed? c)) |
---|
| 28 | (cabocha-destroy c) |
---|
| 29 | (test* "cabocha?" #t (cabocha? c)) |
---|
| 30 | (test* "cabocha-destroyed?" #t (cabocha-destroyed? c)) |
---|
| 31 | ) |
---|
| 32 | |
---|
| 33 | (let ([c (cabocha-new)] |
---|
| 34 | [text "太郎は次郎が持っている本を花子に渡した。"]) |
---|
| 35 | (test-section "cabocha-sparse-tostr") |
---|
| 36 | (test* "cabocha-sparse-tostr" |
---|
| 37 | "<PERSON>太郎</PERSON>は---------D\n <PERSON>次郎</PERSON>が-D |\n 持っている-D |\n 本を---D\n 花子に-D\n 渡した。\nEOS\n" |
---|
| 38 | (cabocha-sparse-tostr c text)) |
---|
| 39 | |
---|
| 40 | (test-section "cabocha-sparse-tostr2") |
---|
| 41 | (test* "cabocha-sparse-tostr2" |
---|
| 42 | "<PERSON>太郎</PERSON>は\nEOS\n" |
---|
| 43 | (cabocha-sparse-tostr2 c text 9)) |
---|
| 44 | |
---|
| 45 | (test-section "cabocha-strerror") |
---|
| 46 | (test* "cabocha-strerror" "" (cabocha-strerror c)) |
---|
| 47 | |
---|
| 48 | (cabocha-destroy c)) |
---|
| 49 | |
---|
| 50 | ;; epilogue |
---|
| 51 | (test-end) |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | |
---|