Merge "Test java.util Collections tests using guava-testlib." am: 69f13316b8 am: cb1aae27c8 am: 48ae00af90
am: 360cb478eb
Change-Id: I1925f5be3eb481a99422a07d5708ce63546a1d0c
diff --git a/tests/libcore/javautilcollections/Android.mk b/tests/libcore/javautilcollections/Android.mk
new file mode 100644
index 0000000..2c7b7b1
--- /dev/null
+++ b/tests/libcore/javautilcollections/Android.mk
@@ -0,0 +1,34 @@
+# Copyright (C) 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
+ guava-20.0-prebuilt:libs/guava-20.0.jar \
+ guava-testlib-20.0-prebuilt:libs/guava-testlib-20.0.jar
+include $(BUILD_MULTI_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ ctstestrunner \
+ guava-20.0-prebuilt \
+ guava-testlib-20.0-prebuilt
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_PACKAGE_NAME := CtsLibcoreJavaUtilCollectionsTestCases
+LOCAL_COMPATIBILITY_SUITE := cts
+
+include $(BUILD_CTS_PACKAGE)
diff --git a/tests/libcore/javautilcollections/AndroidManifest.xml b/tests/libcore/javautilcollections/AndroidManifest.xml
new file mode 100644
index 0000000..a7e8cee
--- /dev/null
+++ b/tests/libcore/javautilcollections/AndroidManifest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2016 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="libcore.java.util.collectiontests">
+
+ <!-- AndroidJUnitRunner needs a largeHeap to collect the ~ 240k test methods to run. -->
+ <application android:largeHeap="true">
+ <uses-library android:name="android.test.runner"/>
+ </application>
+
+ <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:targetPackage="libcore.java.util.collectiontests"
+ android:label="Tests for Collection implementations in java.util">
+ </instrumentation>
+
+</manifest>
+
diff --git a/tests/libcore/javautilcollections/AndroidTest.xml b/tests/libcore/javautilcollections/AndroidTest.xml
new file mode 100644
index 0000000..7261c80
--- /dev/null
+++ b/tests/libcore/javautilcollections/AndroidTest.xml
@@ -0,0 +1,69 @@
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Config for CTS Libcore java.util Collection test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsLibcoreJavaUtilCollectionsTestCases.apk" />
+ </target_preparer>
+ <!--
+ Notes as of November 2016:
+
+ 1.) When the runner collects the set of tests to run, it
+ (a) attempts to directly run TestCase subclasses from guava-testlib, which they don't support,
+ (b) doesn't find classes with suite() methods.
+ (c) runs out of memory if attempting to run all of the > 220k tests in a single go
+ Breaking the tests down into chunks of ~ 40-50k tests each, and explicitly specifying the
+ suites to run, solves these problems.
+
+ 2.) Due to http://b/33068110 the classes with the suite() methods (in the "suite" sub-package)
+ need to extend TestSuite, which means that they need to delegate to separate classes (in the
+ "tests" sub-package) that extend classes from guava-testlib.
+ -->
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="libcore.java.util.collectiontests" />
+ <option name="class" value="libcore.java.util.suite.ConcurrentSkipListMapNaturalSuite" />
+ <option name="runtime-hint" value="10m" />
+ <option name="test-timeout" value="1200000" />
+ <option name="shell-timeout" value="1400000" />
+ </test>
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="libcore.java.util.collectiontests" />
+ <option name="class" value="libcore.java.util.suite.ConcurrentSkipListMapWithComparatorSuite" />
+ <option name="runtime-hint" value="10m" />
+ <option name="test-timeout" value="1200000" />
+ <option name="shell-timeout" value="1400000" />
+ </test>
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="libcore.java.util.collectiontests" />
+ <option name="class" value="libcore.java.util.suite.TreeMapNaturalSuite" />
+ <option name="runtime-hint" value="10m" />
+ <option name="test-timeout" value="1200000" />
+ <option name="shell-timeout" value="1400000" />
+ </test>
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="libcore.java.util.collectiontests" />
+ <option name="class" value="libcore.java.util.suite.TreeMapWithComparatorSuite" />
+ <option name="runtime-hint" value="10m" />
+ <option name="test-timeout" value="1200000" />
+ <option name="shell-timeout" value="1400000" />
+ </test>
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="libcore.java.util.collectiontests" />
+ <option name="class" value="libcore.java.util.suite.OtherCollectionsSuite" />
+ <option name="runtime-hint" value="8m" />
+ <option name="test-timeout" value="1200000" />
+ <option name="shell-timeout" value="1400000" />
+ </test>
+</configuration>
\ No newline at end of file
diff --git a/tests/libcore/javautilcollections/libs/guava-20.0.jar b/tests/libcore/javautilcollections/libs/guava-20.0.jar
new file mode 100644
index 0000000..632772f
--- /dev/null
+++ b/tests/libcore/javautilcollections/libs/guava-20.0.jar
Binary files differ
diff --git a/tests/libcore/javautilcollections/libs/guava-testlib-20.0.jar b/tests/libcore/javautilcollections/libs/guava-testlib-20.0.jar
new file mode 100644
index 0000000..6dd8d90
--- /dev/null
+++ b/tests/libcore/javautilcollections/libs/guava-testlib-20.0.jar
Binary files differ
diff --git a/tests/libcore/javautilcollections/src/libcore/java/util/suite/ConcurrentSkipListMapNaturalSuite.java b/tests/libcore/javautilcollections/src/libcore/java/util/suite/ConcurrentSkipListMapNaturalSuite.java
new file mode 100644
index 0000000..332190b
--- /dev/null
+++ b/tests/libcore/javautilcollections/src/libcore/java/util/suite/ConcurrentSkipListMapNaturalSuite.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package libcore.java.util.suite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import libcore.java.util.tests.AndroidTestsForMapsInJavaUtil;
+import libcore.java.util.tests.AndroidTestsForMapsInJavaUtil.MapsToTest;
+
+public class ConcurrentSkipListMapNaturalSuite extends TestSuite {
+ public static Test suite() {
+ return new AndroidTestsForMapsInJavaUtil(MapsToTest.CONCURRENT_SKIP_LIST_MAP_NATURAL)
+ .allTests();
+ }
+}
diff --git a/tests/libcore/javautilcollections/src/libcore/java/util/suite/ConcurrentSkipListMapWithComparatorSuite.java b/tests/libcore/javautilcollections/src/libcore/java/util/suite/ConcurrentSkipListMapWithComparatorSuite.java
new file mode 100644
index 0000000..878e721
--- /dev/null
+++ b/tests/libcore/javautilcollections/src/libcore/java/util/suite/ConcurrentSkipListMapWithComparatorSuite.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package libcore.java.util.suite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import libcore.java.util.tests.AndroidTestsForMapsInJavaUtil;
+import libcore.java.util.tests.AndroidTestsForMapsInJavaUtil.MapsToTest;
+
+public class ConcurrentSkipListMapWithComparatorSuite extends TestSuite {
+ public static Test suite() {
+ return new AndroidTestsForMapsInJavaUtil(
+ MapsToTest.CONCURRENT_SKIP_LIST_MAP_WITH_COMPARATOR).allTests();
+ }
+
+}
diff --git a/tests/libcore/javautilcollections/src/libcore/java/util/suite/OtherCollectionsSuite.java b/tests/libcore/javautilcollections/src/libcore/java/util/suite/OtherCollectionsSuite.java
new file mode 100644
index 0000000..6af45f4
--- /dev/null
+++ b/tests/libcore/javautilcollections/src/libcore/java/util/suite/OtherCollectionsSuite.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package libcore.java.util.suite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import libcore.java.util.tests.AndroidTestsForListsInJavaUtil;
+import libcore.java.util.tests.AndroidTestsForMapsInJavaUtil;
+import libcore.java.util.tests.AndroidTestsForMapsInJavaUtil.MapsToTest;
+import libcore.java.util.tests.AndroidTestsForQueuesInJavaUtil;
+import libcore.java.util.tests.AndroidTestsForSetsInJavaUtil;
+
+/**
+ * A suite of all guava-testlib Collection tests not covered by the other suites in this
+ * package.
+ */
+public class OtherCollectionsSuite extends TestSuite {
+ public static Test suite() {
+ TestSuite result = new TestSuite();
+ result.addTest(new AndroidTestsForListsInJavaUtil().allTests());
+ result.addTest(new AndroidTestsForMapsInJavaUtil(MapsToTest.OTHER).allTests());
+ result.addTest(new AndroidTestsForQueuesInJavaUtil().allTests());
+ result.addTest(new AndroidTestsForSetsInJavaUtil().allTests());
+ return result;
+ }
+}
diff --git a/tests/libcore/javautilcollections/src/libcore/java/util/suite/TreeMapNaturalSuite.java b/tests/libcore/javautilcollections/src/libcore/java/util/suite/TreeMapNaturalSuite.java
new file mode 100644
index 0000000..68a7624
--- /dev/null
+++ b/tests/libcore/javautilcollections/src/libcore/java/util/suite/TreeMapNaturalSuite.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package libcore.java.util.suite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import libcore.java.util.tests.AndroidTestsForMapsInJavaUtil;
+import libcore.java.util.tests.AndroidTestsForMapsInJavaUtil.MapsToTest;
+
+public class TreeMapNaturalSuite extends TestSuite {
+ public static Test suite() {
+ return new AndroidTestsForMapsInJavaUtil(MapsToTest.TREE_MAP_NATURAL).allTests();
+ }
+}
diff --git a/tests/libcore/javautilcollections/src/libcore/java/util/suite/TreeMapWithComparatorSuite.java b/tests/libcore/javautilcollections/src/libcore/java/util/suite/TreeMapWithComparatorSuite.java
new file mode 100644
index 0000000..6e6fd6f
--- /dev/null
+++ b/tests/libcore/javautilcollections/src/libcore/java/util/suite/TreeMapWithComparatorSuite.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package libcore.java.util.suite;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import libcore.java.util.tests.AndroidTestsForMapsInJavaUtil;
+import libcore.java.util.tests.AndroidTestsForMapsInJavaUtil.MapsToTest;
+
+public class TreeMapWithComparatorSuite extends TestSuite {
+ public static Test suite() {
+ return new AndroidTestsForMapsInJavaUtil(MapsToTest.TREE_MAP_WITH_COMPARATOR).allTests();
+ }
+}
diff --git a/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForListsInJavaUtil.java b/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForListsInJavaUtil.java
new file mode 100644
index 0000000..8d9177c
--- /dev/null
+++ b/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForListsInJavaUtil.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package libcore.java.util.tests;
+
+import com.google.common.collect.testing.TestsForListsInJavaUtil;
+import com.google.common.collect.testing.testers.CollectionToArrayTester;
+
+import junit.framework.Test;
+
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * Guava-testlib tests for {@code List} implementations from {@code java.util}.
+ */
+public class AndroidTestsForListsInJavaUtil extends TestsForListsInJavaUtil {
+ @Override
+ protected Collection<Method> suppressForArraysAsList() {
+ return Collections.singleton(
+ // http://b/30829421
+ CollectionToArrayTester.getToArrayIsPlainObjectArrayMethod());
+ }
+}
diff --git a/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForMapsInJavaUtil.java b/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForMapsInJavaUtil.java
new file mode 100644
index 0000000..8a685d9
--- /dev/null
+++ b/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForMapsInJavaUtil.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package libcore.java.util.tests;
+
+import com.google.common.collect.testing.TestsForMapsInJavaUtil;
+import com.google.common.collect.testing.testers.CollectionAddAllTester;
+import com.google.common.collect.testing.testers.CollectionAddTester;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Objects;
+
+/**
+ * Guava-testlib tests for {@link MapsToTest} that were specified as a
+ * constructor argument.
+ */
+public class AndroidTestsForMapsInJavaUtil extends TestsForMapsInJavaUtil {
+ public enum MapsToTest {
+ /** All Maps other than those below. */
+ OTHER,
+ /** TreeMao with natural ordering. */
+ TREE_MAP_NATURAL,
+ /** TreeMap with a Comparator. */
+ TREE_MAP_WITH_COMPARATOR,
+ /** ConcurrentSKipListMap with natural ordering. */
+ CONCURRENT_SKIP_LIST_MAP_NATURAL,
+ /** ConcurrentSKipListMap with a Comparator. */
+ CONCURRENT_SKIP_LIST_MAP_WITH_COMPARATOR
+ }
+
+ private final MapsToTest mapsToTest;
+
+ public AndroidTestsForMapsInJavaUtil(MapsToTest mapsToTest) {
+ this.mapsToTest = Objects.requireNonNull(mapsToTest);
+ }
+
+ /**
+ * Returns the tests for the {@link MapsToTest} from {@code java.util}.
+ */
+ @Override
+ public final Test allTests() {
+ TestSuite suite = new TestSuite("java.util Maps: " + mapsToTest);
+ switch (mapsToTest) {
+ case OTHER:
+ suite.addTest(testsForEmptyMap());
+ suite.addTest(testsForSingletonMap());
+ suite.addTest(testsForHashMap());
+ suite.addTest(testsForLinkedHashMap());
+ suite.addTest(testsForEnumMap());
+ suite.addTest(testsForConcurrentHashMap());
+ break;
+ case TREE_MAP_NATURAL:
+ suite.addTest(testsForTreeMapNatural());
+ break;
+ case TREE_MAP_WITH_COMPARATOR:
+ suite.addTest(testsForTreeMapWithComparator());
+ break;
+ case CONCURRENT_SKIP_LIST_MAP_NATURAL:
+ suite.addTest(testsForConcurrentSkipListMapNatural());
+ break;
+ case CONCURRENT_SKIP_LIST_MAP_WITH_COMPARATOR:
+ suite.addTest(testsForConcurrentSkipListMapWithComparator());
+ break;
+ default:
+ throw new IllegalArgumentException("Unknown part: " + mapsToTest);
+ }
+ return suite;
+ }
+
+ @Override
+ protected final Collection<Method> suppressForConcurrentHashMap() {
+ // http://b/30853241
+ return Arrays.asList(
+ CollectionAddAllTester.getAddAllUnsupportedNonePresentMethod(),
+ CollectionAddAllTester.getAddAllUnsupportedSomePresentMethod(),
+ CollectionAddTester.getAddUnsupportedNotPresentMethod());
+ }
+}
diff --git a/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForQueuesInJavaUtil.java b/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForQueuesInJavaUtil.java
new file mode 100644
index 0000000..e3dcd62
--- /dev/null
+++ b/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForQueuesInJavaUtil.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package libcore.java.util.tests;
+
+import com.google.common.collect.testing.TestsForQueuesInJavaUtil;
+
+import junit.framework.Test;
+
+/**
+ * Guava-testlib tests for {@code Queue} implementations from {@code java.util}.
+ */
+public class AndroidTestsForQueuesInJavaUtil extends TestsForQueuesInJavaUtil {
+}
diff --git a/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForSetsInJavaUtil.java b/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForSetsInJavaUtil.java
new file mode 100644
index 0000000..c4e41f4
--- /dev/null
+++ b/tests/libcore/javautilcollections/src/libcore/java/util/tests/AndroidTestsForSetsInJavaUtil.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package libcore.java.util.tests;
+
+import com.google.common.collect.testing.TestsForSetsInJavaUtil;
+
+import junit.framework.Test;
+
+/**
+ * Guava-testlib tests for {@code Set} implementations from {@code java.util}.
+ */
+public class AndroidTestsForSetsInJavaUtil extends TestsForSetsInJavaUtil {
+}