Main.java revision a5a184892e60a89b564ca7c74e50b2ecb27d9f80
1// Copyright 2007 The Android Open Source Project 2 3/** 4 * Test Java language asserts. 5 */ 6public 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 // exercise this code path 17 ClassLoader.getSystemClassLoader().setDefaultAssertionStatus(true); 18 } 19} 20