Package statechum.Helper

Examples of statechum.Helper.whatToRun


 
  /** Tests parser of expressions. */
  @Test
  public final void testExpr12b()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      ba.interpretString("()");
    }},IllegalArgumentException.class,"unexpected end");

    checkForCorrectException(new whatToRun() { public @Override void run() {
      ba.computeAlphabet("()");
    }},IllegalArgumentException.class,"unexpected end");
  }
View Full Code Here


    dumper.topElement.appendChild(augmentElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false);
    loader.config = Configuration.getDefaultConfiguration();
    checkForCorrectException(new whatToRun() { public void run() {
      loader.readAugmentPTA(loader.expectNextElement(ELEM_KINDS.ELEM_AUGMENTPTA.name()));
    }},IllegalArgumentException.class,"missing accept");
  }
View Full Code Here

    dumper.topElement.appendChild(augmentElement);dumper.close();
    xmlData = output.toString();

    final LearnerSimulator loader = new LearnerSimulator(new ByteArrayInputStream(xmlData.getBytes()),false);
    loader.config = Configuration.getDefaultConfiguration();
    checkForCorrectException(new whatToRun() { public void run() {
      loader.readAugmentPTA(loader.expectNextElement(ELEM_KINDS.ELEM_AUGMENTPTA.name()));
    }},IllegalArgumentException.class,"missing kind");
  }
View Full Code Here

 
  /** Tests parser of expressions. */
  @Test
  public final void testExpr12c()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      ba.interpretString("b && (!())");
    }},IllegalArgumentException.class,"unexpected end");
   
    checkForCorrectException(new whatToRun() { public @Override void run() {
      ba.computeAlphabet("b && (!())");
    }},IllegalArgumentException.class,"unexpected end");
  }
View Full Code Here

 
  /** Tests parser of expressions. */
  @Test
  public final void testExpr20()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      ba.interpretString("a | b");
    }},IllegalArgumentException.class,"failed to lex ");
   
    checkForCorrectException(new whatToRun() { public @Override void run() {
      ba.computeAlphabet("a | b");
    }},IllegalArgumentException.class,"failed to lex ");
  }
View Full Code Here

 
  /** Tests parser of expressions. */
  @Test
  public final void testExpr21()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      ba.interpretString("a || || b");
    }},IllegalArgumentException.class,"expected word ");
   
    checkOutcome(new String[]{"a","b"},ba.computeAlphabet("a || || b"));
  }
View Full Code Here

    catch(ParserConfigurationException ex)
    {
      IOException parserEx = new IOException("configuration exception: "+ex);parserEx.initCause(ex);throw parserEx;
    }
    final Document document = doc;
    checkForCorrectException(new whatToRun() { public void run() {
      Transform322.loadGraph(document.createElement("junk"));
    }},IllegalArgumentException.class,"element does not start with graphml");
  }
View Full Code Here

 
  /** Tests parser of expressions. */
  @Test
  public final void testExpr22()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      ba.interpretString("a || && b");
    }},IllegalArgumentException.class,"expected word ");

    checkOutcome(new String[]{"a","b"},ba.computeAlphabet("a || && b"));
  }
View Full Code Here

 
  /** Tests parser of expressions. */
  @Test
  public final void testExpr23a()
  {
    checkForCorrectException(new whatToRun() { public @Override void run() {
      ba.interpretString("a || b c ");
    }},IllegalArgumentException.class,"expected binary operation ");

    checkOutcome(new String[]{"a","b","c"},ba.computeAlphabet("a || b c "));
  }
View Full Code Here

    catch(ParserConfigurationException ex)
    {
      IOException parserEx = new IOException("configuration exception: "+ex);parserEx.initCause(ex);throw parserEx;
    }
    final org.w3c.dom.Element elem = fsm.transform322.createGraphMLNode(doc);elem.removeChild(elem.getFirstChild());
    checkForCorrectException(new whatToRun() { public void run() {
      Transform322.loadGraph(elem);
    }},IllegalArgumentException.class,"absent graph element");
  }
View Full Code Here

TOP

Related Classes of statechum.Helper.whatToRun

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.