< prev index next >

test/sun/net/idn/PunycodeTest.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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 /*
  25  * @test
  26  * @summary Unit test for sun.net.idn.Punycode
  27  * @bug 4737170

  28  * @compile -XDignore.symbol.file PunycodeTest.java
  29  * @run main/othervm -ea PunycodeTest
  30  * @author Edward Wang
  31  */
  32 
  33 import java.util.Scanner;
  34 import java.text.ParseException;
  35 import sun.net.idn.Punycode;
  36 
  37 /**
  38  * unit test for Punycode that is also originated from the sample code
  39  * provided in rfc3492.txt
  40  */
  41 public class PunycodeTest {
  42 
  43     /* For testing, we'll just set some compile-time limits rather than */
  44     /* use malloc(), and set a compile-time option rather than using a  */
  45     /* command-line option.                                             */
  46 
  47     static final int  unicode_max_length = 256;




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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 /*
  25  * @test
  26  * @summary Unit test for sun.net.idn.Punycode
  27  * @bug 4737170
  28  * @modules java.base/sun.net.idn
  29  * @compile -XDignore.symbol.file PunycodeTest.java
  30  * @run main/othervm -ea PunycodeTest
  31  * @author Edward Wang
  32  */
  33 
  34 import java.util.Scanner;
  35 import java.text.ParseException;
  36 import sun.net.idn.Punycode;
  37 
  38 /**
  39  * unit test for Punycode that is also originated from the sample code
  40  * provided in rfc3492.txt
  41  */
  42 public class PunycodeTest {
  43 
  44     /* For testing, we'll just set some compile-time limits rather than */
  45     /* use malloc(), and set a compile-time option rather than using a  */
  46     /* command-line option.                                             */
  47 
  48     static final int  unicode_max_length = 256;


< prev index next >