text highlighter test

This commit is contained in:
serso 2011-11-12 16:18:10 +04:00
parent fa86989f18
commit 8e0f8884cc
2 changed files with 6 additions and 0 deletions

View File

@ -53,5 +53,9 @@ public class TextHighlighterTest {
" ln(8)*log(8) => ln(8)*og(8) FIXED\n" + " ln(8)*log(8) => ln(8)*og(8) FIXED\n" +
" copy/paste ln(8)*log(8)\n" + " copy/paste ln(8)*log(8)\n" +
" 6!^2 ERROR"); " 6!^2 ERROR");
Assert.assertEquals("<font color=\"#000000\"><i>sin</i>(</font><font color=\"#ffff9a\">2</font><font color=\"#000000\">)</font>", textHighlighter.process("sin(2)").toString());
Assert.assertEquals("<font color=\"#000000\"><i>atanh</i>(</font><font color=\"#ffff9a\">2</font><font color=\"#000000\">)</font>", textHighlighter.process("atanh(2)").toString());
} }
} }

View File

@ -41,6 +41,8 @@ public class MathTypeTest {
Assert.fail(); Assert.fail();
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
} }
Assert.assertEquals("atanh", MathType.getType("atanh", 0).getMatch());
} }
/* @Test /* @Test