using System;
using System.Collections.Generic;
+using M17N;
using M17N.Core;
public class Test
{
String str = "0123456789";
MText mt = new MText (str);
- MSymbol sym = new MSymbol ("sym");
- MTextProperty prop1 = new MTextProperty (sym, "test1");
- MTextProperty prop2 = new MTextProperty (sym, "test2");
+ MSymbol sym = new MSymbol ("key");
+ MTextProperty prop1 = new MTextProperty (sym, "val0");
+ MTextProperty prop2 = new MTextProperty (sym, "val1");
+ M17N.M17N.debug = true;
+
+ mt.PushProp (1, 3, prop1);
+ mt.PushProp (0, 1, prop1);
+ mt.PushProp (0, 1, prop2);
+ mt.PushProp (3, 5, prop1);
+ mt.PushProp (3, 5, prop2);
+ mt.PushProp (7, 8, prop2);
+ mt.PushProp (5, 7, prop2);
+ mt.PushProp (5, 7, prop1);
+ mt.PushProp (8, 10, prop1);
+ mt.PopProp (8, 9, sym);
+ mt.DumpPropNested ();
+ mt.PopProp (5, 9, sym);
+ mt.DumpPropNested ();
+
+ mt = new MText (str);
mt.PushProp (2, 5, prop1);
mt.DumpProp ();
mt.PushProp (3, 6, prop2);
mt.DumpProp ();
mt.Del (4, 9);
mt.DumpProp ();
- mt.Ins (4, new MText ("45678"));
+ mt.Ins (5, new MText ("45678"));
+ mt.DumpProp ();
+ mt.Dup ().DumpProp ();
+ mt.PopProp (0, 3, sym);
+ mt.DumpProp ();
+ mt.PopProp (2, 8, sym);
mt.DumpProp ();
}
}