public void TestMots() { TestTheText ttt = new TestTheText(txt1); ttt.MarkWords(conf); ttt.AssertColor(0, TestTheText.black); ttt.AssertColor(1, TestTheText.black); ttt.AssertNotColor(3, TestTheText.black); int index = ttt.S.IndexOf("Sifflait"); ttt.AssertNotColor(index, 8, TestTheText.black); index = ttt.S.IndexOf("On n'avait pas de pain"); ttt.AssertColor(index, 22, TestTheText.black); index = ttt.S.IndexOf("on était seul"); ttt.AssertColor(index, 2, TestTheText.black); ttt.AssertNotColor(index + 3, 5, TestTheText.black); index = ttt.S.IndexOf("d'ombres"); ttt.AssertColor(index, 8, TestTheText.black); }
public void TestPhonemes() { TestTheText ttt = new TestTheText(txt1); ttt.ColorizePhons(conf, PhonConfType.phonemes); ttt.AssertColor(0, TestTheText.black); ttt.AssertColor(1, TestTheText.black); ttt.AssertNotColor(3, TestTheText.black); int index = ttt.S.IndexOf("Sifflait"); ttt.AssertNotColor(index, 8, TestTheText.black); index = ttt.S.IndexOf("On n'avait pas de pain"); ttt.AssertColor(index, 22, TestTheText.black); index = ttt.S.IndexOf("on était seul"); ttt.AssertColor(index, 2, TestTheText.black); ttt.AssertNotColor(index + 3, 5, TestTheText.black); index = ttt.S.IndexOf("d'ombres"); ttt.AssertColor(index, 8, TestTheText.black); }
public void TestMethod1() { TestTheText ttt = new TestTheText(txt1); Config conf = new Config(); ttt.ColorizePhons(conf, PhonConfType.phonemes); int index = ttt.S.IndexOf("1867"); ttt.AssertColor(index, 4, TestTheText.black); index = ttt.S.IndexOf("Rênal"); ttt.AssertColor(index + 5, TestTheText.black); index = ttt.S.IndexOf("reme35rciant"); ttt.AssertColor(index + 4, 2, TestTheText.black); index = ttt.S.IndexOf("23femme"); ttt.AssertColor(index, 2, TestTheText.black); index = ttt.S.IndexOf("p45ar"); ttt.AssertColor(index + 1, 2, TestTheText.black); index = ttt.S.IndexOf("déc0123456789idé"); ttt.AssertColor(index + 3, 10, TestTheText.black); }