From: handa Date: Wed, 22 Apr 2009 11:54:07 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6fe558ba3d59de23002825b25336b465b5b7ae49;p=m17n%2Fm17n-lib-cs.git *** empty log message *** --- diff --git a/MText.cs b/MText.cs index 6b69daf..4f916f5 100644 --- a/MText.cs +++ b/MText.cs @@ -467,7 +467,6 @@ namespace M17N.Core { MInterval root = (MInterval) p.Val; root.Pop (from, to); - DumpPropNested (); root.MergeAfterChange (from, to); } } @@ -1230,7 +1229,7 @@ namespace M17N.Core int to = tail.To; MInterval root; - for (root = head; root.To + head.RightLength < to; + for (root = head; root.To + root.RightLength < to; root = root.Parent); M17N.DebugPrint (" common root is "); root.DumpOne (false, true); diff --git a/textprop.cs b/textprop.cs index cf8b502..d036b83 100644 --- a/textprop.cs +++ b/textprop.cs @@ -90,7 +90,7 @@ public class Test else { for (int j = 0; j < nvals[i]; j++) - if (valtable[i, nvals[i] - 1 - j] != array[j].Val) + if (valtable[i, nvals[i] - 1 - j] != (MSymbol) array[j].Val) { Console.WriteLine ("valtable[{0}, {1}] is {2}, array[{1}] is {3}.\n", i, j, valtable[i, j], array[j]); @@ -150,12 +150,17 @@ public class Test public static void Main (string[] args) { Random r = new Random (int.Parse (args[0])); + int check = (args.Length > 1 ? int.Parse (args[1]) : -1); - for (int loop = 0; loop < 10000; loop++) + for (int loop = 0; loop < 100000; loop++) { - Console.WriteLine ("--- loop = {0} ---\n", loop); - mt.DumpPropNested (); - Dump (); + if (loop == check) + { + Console.WriteLine ("--- loop = {0} ---\n", loop); + mt.DumpPropNested (); + Dump (); + M17N.M17N.debug = true; + } int from = r.Next (LENGTH); int to = r.Next (LENGTH + 1);