Tester.java revision 139
3206N/A * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. 3084N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3084N/A * This code is free software; you can redistribute it and/or modify it 3084N/A * under the terms of the GNU General Public License version 2 only, as 3084N/A * published by the Free Software Foundation. 3084N/A * This code is distributed in the hope that it will be useful, but WITHOUT 3084N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 3084N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 3084N/A * version 2 for more details (a copy is included in the LICENSE file that 3084N/A * You should have received a copy of the GNU General Public License version 3084N/A * 2 along with this work; if not, write to the Free Software Foundation, 3084N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 3084N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 3084N/A * CA 95054 USA or visit www.sun.com if you need additional information or 3084N/A * A utility used to invoke and test the javadoc tool. 3924N/A// private final File bootstrapMarkerFile = new File("bootstrap"); 3084N/A // True if we should "set expectations" by writing the expected output file 3084N/A // rather than reading it and comparing. 3084N/A// private final boolean bootstrap = bootstrapMarkerFile.isFile(); * Individual tests can extend this to create generics-aware doclets. throw new Error(
"Javadoc errors encountered.");
* Compare output of test run to expected output. * Throw an Error if they don't match. return;
// EOF with all lines matching ": output doesn't match");
prln(
0,
"constructor " + c);
// Labels queued for possible printing. Innermost is first in list. // Print label if its section is nonempty. // Print queued labels with offsets less than "off". // Print "o" at given offset. for (
int i =
0; i <
off; i++)
// Print "o" (if non-null) at given offset, then newline. out.
write(
'\n');
// don't want platform-dependent separator