< prev index next >

test/java/lang/reflect/PublicMethods/PublicMethodsTest.java

Print this page




  40 import java.io.UncheckedIOException;
  41 import java.lang.reflect.Method;
  42 import java.net.URI;
  43 import java.nio.charset.Charset;
  44 import java.util.ArrayList;
  45 import java.util.HashMap;
  46 import java.util.List;
  47 import java.util.Locale;
  48 import java.util.Map;
  49 import java.util.regex.Pattern;
  50 import java.util.stream.Collectors;
  51 import java.util.stream.IntStream;
  52 import java.util.stream.Stream;
  53 
  54 import static java.util.stream.Collectors.joining;
  55 import static java.util.stream.Collectors.toMap;
  56 
  57 /*
  58  * @test
  59  * @bug 8062389



  60  * @summary Nearly exhaustive test of Class.getMethod() and Class.getMethods()
  61  * @run main PublicMethodsTest
  62  */
  63 public class PublicMethodsTest {
  64 
  65     public static void main(String[] args) {
  66         Case c = new Case1();
  67 
  68         int[] diffs = new int[1];
  69         try (Stream<Map.Entry<int[], Map<String, String>>>
  70                  expected = expectedResults(c)) {
  71             diffResults(c, expected)
  72                 .forEach(diff -> {
  73                     System.out.println(diff);
  74                     diffs[0]++;
  75                 });
  76         }
  77 
  78         if (diffs[0] > 0) {
  79             throw new RuntimeException(




  40 import java.io.UncheckedIOException;
  41 import java.lang.reflect.Method;
  42 import java.net.URI;
  43 import java.nio.charset.Charset;
  44 import java.util.ArrayList;
  45 import java.util.HashMap;
  46 import java.util.List;
  47 import java.util.Locale;
  48 import java.util.Map;
  49 import java.util.regex.Pattern;
  50 import java.util.stream.Collectors;
  51 import java.util.stream.IntStream;
  52 import java.util.stream.Stream;
  53 
  54 import static java.util.stream.Collectors.joining;
  55 import static java.util.stream.Collectors.toMap;
  56 
  57 /*
  58  * @test
  59  * @bug 8062389
  60  * @modules java.compiler
  61  *          jdk.compiler
  62  *          jdk.zipfs
  63  * @summary Nearly exhaustive test of Class.getMethod() and Class.getMethods()
  64  * @run main PublicMethodsTest
  65  */
  66 public class PublicMethodsTest {
  67 
  68     public static void main(String[] args) {
  69         Case c = new Case1();
  70 
  71         int[] diffs = new int[1];
  72         try (Stream<Map.Entry<int[], Map<String, String>>>
  73                  expected = expectedResults(c)) {
  74             diffResults(c, expected)
  75                 .forEach(diff -> {
  76                     System.out.println(diff);
  77                     diffs[0]++;
  78                 });
  79         }
  80 
  81         if (diffs[0] > 0) {
  82             throw new RuntimeException(


< prev index next >