Printer printer = new Printer(); GC gc1 = new GC(printer); GC gc2 = new GC(printer);
printerClass = Class.forName("org.eclipse.swt.printing.Printer"); } catch (ClassNotFoundException e) {  return; } try {   Object printer = printerClass.newInstance(); GC gc1 = new GC((Printer) printer); GC gc2 = new GC((Printer) printer);
public void test_ConstructorLorg_eclipse_swt_graphics_Drawable() {	try {		GC gc = new GC(null);		gc.dispose();		fail("No exception thrown for drawable == null");	} catch (IllegalArgumentException e) {		assertEquals("Incorrect exception thrown for drawable == null", SWT.ERROR_NULL_ARGUMENT, e);	}	try {		Image image = new Image(display, 10, 10);		GC gc1 = new GC(image);		GC gc2 = new GC(image);		gc1.dispose();		gc2.dispose();		image.dispose();		fail("No exception thrown for more than one GC on one image");	} catch (IllegalArgumentException e) {		assertEquals("Incorrect exception thrown for more than one GC on one image", SWT.ERROR_INVALID_ARGUMENT, e);	}	try {		Printer printer = new Printer();		GC gc1 = new GC(printer);		GC gc2 = new GC(printer);		gc1.dispose();		gc2.dispose();		printer.dispose();		fail("No exception thrown for more than one GC on one printer");	} catch (IllegalArgumentException e) {		assertEquals("Incorrect exception thrown for more than one GC on one printer", SWT.ERROR_INVALID_ARGUMENT, e);	}}