Пример #1
0
  @Test
  public void parse_handlesStringsThatExceedBufferSize() throws IOException {
    String input = "[ \"lorem ipsum dolor sit amet\" ]";

    JsonValue value = new JsonParser(new StringReader(input), 3).parse();

    assertEquals("[\"lorem ipsum dolor sit amet\"]", value.toString());
  }
Пример #2
0
  @Test
  public void parse_handlesNumbersThatExceedBufferSize() throws IOException {
    String input = "[ 3.141592653589 ]";

    JsonValue value = new JsonParser(new StringReader(input), 3).parse();

    assertEquals("[3.141592653589]", value.toString());
  }
Пример #3
0
  @Test
  public void parse_handlesInputsThatExceedBufferSize() throws IOException {
    String input = "[ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 ]";

    JsonValue value = new JsonParser(new StringReader(input), 3).parse();

    assertEquals("[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]", value.toString());
  }