< prev index next >

test/sun/net/www/ParseUtil_4922813.java

Print this page




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   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 /* @test
  25    @bug 4922813
  26    @summary Check the new impl of encodePath will not cause regression

  27    @key randomness
  28  */
  29 
  30 import java.util.BitSet;
  31 import java.io.File;
  32 import java.util.Random;
  33 import sun.net.www.ParseUtil;
  34 
  35 public class ParseUtil_4922813 {
  36     public static void main(String[] argv) throws Exception {
  37 
  38         int num = 400;
  39         while (num-- >= 0) {
  40             String source = getTestSource();
  41             String ec = sun.net.www.ParseUtil.encodePath(source);
  42             String v117 = ParseUtil_V117.encodePath(source);
  43             if (!ec.equals(v117)) {
  44                 throw new RuntimeException("Test Failed for : \n"
  45                                            + "   source  =<"
  46                                            + getUnicodeString(source)




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   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 /* @test
  25  * @bug 4922813
  26  * @summary Check the new impl of encodePath will not cause regression
  27  * @modules java.base/sun.net.www
  28    @key randomness
  29  */
  30 
  31 import java.util.BitSet;
  32 import java.io.File;
  33 import java.util.Random;
  34 import sun.net.www.ParseUtil;
  35 
  36 public class ParseUtil_4922813 {
  37     public static void main(String[] argv) throws Exception {
  38 
  39         int num = 400;
  40         while (num-- >= 0) {
  41             String source = getTestSource();
  42             String ec = sun.net.www.ParseUtil.encodePath(source);
  43             String v117 = ParseUtil_V117.encodePath(source);
  44             if (!ec.equals(v117)) {
  45                 throw new RuntimeException("Test Failed for : \n"
  46                                            + "   source  =<"
  47                                            + getUnicodeString(source)


< prev index next >