MCPcopy Create free account
hub / github.com/apache/solr / testArray

Method testArray

solr/solrj/src/test/org/noggit/TestJSONParser.java:690–726  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

688 }
689
690 @Test
691 public void testArray() throws IOException {
692 parse("[]", "[]");
693 parse("[ ]", "[]");
694 parse(" \r\n\t[\r\t\n ]\r\n\t ", "[]");
695
696 parse("[0]", "[l]");
697 parse("['0']", "[s]");
698 parse("[0,'0',0.1]", "[lsn]");
699
700 parse("[[[[[]]]]]", "[[[[[]]]]]");
701 parse("[[[[[0]]]]]", "[[[[[l]]]]]");
702
703 err("]");
704 err("[");
705 err("[[]");
706 err("[]]");
707 err("[}");
708 err("{]");
709 err("['a':'b']");
710
711 flags = JSONParser.FLAGS_STRICT;
712 err("[,]"); // test that extra commas fail
713 err("[[],]");
714 err("['a',]");
715 err("['a',]");
716 flags = JSONParser.FLAGS_DEFAULT;
717
718 parse("[,]", "[]"); // test extra commas
719 parse("[,,]", "[]");
720 parse("[,,,]", "[]");
721 parse("[[],]", "[[]]");
722 parse("[[,],]", "[[]]");
723 parse("[[,,],,]", "[[]]");
724 parse("[,[,,],,]", "[[]]");
725 parse("[,5,[,,5],,]", "[l[l]]");
726 }
727
728 @Test
729 public void testObject() throws IOException {

Callers

nothing calls this directly

Calls 2

parseMethod · 0.95
errMethod · 0.95

Tested by

no test coverage detected