mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-18 17:34:43 -04:00
added a test case
This commit is contained in:
parent
63cc657c3b
commit
090ea3de46
@ -11,14 +11,18 @@ import junit.framework.TestCase;
|
||||
|
||||
public class ParserTest extends TestCase {
|
||||
|
||||
|
||||
public void testPlainString() throws ParseException {
|
||||
Text t = new Parser("Q").parse();
|
||||
assertTrue(t instanceof Simple);
|
||||
assertEquals("Q", ((Simple) t).getText());
|
||||
|
||||
t = new Parser("In").parse();
|
||||
assertTrue(t instanceof Simple);
|
||||
assertEquals("In", ((Simple) t).getText());
|
||||
|
||||
t = new Parser("\\I^n_0").parse();
|
||||
assertTrue(t instanceof Simple);
|
||||
assertEquals("I^n_0", ((Simple) t).getText());
|
||||
}
|
||||
|
||||
public void testSimple() throws ParseException {
|
||||
@ -39,8 +43,6 @@ public class ParserTest extends TestCase {
|
||||
|
||||
assertEquals("Decorate{≥1, MATH}", new Parser("$≥1$").parse().toString());
|
||||
assertEquals("Decorate{MR, OVERLINE}", new Parser("~MR").parse().toString());
|
||||
|
||||
assertEquals("I^n_0", new Parser("\\I^n_0").parse().toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user