Package com.google.jstestdriver.token

Examples of com.google.jstestdriver.token.ConcreteToken


    }
    assertFalse(lexer.available());
  }

  public void testCreateTokensWithOtherTokens() throws Exception {
    Token otherOne = new ConcreteToken("<div></div>".toCharArray());
    BufferedInputStream stream =
      new BufferedInputStream(
        new ByteArrayInputStream((tokens[0].toString()
            + otherOne.toString() + tokens[1].toString()).getBytes()));

    BufferedTokenStream lexer = new HtmlDocLexer().createStream(stream);
    List<Token> expected =
        Lists.newArrayList(tokens[0], otherOne, tokens[1]);
    for (Token token : expected) {
View Full Code Here


      assertEquals(token, lexer.read());
    }
  }

  public void testCreateTokensWithCommentTokens() throws Exception {
    Token otherOne = new ConcreteToken("/** foo".toCharArray());
    BufferedInputStream stream =
      new BufferedInputStream(
        new ByteArrayInputStream((tokens[2].toString()
            + otherOne.toString() + tokens[1].toString() + tokens[3].toString()).getBytes()));
   
    BufferedTokenStream lexer = new HtmlDocLexer().createStream(stream);
    List<Token> expected =
      Lists.newArrayList(tokens[2], otherOne, tokens[1], tokens[3]);
    for (Token token : expected) {
View Full Code Here

  List<Token> tokens;
 
  @Override
  protected void setUp() throws Exception {
    tokens = Lists.<Token>newArrayList(new ConcreteToken("1".toCharArray()),
                                       new ConcreteToken("2".toCharArray()),
                                       new ConcreteToken("3".toCharArray()),
                                       new ConcreteToken("4".toCharArray()));
  }
View Full Code Here

TOP

Related Classes of com.google.jstestdriver.token.ConcreteToken

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.