Lines Matching refs:reader

70         JsonReader reader;  in checkExpectationFile()  local
72 reader = new JsonReader(new FileReader(arg)); in checkExpectationFile()
77 reader.setLenient(true); in checkExpectationFile()
79 reader.beginArray(); in checkExpectationFile()
80 while (reader.hasNext()) { in checkExpectationFile()
81 readExpectation(reader); in checkExpectationFile()
83 reader.endArray(); in checkExpectationFile()
85 error("Malformed json: " + reader); in checkExpectationFile()
89 private static void readExpectation(JsonReader reader) throws IOException { in readExpectation() argument
95 reader.beginObject(); in readExpectation()
96 while (reader.hasNext()) { in readExpectation()
97 String name = reader.nextName(); in readExpectation()
100 String result = reader.nextString(); in readExpectation()
104 ". " + reader); in readExpectation()
111 ".*" + Pattern.quote(reader.nextString()) + ".*", FLAGS); in readExpectation()
113 error("Malformed 'substring' value: " + reader); in readExpectation()
118 Pattern.compile(reader.nextString(), FLAGS); in readExpectation()
120 error("Malformed 'pattern' value: " + reader); in readExpectation()
125 names.add(reader.nextString()); in readExpectation()
128 reader.nextString(); in readExpectation()
132 names.add(reader.nextString()); in readExpectation()
135 readStrings(reader, names); in readExpectation()
138 readStrings(reader, tags); in readExpectation()
141 reader.nextLong(); in readExpectation()
144 readModes(reader); in readExpectation()
147 readModesAndVariants(reader); in readExpectation()
151 reader.skipValue(); in readExpectation()
155 reader.endObject(); in readExpectation()
158 error("Missing 'name' or 'failure' key in " + reader); in readExpectation()
161 error("Missing 'result' key in " + reader); in readExpectation()
164 error("Missing 'description' key in " + reader); in readExpectation()
168 private static void readStrings(JsonReader reader, Set<String> output) throws IOException { in readStrings() argument
169 reader.beginArray(); in readStrings()
170 while (reader.hasNext()) { in readStrings()
171 output.add(reader.nextString()); in readStrings()
173 reader.endArray(); in readStrings()
176 private static void readModes(JsonReader reader) throws IOException { in readModes() argument
177 reader.beginArray(); in readModes()
178 while (reader.hasNext()) { in readModes()
179 reader.nextString(); in readModes()
181 reader.endArray(); in readModes()
187 private static void readModesAndVariants(JsonReader reader) throws IOException { in readModesAndVariants() argument
188 reader.beginArray(); in readModesAndVariants()
189 while (reader.hasNext()) { in readModesAndVariants()
190 reader.beginArray(); in readModesAndVariants()
191 reader.nextString(); in readModesAndVariants()
192 reader.nextString(); in readModesAndVariants()
193 reader.endArray(); in readModesAndVariants()
195 reader.endArray(); in readModesAndVariants()