@Test public void parseEmptyStream() throws Exception { ByteArrayInputStream is = new ByteArrayInputStream(new byte[0]); cppAstParser.readStream(store, is); verifyZeroInteractions(store); }
public void readStream(final Store store, final InputStream stream) { BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); try { while(reader.ready()) { parseLine(store, reader.readLine()); } } catch (IOException e) { LOGGER.warn("Exception while reading AST file, could not read all lines; reason: "+e); } }
CppAstParser { public void readStream(final Store store, final InputStream stream) { BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); try { while(reader.ready()) { parseLine(store, reader.readLine()); } } catch (IOException e) { LOGGER.warn("Exception while reading AST file, could not read all lines; reason: "+e); } } }
CppAstParser { public void readStream(final Store store, final InputStream stream) { BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); try { while(reader.ready()) { parseLine(store, reader.readLine()); } } catch (IOException e) { LOGGER.warn("Exception while reading AST file, could not read all lines; reason: "+e); } }  }
CppAstParser { public void readStream(final Store store, final InputStream stream) { BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); try { while(reader.ready()) { parseLine(store, reader.readLine()); } } catch (IOException e) { LOGGER.warn("Exception while reading AST file, could not read all lines; reason: "+e); } }  void readStream(final Store store, final InputStream stream); }
CppAstParser { public void readStream(final Store store, final InputStream stream) { BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); try { while(reader.ready()) { parseLine(store, reader.readLine()); } } catch (IOException e) { LOGGER.warn("Exception while reading AST file, could not read all lines; reason: "+e); } }  void readStream(final Store store, final InputStream stream);  }