Examples of matchesNormalized()


Examples of games.stendhal.common.parser.Expression.matchesNormalized()

    assertFalse(expr1.matches(expr3));

    assertFalse(expr1.matchesNormalized(expr2));
    assertTrue(expr2.matchesNormalized(expr1));
    assertFalse(expr1.matchesNormalized(expr3));
    assertFalse(expr3.matchesNormalized(expr1));

    assertFalse(expr1.matchesNormalizedSimilar(expr2));
    assertTrue(expr2.matchesNormalizedSimilar(expr1));
    assertFalse(expr1.matchesNormalizedSimilar(expr3));
    assertFalse(expr3.matchesNormalizedSimilar(expr1));
View Full Code Here

Examples of games.stendhal.common.parser.Expression.matchesNormalized()

    final Sentence s2 = ConversationParser.parse("a spade");
    final Expression e2 = s2.getTriggerExpression();
    assertFalse(s1.hasError());
    assertFalse(s2.hasError());
    assertTrue(e1.matchesNormalized(e2));
    assertTrue(e2.matchesNormalized(e1));
  }

  /**
   * Tests for typeTriggerMatching.
   */
 
View Full Code Here

Examples of games.stendhal.common.parser.Expression.matchesNormalized()

    Expression e1 = m1.getTriggerExpression();

    Sentence s = ConversationParser.parse("do");
    assertFalse(s.hasError());
    Expression e2 = s.getTriggerExpression();
    assertTrue(e2.matchesNormalized(e1));
    assertEquals("do/VER", s.toString());

    // Using the typeMatching flag, it doesn't match any more...
    m1 = ConversationParser.parseAsMatcher("|TYPE|done/VER-PAS");
    assertFalse(m1.hasError());
View Full Code Here

Examples of games.stendhal.common.parser.Expression.matchesNormalized()

    assertFalse(m1.hasError());
    assertEquals("|TYPE|done/VER-PAS", m1.toString());
    e1 = m1.getTriggerExpression();

    assertFalse(e2.matches(e1));
    assertFalse(e2.matchesNormalized(e1));

    // ...but "done" matches the given type string pattern.
    s = ConversationParser.parse("done");
    assertFalse(s.hasError());
    assertEquals("do/VER-PAS", s.toString());
View Full Code Here

Examples of games.stendhal.common.parser.Expression.matchesNormalized()

    s = ConversationParser.parse("done");
    assertFalse(s.hasError());
    assertEquals("do/VER-PAS", s.toString());
    e2 = s.getTriggerExpression();
    assertTrue(e2.matches(e1));
    assertTrue(e2.matchesNormalized(e1));
  }

  /**
   * Tests for exactTriggerMatching.
   */
 
View Full Code Here

Examples of games.stendhal.common.parser.Expression.matchesNormalized()

    Expression e1 = m1.getTriggerExpression();

    Sentence s = ConversationParser.parse("do");
    assertFalse(s.hasError());
    Expression e2 = s.getTriggerExpression();
    assertTrue(e2.matchesNormalized(e1));
    assertEquals("do/VER", s.toString());

    // Using the exactMatching flag, it doesn't match any more...
    m1 = ConversationParser.parseAsMatcher("|EXACT|dONe");
    assertFalse(m1.hasError());
View Full Code Here

Examples of games.stendhal.common.parser.Expression.matchesNormalized()

    assertFalse(m1.hasError());
    assertEquals("|EXACT|dONe", m1.toString());
    e1 = m1.getTriggerExpression();

    assertFalse(e2.matches(e1));
    assertFalse(e2.matchesNormalized(e1));

    // ...but "done" matches the given exact matching pattern.
    s = ConversationParser.parse("dONe");
    assertFalse(s.hasError());
    assertEquals("do/VER-PAS", s.toString());
View Full Code Here

Examples of games.stendhal.common.parser.Expression.matchesNormalized()

    s = ConversationParser.parse("dONe");
    assertFalse(s.hasError());
    assertEquals("do/VER-PAS", s.toString());
    e2 = s.getTriggerExpression();
    assertTrue(e2.matches(e1));
    assertTrue(e2.matchesNormalized(e1));
  }

}
View Full Code Here

Examples of games.stendhal.common.parser.Sentence.matchesNormalized()

   */
  @Test
  public final void testNumberMatching() {
    Sentence s = ConversationParser.parse("zero");
    assertFalse(s.hasError());
    assertTrue(s.matchesNormalized("zero"));
    assertTrue(s.matchesNormalized("0"));

    s = ConversationParser.parse("no");
    assertFalse(s.hasError());
    assertTrue(s.matchesNormalized("no"));
View Full Code Here

Examples of games.stendhal.common.parser.Sentence.matchesNormalized()

  @Test
  public final void testNumberMatching() {
    Sentence s = ConversationParser.parse("zero");
    assertFalse(s.hasError());
    assertTrue(s.matchesNormalized("zero"));
    assertTrue(s.matchesNormalized("0"));

    s = ConversationParser.parse("no");
    assertFalse(s.hasError());
    assertTrue(s.matchesNormalized("no"));
    assertTrue(s.matchesNormalized("0"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.