4ded12d2ff97d88823d5f2f392e736e9c156f0e5
[m17n/m17n-lib-cs.git] / M17N.cs
1 using System;
2 using M17N.Core;
3
4 public class Test
5 {
6   static void symbol_test ()
7   {
8     MSymbol sym1, sym2;
9
10     Console.WriteLine ("### Symbol test ###");
11     sym1 = new MSymbol ("abc");
12     Console.WriteLine (sym1.ToString ());
13     sym2 = new MSymbol ("abc");
14     Console.WriteLine (sym2.ToString ());
15     Console.WriteLine (sym1 == sym2 ? "OK" : "NO");
16     sym1.put (MSymbol.nil, MSymbol.t);
17
18     MPlist p = new MPlist ();
19
20     p.put (MSymbol.t, sym1);
21     p.push (MSymbol.t, sym2);
22
23     MPlist pp = new MPlist ();
24     pp.put (MSymbol.t, p);
25     Console.WriteLine (pp.ToString ());
26     Console.WriteLine (p.get (MSymbol.t));
27   }
28
29   static void mtext_test ()
30   {
31     MText mt;
32
33     Console.WriteLine ("### MText test ###");
34     mt = new MText ("abc");
35     Console.WriteLine (mt);
36     Console.WriteLine (mt + new MText ("def"));
37     Console.WriteLine (mt);    
38   }
39
40   static void mtext_property_test ()
41   {
42     Console.WriteLine ("### MTextProperty test ###");
43   }
44
45   public static void Main()
46   {
47     symbol_test ();
48     mtext_test ();
49     mtext_property_test ();
50   }
51
52 }