jeffhao | 5d1ac92 | 2011-09-29 17:41:15 -0700 | [diff] [blame] | 1 | // Copyright 2007 The Android Open Source Project |
| 2 | |
| 3 | /** |
| 4 | * Test Java language asserts. |
| 5 | */ |
| 6 | public class Main { |
| 7 | public static void main(String[] args) { |
| 8 | assert true; |
| 9 | try { |
| 10 | assert false; |
Elliott Hughes | 745016f | 2012-01-26 15:24:13 -0800 | [diff] [blame^] | 11 | System.out.println("didn't assert (is '-ea' implemented?)"); |
jeffhao | 5d1ac92 | 2011-09-29 17:41:15 -0700 | [diff] [blame] | 12 | } catch (AssertionError ae) { |
| 13 | System.out.println("caught expected assert exception"); |
| 14 | } |
| 15 | } |
| 16 | } |