File: candidate.vala

package info (click to toggle)
libkkc 0.3.5-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,904 kB
  • sloc: ansic: 7,099; makefile: 917; cpp: 435; python: 231; sh: 124
file content (39 lines) | stat: -rw-r--r-- 956 bytes parent folder | download | duplicates (6)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class CandidateTests : Kkc.TestCase {
    public CandidateTests () {
        base ("Candidate");

        add_test ("properties", this.test_properties);
    }

    void test_properties () {
        var candidate = new Kkc.Candidate ("foo", false, "FOO", null, null);

        string midasi;
        bool okuri;
        string text;
        string annotation;
        string output;

        candidate.get ("midasi", out midasi,
                       "okuri", out okuri,
                       "text", out text,
                       "annotation", out annotation,
                       "output", out output);

        candidate.set ("text", text,
                       "annotation", annotation,
                       "output", output);
    }
}

int main (string[] args) {
    Test.init (ref args);
    Kkc.init ();

    TestSuite root = TestSuite.get_root ();
    root.add_suite (new CandidateTests ().get_suite ());

    Test.run ();

    return 0;
}