diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/845-data-image/src-art/IfaceWithSayHi.java | 21 | ||||
| -rw-r--r-- | test/845-data-image/src-art/IfaceWithSayHiAtRuntime.java | 18 | ||||
| -rw-r--r-- | test/845-data-image/src-art/Main.java | 4 | ||||
| -rw-r--r-- | test/845-data-image/src2/IfaceWithSayHiAtRuntime.java | 21 |
4 files changed, 64 insertions, 0 deletions
diff --git a/test/845-data-image/src-art/IfaceWithSayHi.java b/test/845-data-image/src-art/IfaceWithSayHi.java new file mode 100644 index 0000000000..2fcbd4e131 --- /dev/null +++ b/test/845-data-image/src-art/IfaceWithSayHi.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2023 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. + */ + +public interface IfaceWithSayHi { + public default String sayHi() { + return "Hi"; + } +} diff --git a/test/845-data-image/src-art/IfaceWithSayHiAtRuntime.java b/test/845-data-image/src-art/IfaceWithSayHiAtRuntime.java new file mode 100644 index 0000000000..23b93940bd --- /dev/null +++ b/test/845-data-image/src-art/IfaceWithSayHiAtRuntime.java @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2023 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. + */ + +public interface IfaceWithSayHiAtRuntime { +} diff --git a/test/845-data-image/src-art/Main.java b/test/845-data-image/src-art/Main.java index e74a6d69a0..36cc9d0bca 100644 --- a/test/845-data-image/src-art/Main.java +++ b/test/845-data-image/src-art/Main.java @@ -108,6 +108,9 @@ interface Itf2 { class Itf2Impl implements Itf2 { } +class ClassWithDefaultConflict implements IfaceWithSayHi, IfaceWithSayHiAtRuntime { +} + public class Main implements Itf { static String myString = "MyString"; @@ -220,6 +223,7 @@ public class Main implements Itf { public static Itf2 itf2 = new Itf2Impl(); public static ClassWithStatics statics = new ClassWithStatics(); public static ClassWithStaticType staticType = new ClassWithStaticType(); + public static ClassWithDefaultConflict defaultConflict = new ClassWithDefaultConflict(); public static void runClassTests() { // Test Class.getName, app images expect all strings to have hash codes. diff --git a/test/845-data-image/src2/IfaceWithSayHiAtRuntime.java b/test/845-data-image/src2/IfaceWithSayHiAtRuntime.java new file mode 100644 index 0000000000..9c3a339462 --- /dev/null +++ b/test/845-data-image/src2/IfaceWithSayHiAtRuntime.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2023 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. + */ + +public interface IfaceWithSayHiAtRuntime { + public default String sayHi() { + return "hello"; + } +} |