Exemple #1
0
  public void testInvalid() {
    Enumeration e = invalidRsls.keys();
    String key;
    String rsl;
    while (e.hasMoreElements()) {
      key = (String) e.nextElement();
      rsl = invalidRsls.getProperty(key);

      System.out.println("Parsing invalid rsl " + key + ": " + rsl);
      try {
        RslNode tree = RSLParser.parse(rsl);
        fail("Failed to catch parse error of " + rsl);
      } catch (Exception ex) {
      }
    }
  }
Exemple #2
0
  public void testValid() {
    Enumeration e = validRsls.keys();
    String key;
    String rsl;
    while (e.hasMoreElements()) {
      key = (String) e.nextElement();
      rsl = validRsls.getProperty(key);

      System.out.println("Parsing valid rsl " + key + ": " + rsl);
      try {
        RSLParser.parse(rsl);
      } catch (Exception ex) {
        ex.printStackTrace();
        fail("Failed to parse!!!");
      }
    }
  }