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

Method parse

solr/solrj/src/test/org/noggit/TestJSONParser.java:114–136  ·  view source on GitHub ↗
(JSONParser p, String input, String expected)

Source from the content-addressed store, hash-verified

112
113 // match parser states with the expected states
114 public static void parse(JSONParser p, String input, String expected) throws IOException {
115 expected += "e";
116 for (int i = 0; i < expected.length(); i++) {
117 int ev = p.nextEvent();
118 int expect = events[expected.charAt(i)];
119 if (ev != expect) {
120 fail(
121 "Expected "
122 + expect
123 + ", got "
124 + ev
125 + "\n\tINPUT="
126 + input
127 + "\n\tEXPECTED="
128 + expected
129 + "\n\tAT="
130 + i
131 + " ("
132 + expected.charAt(i)
133 + ")");
134 }
135 }
136 }
137
138 public static void parse(String input, String expected) throws IOException {
139 String in = input;

Callers 15

testNullMethod · 0.95
testBoolMethod · 0.95
testStringMethod · 0.95
testNumbersMethod · 0.95
testArrayMethod · 0.95
testObjectMethod · 0.95
testBareStringMethod · 0.95
testCommentsMethod · 0.95
testTopLevelValuesMethod · 0.95
testBuildQuorumForZkMethod · 0.45

Calls 15

getParserMethod · 0.95
testCorruptionMethod · 0.95
oMethod · 0.95
nMethod · 0.95
bnMethod · 0.95
nextBooleanMethod · 0.80
randomMethod · 0.80
getNumberCharsMethod · 0.80
lengthMethod · 0.65
toStringMethod · 0.65
nextEventMethod · 0.45
charAtMethod · 0.45

Tested by

no test coverage detected