Testing for default and native methods in vertical class merger

Change-Id: I8508ca29835325e11fdd4bb4680f98021aea485b
diff --git a/src/test/examples/classmerging/ClassWithNativeMethodTest.java b/src/test/examples/classmerging/ClassWithNativeMethodTest.java
new file mode 100644
index 0000000..b28433d
--- /dev/null
+++ b/src/test/examples/classmerging/ClassWithNativeMethodTest.java
@@ -0,0 +1,22 @@
+// Copyright (c) 2018, 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 classmerging;
+
+public class ClassWithNativeMethodTest {
+
+  public static void main(String[] args) {
+    B obj = new B();
+
+    // Make sure that A.method is not removed by tree shaking.
+    if (args.length == 42) {
+      obj.method();
+    }
+  }
+
+  public static class A {
+    public native void method();
+  }
+
+  public static class B extends A {}
+}