Home | History | Annotate | Download | only in src
      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         // exercise this code path
     17         ClassLoader.getSystemClassLoader().setDefaultAssertionStatus(true);
     18     }
     19 }
     20