diff options
| author | Nick Kralevich <nnk@google.com> | 2012-08-06 13:53:20 -0700 |
|---|---|---|
| committer | Nick Kralevich <nnk@google.com> | 2012-08-06 13:54:05 -0700 |
| commit | ff92aa74c133fd4abe30f97e6849e80db29af253 (patch) | |
| tree | b7dffa6f62b28c0e01c4421067a9fd062f0a5bda /core/java/android/test/AndroidTestCase.java | |
| parent | bec1d13da2ef3c8c2c4cc4f740474d095068bd8b (diff) | |
Show more info when a testcase fails.
Change-Id: I5aa6967981824f3291daef915453fe7420cfed9e
Diffstat (limited to 'core/java/android/test/AndroidTestCase.java')
| -rw-r--r-- | core/java/android/test/AndroidTestCase.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/test/AndroidTestCase.java b/core/java/android/test/AndroidTestCase.java index 1015506ba227..0c8cbe639615 100644 --- a/core/java/android/test/AndroidTestCase.java +++ b/core/java/android/test/AndroidTestCase.java @@ -135,7 +135,8 @@ public class AndroidTestCase extends TestCase { fail("expected SecurityException requiring " + permission); } catch (SecurityException expected) { assertNotNull("security exception's error message.", expected.getMessage()); - assertTrue("error message should contain " + permission + ".", + assertTrue("error message should contain \"" + permission + "\". Got: \"" + + expected.getMessage() + "\".", expected.getMessage().contains(permission)); } } |
