Package com.google.jstestdriver.token

Examples of com.google.jstestdriver.token.BufferedTokenStream.mark()


 
  public void testReadMarkReset() throws Exception {
    BufferedTokenStream stream = new BufferedTokenStream(tokens.iterator());
    assertEquals(tokens.get(0), stream.read());
    assertEquals(tokens.get(1), stream.read());
    stream.mark();
    assertEquals(tokens.get(2), stream.read());
    assertEquals(tokens.get(3), stream.read());
    stream.reset();
    assertEquals(tokens.get(2), stream.read());
  }
View Full Code Here


  public void testReadAvailable() throws Exception {
    BufferedTokenStream stream = new BufferedTokenStream(tokens.iterator());
    assertEquals(tokens.get(0), stream.read());
    assertEquals(tokens.get(1), stream.read());
    assertTrue(stream.available());
    stream.mark();
    assertTrue(stream.available());
    assertEquals(tokens.get(2), stream.read());
    assertEquals(tokens.get(3), stream.read());
    assertFalse(stream.available());
    assertNull(stream.read());
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.