/** * Adds features to the feature-set of this Preprocessor. */ public void addFeatures(Feature... f) { addFeatures(Arrays.asList(f)); }
public static String testCppReader(@Nonnull String in, Feature... f) throws Exception { System.out.println("Testing " + in); StringReader r = new StringReader(in); CppReader p = new CppReader(r); p.getPreprocessor().setSystemIncludePath( Collections.singletonList("src/test/resources") ); p.getPreprocessor().addFeatures(f); BufferedReader b = new BufferedReader(p); StringBuilder out = new StringBuilder(); String line; while ((line = b.readLine()) != null) { System.out.println(" >> " + line); out.append(line).append("\n"); } return out.toString(); }