summaryrefslogtreecommitdiffstats
path: root/dx/tests/073-dex-null-array-refs
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:14 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:14 -0800
commitf72d5de56a522ac3be03873bdde26f23a5eeeb3c (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /dx/tests/073-dex-null-array-refs
parent31e30105703263782efd450d356cd67ea01af3b7 (diff)
downloadandroid_dalvik-f72d5de56a522ac3be03873bdde26f23a5eeeb3c.tar.gz
android_dalvik-f72d5de56a522ac3be03873bdde26f23a5eeeb3c.tar.bz2
android_dalvik-f72d5de56a522ac3be03873bdde26f23a5eeeb3c.zip
auto import from //depot/cupcake/@135843
Diffstat (limited to 'dx/tests/073-dex-null-array-refs')
-rw-r--r--dx/tests/073-dex-null-array-refs/Blort.java73
-rw-r--r--dx/tests/073-dex-null-array-refs/expected.txt85
-rw-r--r--dx/tests/073-dex-null-array-refs/info.txt7
-rw-r--r--dx/tests/073-dex-null-array-refs/run19
4 files changed, 0 insertions, 184 deletions
diff --git a/dx/tests/073-dex-null-array-refs/Blort.java b/dx/tests/073-dex-null-array-refs/Blort.java
deleted file mode 100644
index b6678c0b2..000000000
--- a/dx/tests/073-dex-null-array-refs/Blort.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2007 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 class Blort
-{
- public static Object test1() {
- return ((Object[]) null)[0];
- }
-
- public static void test2() {
- ((Object[]) null)[0] = null;
- }
-
- public static int test3() {
- return ((Object[]) null).length;
- }
-
- public static Object test4() {
- Object[] arr = null;
- return arr[0];
- }
-
- public static void test5() {
- Object[] arr = null;
- arr[0] = null;
- }
-
- public static int test6() {
- Object[] arr = null;
- return arr.length;
- }
-
- public static Object test7(Object[] arr) {
- if (check()) {
- arr = null;
- }
-
- return arr[0];
- }
-
- public static void test8(Object[] arr) {
- if (check()) {
- arr = null;
- }
-
- arr[0] = null;
- }
-
- public static int test9(Object[] arr) {
- if (check()) {
- arr = null;
- }
-
- return arr.length;
- }
-
- public static boolean check() {
- return true;
- }
-}
diff --git a/dx/tests/073-dex-null-array-refs/expected.txt b/dx/tests/073-dex-null-array-refs/expected.txt
deleted file mode 100644
index 7f3ee21b0..000000000
--- a/dx/tests/073-dex-null-array-refs/expected.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-Blort.test1:()Ljava/lang/Object;:
-regs: 0002; ins: 0000; outs: 0000
- 0000: const/4 v0, #null // #0
- 0001: check-cast v0, java.lang.Object[]
- 0003: const/4 v1, #int 0 // #0
- 0004: aget-object v0, v0, v1
- 0006: return-object v0
-Blort.test2:()V:
-regs: 0003; ins: 0000; outs: 0000
- 0000: const/4 v0, #null // #0
- 0001: check-cast v0, java.lang.Object[]
- 0003: const/4 v1, #int 0 // #0
- 0004: const/4 v2, #null // #0
- 0005: aput-object v2, v0, v1
- 0007: return-void
-Blort.test3:()I:
-regs: 0001; ins: 0000; outs: 0000
- 0000: const/4 v0, #null // #0
- 0001: check-cast v0, java.lang.Object[]
- 0003: array-length v0, v0
- 0004: return v0
-Blort.test4:()Ljava/lang/Object;:
-regs: 0003; ins: 0000; outs: 0000
- 0000: const/4 v1, #null // #0
- 0001: move-object v0, v1
- 0002: move-object v1, v0
- 0003: const/4 v2, #int 0 // #0
- 0004: aget-object v1, v1, v2
- 0006: move-object v0, v1
- 0007: return-object v0
-Blort.test5:()V:
-regs: 0004; ins: 0000; outs: 0000
- 0000: const/4 v1, #null // #0
- 0001: move-object v0, v1
- 0002: move-object v1, v0
- 0003: const/4 v2, #int 0 // #0
- 0004: const/4 v3, #null // #0
- 0005: aput-object v3, v1, v2
- 0007: return-void
-Blort.test6:()I:
-regs: 0002; ins: 0000; outs: 0000
- 0000: const/4 v1, #null // #0
- 0001: move-object v0, v1
- 0002: move-object v1, v0
- 0003: array-length v1, v1
- 0004: move v0, v1
- 0005: return v0
-Blort.test7:([Ljava/lang/Object;)Ljava/lang/Object;:
-regs: 0004; ins: 0001; outs: 0000
- 0000: move-object v0, v3
- 0001: invoke-static {}, Blort.check:()Z
- 0004: move-result v1
- 0005: if-eqz v1, 0009 // +0004
- 0007: const/4 v1, #null // #0
- 0008: move-object v0, v1
- 0009: move-object v1, v0
- 000a: const/4 v2, #int 0 // #0
- 000b: aget-object v1, v1, v2
- 000d: move-object v0, v1
- 000e: return-object v0
-Blort.test8:([Ljava/lang/Object;)V:
-regs: 0005; ins: 0001; outs: 0000
- 0000: move-object v0, v4
- 0001: invoke-static {}, Blort.check:()Z
- 0004: move-result v1
- 0005: if-eqz v1, 0009 // +0004
- 0007: const/4 v1, #null // #0
- 0008: move-object v0, v1
- 0009: move-object v1, v0
- 000a: const/4 v2, #int 0 // #0
- 000b: const/4 v3, #null // #0
- 000c: aput-object v3, v1, v2
- 000e: return-void
-Blort.test9:([Ljava/lang/Object;)I:
-regs: 0003; ins: 0001; outs: 0000
- 0000: move-object v0, v2
- 0001: invoke-static {}, Blort.check:()Z
- 0004: move-result v1
- 0005: if-eqz v1, 0009 // +0004
- 0007: const/4 v1, #null // #0
- 0008: move-object v0, v1
- 0009: move-object v1, v0
- 000a: array-length v1, v1
- 000b: move v0, v1
- 000c: return v0
diff --git a/dx/tests/073-dex-null-array-refs/info.txt b/dx/tests/073-dex-null-array-refs/info.txt
deleted file mode 100644
index ca3b161b7..000000000
--- a/dx/tests/073-dex-null-array-refs/info.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-This is a smoke test of dex conversion, which checks to see that
-a bunch of cases convert reasonably, where necessarily or possibly
-null array references are used.
-
-This test compares emitted code against a known-good (via eyeballing)
-version, so it is possible for this test to spuriously fail if other
-aspects of conversion end up altering the output in innocuous ways.
diff --git a/dx/tests/073-dex-null-array-refs/run b/dx/tests/073-dex-null-array-refs/run
deleted file mode 100644
index 52f113167..000000000
--- a/dx/tests/073-dex-null-array-refs/run
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2007 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.
-
-$JAVAC -d . Blort.java
-dx --debug --dex --no-optimize --positions=none --no-locals \
- --dump-method=Blort.test'*' *.class