diff options
author | Dan Pasanen <invisiblek@cyanogenmod.org> | 2016-12-06 19:30:12 -0600 |
---|---|---|
committer | Dan Pasanen <invisiblek@cyanogenmod.org> | 2016-12-06 19:32:30 -0600 |
commit | 58d4793f8bd82b9daab5bf4fa40d5b68204e71eb (patch) | |
tree | 449265cbacbf925f37ed0bd201e68f080e2537cc /test/960-default-smali | |
parent | 20af13267def46b2e5f9a6fa6e94ac69056ef16f (diff) | |
parent | 12eb0c532e33ca5d5e98addd580b5ad0a4b71be4 (diff) | |
download | art-cm-14.1_prerebase.tar.gz art-cm-14.1_prerebase.tar.bz2 art-cm-14.1_prerebase.zip |
Merge tag 'android-7.1.1_r4' into cm-14.1cm-14.1_prerebase
Android 7.1.1 release 4
Change-Id: I14b36666b5a478024f3a9ffab90fd675a6157461
Diffstat (limited to 'test/960-default-smali')
-rw-r--r-- | test/960-default-smali/expected.txt | 31 | ||||
-rw-r--r-- | test/960-default-smali/src/Foo2.java | 25 | ||||
-rw-r--r-- | test/960-default-smali/src/Foo3.java | 22 | ||||
-rw-r--r-- | test/960-default-smali/src/N.java | 21 | ||||
-rw-r--r-- | test/960-default-smali/src/O.java | 21 | ||||
-rw-r--r-- | test/960-default-smali/src/P.java | 25 | ||||
-rw-r--r-- | test/960-default-smali/src/Q.java | 21 | ||||
-rw-r--r-- | test/960-default-smali/src/classes.xml | 49 | ||||
-rw-r--r-- | test/960-default-smali/src2/Foo.java | 20 | ||||
-rw-r--r-- | test/960-default-smali/src2/Foo3.java | 25 |
10 files changed, 260 insertions, 0 deletions
diff --git a/test/960-default-smali/expected.txt b/test/960-default-smali/expected.txt index f3db93f87f..8153d7d4eb 100644 --- a/test/960-default-smali/expected.txt +++ b/test/960-default-smali/expected.txt @@ -98,3 +98,34 @@ M-virtual K.bar()='BAZ!' M-virtual L.bar()='BAZ!' M-virtual M.bar()='BAZ!' End testing for type M +Testing for type N +N-interface Foo.bar()='foobar' +N-virtual N.bar()='foobar' +End testing for type N +Testing for type O +O-interface Foo.bar()='foobar foobar' +O-interface Foo2.bar()='foobar foobar' +O-virtual N.bar()='foobar foobar' +O-virtual O.bar()='foobar foobar' +End testing for type O +Testing for type P +P-interface Foo.bar()='not foobar!' +P-interface Foo2.bar()='not foobar!' +P-virtual N.bar()='not foobar!' +P-virtual O.bar()='not foobar!' +P-virtual P.bar()='not foobar!' +End testing for type P +Testing for type Q +Q-interface on Foo: bar() threw exception! +Exception is of type java.lang.IncompatibleClassChangeError +Q-interface on Foo2: bar() threw exception! +Exception is of type java.lang.IncompatibleClassChangeError +Q-interface on Foo3: bar() threw exception! +Exception is of type java.lang.IncompatibleClassChangeError +Q-virtual on N: bar() threw exception! +Exception is of type java.lang.IncompatibleClassChangeError +Q-virtual on O: bar() threw exception! +Exception is of type java.lang.IncompatibleClassChangeError +Q-virtual on Q: bar() threw exception! +Exception is of type java.lang.IncompatibleClassChangeError +End testing for type Q diff --git a/test/960-default-smali/src/Foo2.java b/test/960-default-smali/src/Foo2.java new file mode 100644 index 0000000000..2a1bbc0bea --- /dev/null +++ b/test/960-default-smali/src/Foo2.java @@ -0,0 +1,25 @@ +/* + * Copyright 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. + */ + +/** + * Regression test for b/31280371 + */ +interface Foo2 extends Foo { + @Override + public default String bar() { + return "foobar foobar"; + } +} diff --git a/test/960-default-smali/src/Foo3.java b/test/960-default-smali/src/Foo3.java new file mode 100644 index 0000000000..4c00425937 --- /dev/null +++ b/test/960-default-smali/src/Foo3.java @@ -0,0 +1,22 @@ +/* + * Copyright 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. + */ + +/** + * Regression test for b/31280371 + */ +interface Foo3 extends Foo { + default void doNothing() {} +} diff --git a/test/960-default-smali/src/N.java b/test/960-default-smali/src/N.java new file mode 100644 index 0000000000..9d33320fa7 --- /dev/null +++ b/test/960-default-smali/src/N.java @@ -0,0 +1,21 @@ +/* + * Copyright 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. + */ + +/** + * Regression test for b/31280371 + */ +class N implements Foo { +} diff --git a/test/960-default-smali/src/O.java b/test/960-default-smali/src/O.java new file mode 100644 index 0000000000..55126af3ae --- /dev/null +++ b/test/960-default-smali/src/O.java @@ -0,0 +1,21 @@ +/* + * Copyright 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. + */ + +/** + * Regression test for b/31280371 + */ +class O extends N implements Foo2 { +} diff --git a/test/960-default-smali/src/P.java b/test/960-default-smali/src/P.java new file mode 100644 index 0000000000..1ee6c26a6b --- /dev/null +++ b/test/960-default-smali/src/P.java @@ -0,0 +1,25 @@ +/* + * Copyright 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. + */ + +/** + * Regression test for b/31280371 + */ +class P extends O implements Foo2 { + @Override + public String bar() { + return "not foobar!"; + } +} diff --git a/test/960-default-smali/src/Q.java b/test/960-default-smali/src/Q.java new file mode 100644 index 0000000000..bc1e1640cd --- /dev/null +++ b/test/960-default-smali/src/Q.java @@ -0,0 +1,21 @@ +/* + * Copyright 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. + */ + +/** + * Regression test for b/31280371 + */ +class Q extends O implements Foo2, Foo3 { +} diff --git a/test/960-default-smali/src/classes.xml b/test/960-default-smali/src/classes.xml index f3e50c570b..c66d35b305 100644 --- a/test/960-default-smali/src/classes.xml +++ b/test/960-default-smali/src/classes.xml @@ -102,6 +102,37 @@ <method>bar</method> </methods> </class> + + <class name="N" super="java/lang/Object"> + <implements> + <item>Foo</item> + </implements> + <methods> </methods> + </class> + + <class name="O" super="N"> + <implements> + <item>Foo2</item> + </implements> + <methods> </methods> + </class> + + <class name="P" super="O"> + <implements> + <item>Foo2</item> + </implements> + <methods> + <method>bar</method> + </methods> + </class> + + <class name="Q" super="O"> + <implements> + <item>Foo2</item> + <item>Foo3</item> + </implements> + <methods> </methods> + </class> </classes> <interfaces> @@ -153,6 +184,24 @@ </methods> </interface> + <interface name="Foo2" super="java/lang/Object"> + <implements> + <item>Foo</item> + </implements> + <methods> + <method type="default">bar</method> + </methods> + </interface> + + <interface name="Foo3" super="java/lang/Object"> + <implements> + <item>Foo</item> + </implements> + <methods> + <method type="default">bar</method> + </methods> + </interface> + <interface name="Fooer" super="java/lang/Object"> <implements> <item>Foo</item> diff --git a/test/960-default-smali/src2/Foo.java b/test/960-default-smali/src2/Foo.java new file mode 100644 index 0000000000..ed5b35f47b --- /dev/null +++ b/test/960-default-smali/src2/Foo.java @@ -0,0 +1,20 @@ +/* + * Copyright 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. + */ +interface Foo { + public default String bar() { + return "foobar"; + } +} diff --git a/test/960-default-smali/src2/Foo3.java b/test/960-default-smali/src2/Foo3.java new file mode 100644 index 0000000000..e96f98a48a --- /dev/null +++ b/test/960-default-smali/src2/Foo3.java @@ -0,0 +1,25 @@ +/* + * Copyright 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. + */ + +/** + * Regression test for b/31280371 + */ +interface Foo3 extends Foo { + @Override + public default String bar() { + return "I'm in conflict"; + } +} |