11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 * @summary Unit test for formatter
26 * @bug 4906370 4962433 4973103 4989961 5005818 5031150 4970931 4989491 5002937
27 * 5005104 5007745 5061412 5055180 5066788 5088703 6317248 6318369 6320122
28 * 6344623 6369500 6534606 6282094 6286592 6476425 5063507 6469160 6476168
29 * 8059175
30 *
31 * @run shell/timeout=240 Basic.sh
32 */
33
34 import static java.lang.System.out;
35
36 public class Basic {
37
38 private static int fail = 0;
39 private static int pass = 0;
40
41 private static Throwable first;
42
43 static void pass() {
44 pass++;
45 }
46
47 static void fail(String fs, Class ex) {
48 String s = "'" + fs + "': " + ex.getName() + " not thrown";
49 if (first == null)
50 setFirst(s);
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 * @summary Unit test for formatter
26 * @bug 4906370 4962433 4973103 4989961 5005818 5031150 4970931 4989491 5002937
27 * 5005104 5007745 5061412 5055180 5066788 5088703 6317248 6318369 6320122
28 * 6344623 6369500 6534606 6282094 6286592 6476425 5063507 6469160 6476168
29 * 8059175
30 *
31 * @modules java.base/sun.misc
32 * @run shell/timeout=240 Basic.sh
33 */
34
35 import static java.lang.System.out;
36
37 public class Basic {
38
39 private static int fail = 0;
40 private static int pass = 0;
41
42 private static Throwable first;
43
44 static void pass() {
45 pass++;
46 }
47
48 static void fail(String fs, Class ex) {
49 String s = "'" + fs + "': " + ex.getName() + " not thrown";
50 if (first == null)
51 setFirst(s);
|