Assert.assertTrue(literal.compile().match(literalValue));
literal.boost(5);
Assert.assertTrue(literal.compile().match(literalValue));
Parser parser = literal.then(literal).compile();
Assert.assertTrue(parser.match(literalValue + literalValue));
Assert.assertFalse(parser.match(""));
Assert.assertFalse(parser.match(literalValue));
Assert.assertFalse(parser.match(literalValue + literalValue + literalValue));
parser = literal.or("").compile();
Assert.assertTrue(parser.match(literalValue));
Assert.assertTrue(parser.match(""));
Assert.assertFalse(parser.match(literalValue + literalValue));
parser = literal.atLeast(3).compile();
Assert.assertTrue(parser.match(literalValue + literalValue + literalValue));
Assert.assertTrue(parser.match(literalValue + literalValue + literalValue + literalValue));
Assert.assertTrue(parser.match(literalValue + literalValue + literalValue + literalValue + literalValue + literalValue));
Assert.assertFalse(parser.match(""));
Assert.assertFalse(parser.match(literalValue));
Assert.assertFalse(parser.match(literalValue + literalValue));
parser = literal.mark("value").compile();
Assert.assertTrue(parser.parseBest(literalValue).get("value").contains(literalValue));
//self test
parser = self.compile();
Assert.assertTrue(parser.match("a"));
Assert.assertTrue(parser.match("(a)"));
Assert.assertTrue(parser.match("((a))"));
Assert.assertFalse(parser.match(""));
Assert.assertFalse(parser.match("(a))"));
Assert.assertFalse(parser.match("((a)"));
//Best Parse Test
System.out.println(parser.bestMatch("(a))"));
Assert.assertTrue(parser.bestMatch("(a))").equals("(a)"));
parser = Regex.literal("andrea").compile();
Assert.assertTrue(parser.bestMatch("andrew").equals("andre"));
// Boost Test
Regex anyStar = Regex.any().star().mark("any");
Regex aStar = Regex.literal("a").star().boost(1).mark("a");
parser = anyStar.then(aStar).compile();
Assert.assertTrue(parser.parseBest("aaa").get("a").contains("aaa"));
}