equal
deleted
inserted
replaced
325 */ |
325 */ |
326 public void setOutputDirectoryCheck(DirectoryCheck c) { |
326 public void setOutputDirectoryCheck(DirectoryCheck c) { |
327 outputDirectoryCheck = c; |
327 outputDirectoryCheck = c; |
328 } |
328 } |
329 |
329 |
|
330 /** |
|
331 * The exit codes returned by the javadoc tool. |
|
332 * @see jdk.javadoc.internal.tool.Main.Result |
|
333 */ |
330 public enum Exit { |
334 public enum Exit { |
331 OK(0), |
335 OK(0), // Javadoc completed with no errors. |
332 FAILED(1); |
336 ERROR(1), // Completed but reported errors. |
|
337 CMDERR(2), // Bad command-line arguments |
|
338 SYSERR(3), // System error or resource exhaustion. |
|
339 ABNORMAL(4); // Javadoc terminated abnormally |
333 |
340 |
334 Exit(int code) { |
341 Exit(int code) { |
335 this.code = code; |
342 this.code = code; |
336 } |
343 } |
337 |
344 |
338 final int code; |
345 final int code; |
|
346 |
|
347 @Override |
|
348 public String toString() { |
|
349 return name() + '(' + code + ')'; |
|
350 } |
339 } |
351 } |
340 |
352 |
341 /** |
353 /** |
342 * Check the exit code of the most recent call of javadoc. |
354 * Check the exit code of the most recent call of javadoc. |
343 * |
355 * |
347 public void checkExit(Exit expected) { |
359 public void checkExit(Exit expected) { |
348 checking("check exit code"); |
360 checking("check exit code"); |
349 if (exitCode == expected.code) { |
361 if (exitCode == expected.code) { |
350 passed("return code " + exitCode); |
362 passed("return code " + exitCode); |
351 } else { |
363 } else { |
352 failed("return code " + exitCode +"; expected " + expected.code + " (" + expected + ")"); |
364 failed("return code " + exitCode +"; expected " + expected); |
353 } |
365 } |
354 } |
366 } |
355 |
367 |
356 /** |
368 /** |
357 * Check for content in (or not in) the generated output. |
369 * Check for content in (or not in) the generated output. |