1 7 package com.ibm.icu.impl; 8 9 public class Assert { 11 public static void fail(Exception e) { 12 fail(e.toString()); } 14 public static void fail(String msg) { 15 throw new IllegalStateException ("failure '" + msg + "'"); 16 } 17 public static void assrt(boolean val) { 18 if (!val) throw new IllegalStateException ("assert failed"); 19 } 20 public static void assrt(String msg, boolean val) { 21 if (!val) throw new IllegalStateException ("assert '" + msg + "' failed"); 22 } 23 } 24 | Popular Tags |