Java Code Examples for com.sun.tools.doclint.DocLint#run()
The following examples show how to use
com.sun.tools.doclint.DocLint#run() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RunTest.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
void testArgsNoFiles() throws BadArgs, IOException { System.err.println("test args, no files"); DocLint dl = new DocLint(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); dl.run(pw, "-Xmsgs"); pw.close(); String out = sw.toString(); String expect = "No files given"; if (!Objects.equals(out.trim(), expect)) { error("unexpected output"); System.err.println("EXPECT>>" + expect + "<<"); System.err.println("FOUND>>" + out + "<<"); } }
Example 2
Source File: RunTest.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
void testArgsNoFiles() throws BadArgs, IOException { System.err.println("test args, no files"); DocLint dl = new DocLint(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); dl.run(pw, "-Xmsgs"); pw.close(); String out = sw.toString(); String expect = "No files given"; if (!Objects.equals(out.trim(), expect)) { error("unexpected output"); System.err.println("EXPECT>>" + expect + "<<"); System.err.println("FOUND>>" + out + "<<"); } }
Example 3
Source File: RunTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
void testArgsNoFiles() throws BadArgs, IOException { System.err.println("test args, no files"); DocLint dl = new DocLint(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); dl.run(pw, "-Xmsgs"); pw.close(); String out = sw.toString(); String expect = "No files given"; if (!Objects.equals(out.trim(), expect)) { error("unexpected output"); System.err.println("EXPECT>>" + expect + "<<"); System.err.println("FOUND>>" + out + "<<"); } }
Example 4
Source File: PathsTest.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
String doclint(String... args) throws BadArgs, IOException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); DocLint dl = new DocLint(); dl.run(pw, args); pw.close(); String out = sw.toString(); if (!out.isEmpty()) System.err.println(out); return out; }
Example 5
Source File: RunTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
void testRun() throws BadArgs, IOException { System.err.println("test run(String[])"); DocLint dl = new DocLint(); String[] args = { "-help" }; ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); PrintStream prev = System.out; try { System.setOut(ps); dl.run(args); } finally { System.setOut(prev); } ps.close(); String stdout = baos.toString(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); dl.run(pw, args); pw.close(); String direct = sw.toString(); if (!stdout.equals(direct)) { error("unexpected output"); System.err.println("EXPECT>>" + direct + "<<"); System.err.println("FOUND>>" + stdout + "<<"); } }
Example 6
Source File: PathsTest.java From hottub with GNU General Public License v2.0 | 5 votes |
String doclint(String... args) throws BadArgs, IOException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); DocLint dl = new DocLint(); dl.run(pw, args); pw.close(); String out = sw.toString(); if (!out.isEmpty()) System.err.println(out); return out; }
Example 7
Source File: PathsTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
String doclint(String... args) throws BadArgs, IOException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); DocLint dl = new DocLint(); dl.run(pw, args); pw.close(); String out = sw.toString(); if (!out.isEmpty()) System.err.println(out); return out; }
Example 8
Source File: RunTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
void testRun() throws BadArgs, IOException { System.err.println("test run(String[])"); DocLint dl = new DocLint(); String[] args = { "-help" }; ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); PrintStream prev = System.out; try { System.setOut(ps); dl.run(args); } finally { System.setOut(prev); } ps.close(); String stdout = baos.toString(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); dl.run(pw, args); pw.close(); String direct = sw.toString(); if (!stdout.equals(direct)) { error("unexpected output"); System.err.println("EXPECT>>" + direct + "<<"); System.err.println("FOUND>>" + stdout + "<<"); } }
Example 9
Source File: PathsTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
String doclint(String... args) throws BadArgs, IOException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); DocLint dl = new DocLint(); dl.run(pw, args); pw.close(); String out = sw.toString(); if (!out.isEmpty()) System.err.println(out); return out; }
Example 10
Source File: RunTest.java From hottub with GNU General Public License v2.0 | 5 votes |
void testRun() throws BadArgs, IOException { System.err.println("test run(String[])"); DocLint dl = new DocLint(); String[] args = { "-help" }; ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); PrintStream prev = System.out; try { System.setOut(ps); dl.run(args); } finally { System.setOut(prev); } ps.close(); String stdout = baos.toString(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); dl.run(pw, args); pw.close(); String direct = sw.toString(); if (!stdout.equals(direct)) { error("unexpected output"); System.err.println("EXPECT>>" + direct + "<<"); System.err.println("FOUND>>" + stdout + "<<"); } }
Example 11
Source File: RunTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
void testRun() throws BadArgs, IOException { System.err.println("test run(String[])"); DocLint dl = new DocLint(); String[] args = { "-help" }; ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); PrintStream prev = System.out; try { System.setOut(ps); dl.run(args); } finally { System.setOut(prev); } ps.close(); String stdout = baos.toString(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); dl.run(pw, args); pw.close(); String direct = sw.toString(); if (!stdout.equals(direct)) { error("unexpected output"); System.err.println("EXPECT>>" + direct + "<<"); System.err.println("FOUND>>" + stdout + "<<"); } }
Example 12
Source File: PathsTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
String doclint(String... args) throws BadArgs, IOException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); DocLint dl = new DocLint(); dl.run(pw, args); pw.close(); String out = sw.toString(); if (!out.isEmpty()) System.err.println(out); return out; }
Example 13
Source File: RunTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
void testRun() throws BadArgs, IOException { System.err.println("test run(String[])"); DocLint dl = new DocLint(); String[] args = { "-help" }; ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); PrintStream prev = System.out; try { System.setOut(ps); dl.run(args); } finally { System.setOut(prev); } ps.close(); String stdout = baos.toString(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); dl.run(pw, args); pw.close(); String direct = sw.toString(); if (!stdout.equals(direct)) { error("unexpected output"); System.err.println("EXPECT>>" + direct + "<<"); System.err.println("FOUND>>" + stdout + "<<"); } }
Example 14
Source File: RunTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test void testMain(PrintWriter pw) throws BadArgs, IOException { String[] args = { "-Xmsgs", thisFile.getPath() }; DocLint d = new DocLint(); d.run(pw, args); }
Example 15
Source File: RunTest.java From hottub with GNU General Public License v2.0 | 4 votes |
@Test void testMain(PrintWriter pw) throws BadArgs, IOException { String[] args = { "-Xmsgs", thisFile.getPath() }; DocLint d = new DocLint(); d.run(pw, args); }
Example 16
Source File: RunTest.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
@Test void testMain(PrintWriter pw) throws BadArgs, IOException { String[] args = { "-Xmsgs", thisFile.getPath() }; DocLint d = new DocLint(); d.run(pw, args); }
Example 17
Source File: RunTest.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Test void testMain(PrintWriter pw) throws BadArgs, IOException { String[] args = { "-Xmsgs", thisFile.getPath() }; DocLint d = new DocLint(); d.run(pw, args); }
Example 18
Source File: RunTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Test void testMain(PrintWriter pw) throws BadArgs, IOException { String[] args = { "-Xmsgs", thisFile.getPath() }; DocLint d = new DocLint(); d.run(pw, args); }
Example 19
Source File: RunTest.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test void testMain(PrintWriter pw) throws BadArgs, IOException { String[] args = { "-Xmsgs", thisFile.getPath() }; DocLint d = new DocLint(); d.run(pw, args); }
Example 20
Source File: RunTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test void testMain(PrintWriter pw) throws BadArgs, IOException { String[] args = { "-Xmsgs", thisFile.getPath() }; DocLint d = new DocLint(); d.run(pw, args); }