// Path: modules/api/src/main/java/javax/el/ELException.java
// public class ELException extends RuntimeException {
// 	private static final long serialVersionUID = 1L;
// 
// 	/**
// 	 * Creates an ELException with no detail message.
// 	 */
// 	public ELException() {
// 		super();
// 	}
// 
// 	/**
// 	 * Creates an ELException with the provided detail message.
// 	 * 
// 	 * @param message
// 	 *            the detail message
// 	 */
// 	public ELException(String message) {
// 		super(message);
// 	}
// 
// 	/**
// 	 * Creates an ELException with the given cause.
// 	 * 
// 	 * @param cause
// 	 *            the originating cause of this exception
// 	 */
// 	public ELException(Throwable cause) {
// 		super(cause);
// 	}
// 
// 	/**
// 	 * Creates an ELException with the given detail message and root cause.
// 	 * 
// 	 * @param message
// 	 *            the detail message
// 	 * @param cause
// 	 *            the originating cause of this exception
// 	 */
// 	public ELException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// }


import java.awt.Component;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.beans.PropertyChangeListener;
import java.beans.PropertyEditor;
import java.beans.PropertyEditorManager;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import javax.el.ELException;
import junit.framework.TestCase;


	static {
		PropertyEditorManager.registerEditor(Date.class, DateEditor.class);
	}
	
	/**
	 * Test enum type
	 */
	static enum Foo { BAR };
	
	TypeConverterImpl converter = new TypeConverterImpl();

	public void testToBoolean() {
		assertFalse(converter.coerceToBoolean(null));
		assertFalse(converter.coerceToBoolean(""));
		assertTrue(converter.coerceToBoolean(Boolean.TRUE));
		assertFalse(converter.coerceToBoolean(Boolean.FALSE));
		assertTrue(converter.coerceToBoolean("true"));
		assertFalse(converter.coerceToBoolean("false"));
		assertFalse(converter.coerceToBoolean("yes")); // Boolean.valueOf(String) never throws an exception...
	}

	public void testToCharacter() {
		assertEquals(Character.valueOf((char)0), converter.coerceToCharacter(null));
		assertEquals(Character.valueOf((char)0), converter.coerceToCharacter(""));
		Character c = Character.valueOf((char)99);
		assertSame(c, converter.coerceToCharacter(c));
		try {
			converter.coerceToCharacter(Boolean.TRUE);
			fail();

// Path: modules/api/src/main/java/javax/el/ELException.java
// public class ELException extends RuntimeException {
// 	private static final long serialVersionUID = 1L;
// 
// 	/**
// 	 * Creates an ELException with no detail message.
// 	 */
// 	public ELException() {
// 		super();
// 	}
// 
// 	/**
// 	 * Creates an ELException with the provided detail message.
// 	 * 
// 	 * @param message
// 	 *            the detail message
// 	 */
// 	public ELException(String message) {
// 		super(message);
// 	}
// 
// 	/**
// 	 * Creates an ELException with the given cause.
// 	 * 
// 	 * @param cause
// 	 *            the originating cause of this exception
// 	 */
// 	public ELException(Throwable cause) {
// 		super(cause);
// 	}
// 
// 	/**
// 	 * Creates an ELException with the given detail message and root cause.
// 	 * 
// 	 * @param message
// 	 *            the detail message
// 	 * @param cause
// 	 *            the originating cause of this exception
// 	 */
// 	public ELException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// }


// Path: modules/impl/src/test/java/de/odysseus/el/misc/TypeConverterImplTest.java
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.beans.PropertyChangeListener;
import java.beans.PropertyEditor;
import java.beans.PropertyEditorManager;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import javax.el.ELException;
import junit.framework.TestCase;


	static {
		PropertyEditorManager.registerEditor(Date.class, DateEditor.class);
	}
	
	/**
	 * Test enum type
	 */
	static enum Foo { BAR };
	
	TypeConverterImpl converter = new TypeConverterImpl();

	public void testToBoolean() {
		assertFalse(converter.coerceToBoolean(null));
		assertFalse(converter.coerceToBoolean(""));
		assertTrue(converter.coerceToBoolean(Boolean.TRUE));
		assertFalse(converter.coerceToBoolean(Boolean.FALSE));
		assertTrue(converter.coerceToBoolean("true"));
		assertFalse(converter.coerceToBoolean("false"));
		assertFalse(converter.coerceToBoolean("yes")); // Boolean.valueOf(String) never throws an exception...
	}

	public void testToCharacter() {
		assertEquals(Character.valueOf((char)0), converter.coerceToCharacter(null));
		assertEquals(Character.valueOf((char)0), converter.coerceToCharacter(""));
		Character c = Character.valueOf((char)99);
		assertSame(c, converter.coerceToCharacter(c));
		try {
			converter.coerceToCharacter(Boolean.TRUE);
			fail();

		} catch (ELException e) {}
