langtools/test/tools/javac/lambdaShapes/org/openjdk/tests/javac/FDTest.java
changeset 29776 984a79b71cfe
parent 27319 030080f03e4f
equal deleted inserted replaced
29775:dc7df633fea1 29776:984a79b71cfe
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   106     }
   106     }
   107 
   107 
   108     public static List<Pair<TestKind, Hierarchy>> generateCases() {
   108     public static List<Pair<TestKind, Hierarchy>> generateCases() {
   109         ArrayList<Pair<TestKind,Hierarchy>> list = new ArrayList<>();
   109         ArrayList<Pair<TestKind,Hierarchy>> list = new ArrayList<>();
   110         HierarchyGenerator hg = new HierarchyGenerator();
   110         HierarchyGenerator hg = new HierarchyGenerator();
       
   111         int i = 0;
   111         for (TestKind tk : TestKind.values()) {
   112         for (TestKind tk : TestKind.values()) {
   112             for (Hierarchy hs : tk.getHierarchy(hg)) {
   113             for (Hierarchy hs : tk.getHierarchy(hg)) {
   113                 list.add(new Pair<>(tk, hs));
   114                 list.add((i++ % 2) == 0 ? new Pair<>(tk, hs) {} : new Pair<>(tk, hs));
   114             }
   115             }
   115         }
   116         }
   116         return list;
   117         return list;
   117     }
   118     }
   118 
   119