root/lang/gauche/cabocha-gauche-0.60pre4/test.scm @ 86

Revision 86, 1.4 kB (checked in by naoya_t, 16 years ago)

cabocha-gauche

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