Package games.stendhal.common.parser

Examples of games.stendhal.common.parser.CaseInsensitiveExprMatcher


    if (sel.equals("joker matching")) {
      selectedMatcher = new JokerExprMatcher();
    } else if (sel.equals("exact matching")) {
      selectedMatcher = new ExactExprMatcher();
    } else if (sel.equals("case insensitive")) {
      selectedMatcher = new CaseInsensitiveExprMatcher();
    } else if (sel.equals("similarity matching")) {
      selectedMatcher = new SimilarExprMatcher();
    } else if (sel.equals("controlled matching")) {
      selectedMatcher = null;
    } else if (sel.equals("merged expressions")) {
View Full Code Here


*/
public class CaseInsensitiveExprMatcherTest {

  @Test
  public final void testCaseInsensitiveMatching() {
    final ExpressionMatcher matcher = new CaseInsensitiveExprMatcher();

    final Expression e1 = new Expression("aBc", "VER");
    final Expression e2 = new Expression("abc", "VER");
    final Expression e3 = new Expression("ab", "VER");
    final Expression e4 = new Expression("abc", "SUB");
    final Expression e5 = new Expression("X", "SUB");

    assertTrue(matcher.match(e1, e2));
    assertFalse(matcher.match(e1, e3));
    assertTrue(matcher.match(e1, e4));
    assertFalse(matcher.match(e1, e5));
    assertFalse(matcher.match(e4, e5));
  }
View Full Code Here

TOP

Related Classes of games.stendhal.common.parser.CaseInsensitiveExprMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.