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 * @bug 4904067 5023830 7129185
27 * @summary Unit test for Collections.checkedMap
28 * @author Josh Bloch
29 * @run testng CheckedMapBash
30 */
31
32 import java.util.*;
33 import java.util.function.Supplier;
34 import org.testng.annotations.Test;
35 import org.testng.annotations.DataProvider;
36
37 import static org.testng.Assert.fail;
38 import static org.testng.Assert.assertTrue;
39
40 public class CheckedMapBash {
41 static final Random rnd = new Random();
42 static final Object nil = new Integer(0);
43 static final int numItr = 100;
44 static final int mapSize = 100;
45
46 @Test(dataProvider = "Bash.Supplier<Map<Integer,Integer>>")
47 public static void testCheckedMap(String description, Supplier<Map<Integer,Integer>> supplier) {
48 Map m = supplier.get();
49 Object head = nil;
|
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 * @bug 4904067 5023830 7129185
27 * @summary Unit test for Collections.checkedMap
28 * @author Josh Bloch
29 * @run testng CheckedMapBash
30 * @key randomness
31 */
32
33 import java.util.*;
34 import java.util.function.Supplier;
35 import org.testng.annotations.Test;
36 import org.testng.annotations.DataProvider;
37
38 import static org.testng.Assert.fail;
39 import static org.testng.Assert.assertTrue;
40
41 public class CheckedMapBash {
42 static final Random rnd = new Random();
43 static final Object nil = new Integer(0);
44 static final int numItr = 100;
45 static final int mapSize = 100;
46
47 @Test(dataProvider = "Bash.Supplier<Map<Integer,Integer>>")
48 public static void testCheckedMap(String description, Supplier<Map<Integer,Integer>> supplier) {
49 Map m = supplier.get();
50 Object head = nil;
|