diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:28:47 -0800 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:28:47 -0800 |
| commit | f6c387128427e121477c1b32ad35cdcaa5101ba3 (patch) | |
| tree | 2aa25fa8c8c3a9caeecf98fd8ac4cd9b12717997 /tests/038-inner-null | |
| parent | f72d5de56a522ac3be03873bdde26f23a5eeeb3c (diff) | |
| download | android_dalvik-f6c387128427e121477c1b32ad35cdcaa5101ba3.tar.gz android_dalvik-f6c387128427e121477c1b32ad35cdcaa5101ba3.tar.bz2 android_dalvik-f6c387128427e121477c1b32ad35cdcaa5101ba3.zip | |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'tests/038-inner-null')
| -rw-r--r-- | tests/038-inner-null/expected.txt | 5 | ||||
| -rw-r--r-- | tests/038-inner-null/info.txt | 6 | ||||
| -rw-r--r-- | tests/038-inner-null/src/Main.java | 27 |
3 files changed, 38 insertions, 0 deletions
diff --git a/tests/038-inner-null/expected.txt b/tests/038-inner-null/expected.txt new file mode 100644 index 000000000..0be8ffdc4 --- /dev/null +++ b/tests/038-inner-null/expected.txt @@ -0,0 +1,5 @@ +new Special() +java.lang.NullPointerException + at Main$Special.callInner(Main.java:17) + at Main.main(Main.java:6) + at dalvik.system.NativeStart.main(Native Method) diff --git a/tests/038-inner-null/info.txt b/tests/038-inner-null/info.txt new file mode 100644 index 000000000..08127da23 --- /dev/null +++ b/tests/038-inner-null/info.txt @@ -0,0 +1,6 @@ +This is a miscellaneous test that was imported into the new-at-the-time +runtime test framework. The test is intended to exercise basic features, +and as such cannot be build on top of junit, since failure of such basic +features might disrupt junit. + +TODO: Real description goes here. diff --git a/tests/038-inner-null/src/Main.java b/tests/038-inner-null/src/Main.java new file mode 100644 index 000000000..acc87640b --- /dev/null +++ b/tests/038-inner-null/src/Main.java @@ -0,0 +1,27 @@ +// Copyright 2008 The Android Open Source Project + +public class Main { + public static void main(String[] args) { + Special special = new Special(); + special.callInner(); + } + + public static class Special { + Blort mBlort = null; + + Special() { + System.out.println("new Special()"); + } + + public void callInner() { + mBlort.repaint(); + } + } + + private class Blort { + public void repaint() { + System.out.println("shouldn't see this"); + } + } + +} |
