IdentifierMinifierTest: add test with "-adaptclassstrings" (no filter)
Bug: 124648123
Change-Id: I5bd12173f71cd25135e31614f440cdc27e137307
diff --git a/src/test/examples/adaptclassstrings/Main.java b/src/test/examples/adaptclassstrings/Main.java
index 4cee1d5..0489ca4 100644
--- a/src/test/examples/adaptclassstrings/Main.java
+++ b/src/test/examples/adaptclassstrings/Main.java
@@ -5,6 +5,7 @@
public class Main {
public static void main(String[] args) throws Exception {
+ assert false;
int f = 3;
A a = new A(f);
AA aa = new AA(f);
@@ -25,6 +26,7 @@
assert a_foo.equals(c_to_a_foo);
String cName = (String) Class.forName(C.ITSELF).getField("ITSELF").get(null);
- assert cName.equals(A.OTHER);
+ boolean b = cName.equals(A.OTHER);
+ assert b;
}
}
diff --git a/src/test/examples/adaptclassstrings/keep-rules-3.txt b/src/test/examples/adaptclassstrings/keep-rules-3.txt
new file mode 100644
index 0000000..f853c46
--- /dev/null
+++ b/src/test/examples/adaptclassstrings/keep-rules-3.txt
@@ -0,0 +1,13 @@
+# Copyright (c) 2019, 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.
+
+# Keep the application entry point. Get rid of everything that is not
+# reachable from there.
+-keep public class adaptclassstrings.Main {
+ public static void main(...);
+}
+
+-dontshrink
+
+-adaptclassstrings