ParsingTest.java revision 809
797N/A * Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved. 63N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 63N/A * This code is free software; you can redistribute it and/or modify it 63N/A * under the terms of the GNU General Public License version 2 only, as 63N/A * published by the Free Software Foundation. 63N/A * This code is distributed in the hope that it will be useful, but WITHOUT 63N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 63N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 63N/A * version 2 for more details (a copy is included in the LICENSE file that 63N/A * accompanied this code). 63N/A * You should have received a copy of the GNU General Public License version 63N/A * 2 along with this work; if not, write to the Free Software Foundation, 63N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 553N/A * CA 95054 USA or visit www.sun.com if you need additional information or 63N/A * @bug 5017980 6576055 63N/A * @summary Test parsing methods 63N/A * @author Joseph D. Darcy 63N/A * There are six methods in java.lang.Integer which transform strings 63N/A * into an int or Integer value: 63N/A * public Integer(String s) 63N/A * public static Integer decode(String nm) 63N/A * public static int parseInt(String s, int radix) 63N/A * public static int parseInt(String s) 63N/A * public static Integer valueOf(String s, int radix) 63N/A * public static Integer valueOf(String s) 63N/A * Besides decode, all the methods and constructor call down into 63N/A * parseInt(String, int) to do the actual work. Therefore, the 63N/A * behavior of parseInt(String, int) will be tested here.