| /******************************************************************************* |
| * Copyright (c) 2006, 2010 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.draw2d.test; |
| |
| public class ColorConstantTest extends AbstractFixtureTestCase { |
| |
| public void test_ColorConstantInit() { |
| final Boolean result[] = new Boolean[2]; |
| result[0] = Boolean.FALSE; |
| result[1] = Boolean.FALSE; |
| |
| Thread testThread = new Thread() { |
| public void run() { |
| try { |
| Class.forName("org.eclipse.draw2d.ColorConstants"); |
| result[0] = Boolean.TRUE; |
| } catch (Error e) { |
| result[0] = Boolean.FALSE; |
| } catch (Exception ex) { |
| result[0] = Boolean.FALSE; |
| } |
| |
| result[1] = Boolean.TRUE; |
| } |
| }; |
| |
| testThread.start(); |
| |
| while (!result[1].booleanValue()) { |
| display.readAndDispatch(); |
| } |
| |
| assertTrue(result[0].booleanValue()); |
| |
| } |
| } |