Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }