1/* 2******************************************************************************* 3* Copyright (C) 2005-2006, International Business Machines 4* Corporation and others. All Rights Reserved. 5******************************************************************************* 6*/ 7package com.ibm.icu.impl; 8 9// 1.3 compatibility layer 10public class Assert { 11 public static void fail(Exception e) { 12 fail(e.toString()); // can't wrap exceptions in jdk 1.3 13 } 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