Package games.stendhal.common.parser

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


    m1 = ConversationParser.parseAsMatcher("|TYPE|done/VER-PAS");
    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());
View Full Code Here


    // ...but "done" matches the given type string pattern.
    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

    m1 = ConversationParser.parseAsMatcher("|EXACT|dONe");
    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());
View Full Code Here

    // ...but "done" matches the given exact matching pattern.
    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

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.