| 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; | ||||
| 11 | System.out.println("GLITCH: didn't assert (is '-ea' set?)"); | ||||
| 12 | } catch (AssertionError ae) { | ||||
| 13 | System.out.println("caught expected assert exception"); | ||||
| 14 | } | ||||
| 15 | } | ||||
| 16 | } | ||||