Add tests for (package-)naming.

These tests and keep-rules came from:
http://cs/android/toolchain/jack/jack-tests/tests/com/android/jack/shrob/
with the same numberings for tracking purpose.

Bug: 37764746
Change-Id: I4909cfa38d1e55980eb203622d0bd298cb68716d
diff --git a/src/test/examples/naming001/Reflect.java b/src/test/examples/naming001/Reflect.java
new file mode 100644
index 0000000..15b920e
--- /dev/null
+++ b/src/test/examples/naming001/Reflect.java
@@ -0,0 +1,53 @@
+// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+package naming001;
+
+import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+import java.util.concurrent.atomic.AtomicLongFieldUpdater;
+import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
+
+public class Reflect {
+  void keep() throws ClassNotFoundException {
+    Class.forName("naming001.Reflect2");
+    Class.forName("ClassThatDoesNotExists");
+  }
+
+  void keep2() throws NoSuchFieldException, SecurityException {
+    Reflect2.class.getField("fieldPublic");
+    Reflect2.class.getField("fieldPrivate");
+  }
+
+  void keep3() throws NoSuchFieldException, SecurityException {
+    Reflect2.class.getDeclaredField("fieldPublic");
+    Reflect2.class.getDeclaredField("fieldPrivate");
+  }
+
+  void keep4() throws SecurityException, NoSuchMethodException {
+    Reflect2.class.getMethod("m", new Class[] {naming001.Reflect2.A.class});
+    Reflect2.class.getMethod("m", new Class[] {naming001.Reflect2.B.class});
+    Reflect2.class.getMethod("methodThatDoesNotExist",
+        new Class[] {naming001.Reflect2.A.class});
+  }
+
+  void keep5() throws SecurityException, NoSuchMethodException {
+    Reflect2.class.getDeclaredMethod("m", new Class[] {naming001.Reflect2.A.class});
+    Reflect2.class.getDeclaredMethod("m", new Class[] {naming001.Reflect2.B.class});
+  }
+
+  void keep6() throws SecurityException {
+    AtomicIntegerFieldUpdater.newUpdater(Reflect2.class, "fieldPublic");
+  }
+
+  void keep7() throws SecurityException {
+    AtomicLongFieldUpdater.newUpdater(Reflect2.class, "fieldLong");
+    AtomicLongFieldUpdater.newUpdater(Reflect2.class, "fieldLong2");
+  }
+
+  void keep8() throws SecurityException {
+    AtomicReferenceFieldUpdater.newUpdater(Reflect2.class, Reflect2.A.class, "a");
+    AtomicReferenceFieldUpdater.newUpdater(Reflect2.class, Reflect2.A.class, "b");
+    AtomicReferenceFieldUpdater.newUpdater(Reflect2.class, Object.class, "c");
+  }
+}
+