View | Details | Raw Unified | Return to bug 254458 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/ercp/swt/core/tests/junit/junit-opt-core-win32.properties (-2 / +11 lines)
Lines 1-8 Link Here
1
# Identify tests that are optional.  These tests will be run, but any failures will
1
# Identify tests that are optional.  These tests will be run, but any failures and Errors will
2
# be ignored.  Errors will not be ignored.  Property values should be specified 
2
# be ignored. Property values should be specified 
3
# as follows:
3
# as follows:
4
#
4
#
5
#     className>>methodName=y
5
#     className>>methodName=y
6
# 
6
# 
7
#     org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Button>>test_getImage=y
7
#     org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Button>>test_getImage=y
8
#
8
#
9
10
#These failures appear to be an artifact of the testing methodology being used. 
11
#A stand-alone test (in which the user presses keys rather than using artificially 
12
#produced key events) can not re-create the problem. The programatic key event generation 
13
#apppears to have some timing problem and we can't determine whether this is in the test 
14
#case or in eSWT. But since this is not likely to be encountered in applications, 
15
#we will not continue working these defect.
16
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Combo>>test_verifyEvents=y
17
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Text>>test_verifyEvents=y
(-)src/org/eclipse/ercp/swt/core/tests/junit/junit-opt-core-nokiaseries80.properties (-2 / +2 lines)
Lines 1-5 Link Here
1
# Identify tests that are optional.  These tests will be run, but any failures will
1
# Identify tests that are optional.  These tests will be run, but any failures and Errors will
2
# be ignored.  Errors will not be ignored.  Property values should be specified 
2
# be ignored. Property values should be specified 
3
# as follows:
3
# as follows:
4
#
4
#
5
#     className>>methodName=y
5
#     className>>methodName=y
(-)src/org/eclipse/ercp/swt/core/tests/junit/junit-opt-core-wm2003.properties (-2 / +2 lines)
Lines 1-5 Link Here
1
# Identify tests that are optional.  These tests will be run, but any failures will
1
# Identify tests that are optional.  These tests will be run, but any failures and Errors will
2
# be ignored.  Errors will not be ignored.  Property values should be specified 
2
# be ignored. Property values should be specified 
3
# as follows:
3
# as follows:
4
#
4
#
5
#     className>>methodName=y
5
#     className>>methodName=y
(-)src/org/eclipse/ercp/swt/core/tests/junit/junit-opt-core-gtk.properties (-2 / +2 lines)
Lines 1-5 Link Here
1
# Identify tests that are optional.  These tests will be run, but any failures will
1
# Identify tests that are optional.  These tests will be run, but any failures and Errors will
2
# be ignored.  Errors will not be ignored.  Property values should be specified 
2
# be ignored. Property values should be specified 
3
# as follows:
3
# as follows:
4
#
4
#
5
#     className>>methodName=y
5
#     className>>methodName=y
(-)src/org/eclipse/ercp/swt/core/tests/junit/junit-opt-core-wince.properties (-3 / +12 lines)
Lines 1-5 Link Here
1
# Identify tests that are optional.  These tests will be run, but any failures will
1
# Identify tests that are optional.  These tests will be run, but any failures and Errors will
2
# be ignored.  Errors will not be ignored.  Property values should be specified 
2
# be ignored. Property values should be specified 
3
# as follows:
3
# as follows:
4
#
4
#
5
#     className>>methodName=y
5
#     className>>methodName=y
Lines 10-13 Link Here
10
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Shell>>test_getLocation=y
10
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Shell>>test_getLocation=y
11
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Shell>>test_setLocationII=y
11
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Shell>>test_setLocationII=y
12
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Shell>>test_setLocationLorg_eclipse_swt_graphics_Point=y
12
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Shell>>test_setLocationLorg_eclipse_swt_graphics_Point=y
13
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_graphics_Image>>test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageData=y
13
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_graphics_Image>>test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageData=y
14
15
#These failures appear to be an artifact of the testing methodology being used. 
16
#A stand-alone test (in which the user presses keys rather than using artificially 
17
#produced key events) can not re-create the problem. The programatic key event generation 
18
#apppears to have some timing problem and we can't determine whether this is in the test 
19
#case or in eSWT. But since this is not likely to be encountered in applications, 
20
#we will not continue working these defect.
21
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Combo>>test_verifyEvents=y
22
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Text>>test_verifyEvents=y
(-)src/org/eclipse/ercp/swt/core/tests/junit/SwtTestCase.java (-10 / +42 lines)
Lines 70-76 Link Here
70
	public static String[] transparentImageFilenames = new String[] {"transparent.png"};
70
	public static String[] transparentImageFilenames = new String[] {"transparent.png"};
71
	
71
	
72
	// specify reparentable platforms
72
	// specify reparentable platforms
73
	public static String[] reparentablePlatforms = new String[] {"win32", "gtk", "winCE", "wm2003"};
73
	public static String[] reparentablePlatforms = new String[] {"win32", "gtk", "winCE", "wm2003", "winCE5", "WM5Pro", "WM6Pro", "SP2003", "WM5Std", "WM6Std"};
74
	
74
	
75
	public static ResourceBundle optionalTests;
75
	public static ResourceBundle optionalTests;
76
	public static ResourceBundle configurationParms;
76
	public static ResourceBundle configurationParms;
Lines 91-96 Link Here
91
		pkgId = pkgId.substring(0,index);
91
		pkgId = pkgId.substring(0,index);
92
		
92
		
93
		String platform = SWT.getPlatform();
93
		String platform = SWT.getPlatform();
94
		System.out.println("Platform is " + platform);
94
		String platformWithoutSpaces = new String();
95
		String platformWithoutSpaces = new String();
95
		for (int i = 0; i < platform.length(); i++) {
96
		for (int i = 0; i < platform.length(); i++) {
96
			if (platform.charAt(i) != ' ') {
97
			if (platform.charAt(i) != ' ') {
Lines 305-316 Link Here
305
}
306
}
306
307
307
// copied exactly from junit.framework.TestCase so that it can be called from here even though private
308
// copied exactly from junit.framework.TestCase so that it can be called from here even though private
308
static private void failNotEquals(String message, Object expected, Object actual) {
309
//static private void failNotEquals(String message, Object expected, Object actual) {
309
	String formatted= "";
310
//	String formatted= "";
310
	if (message != null)
311
//	if (message != null)
311
		formatted= message+" ";
312
//		formatted= message+" ";
312
	fail(formatted+"expected:<"+expected+"> but was:<"+actual+">");
313
//	fail(formatted+"expected:<"+expected+"> but was:<"+actual+">");
313
}
314
//}
314
protected boolean isReparentablePlatform() {
315
protected boolean isReparentablePlatform() {
315
	String platform = SWT.getPlatform();
316
	String platform = SWT.getPlatform();
316
	for (int i=0; i<reparentablePlatforms.length; i++) {
317
	for (int i=0; i<reparentablePlatforms.length; i++) {
Lines 335-340 Link Here
335
		setUp();
336
		setUp();
336
		runTest();
337
		runTest();
337
	} catch (org.eclipse.swt.SWTError e) {
338
	} catch (org.eclipse.swt.SWTError e) {
339
		System.out.println("SWTerror");
338
		if (e.code == org.eclipse.swt.SWT.ERROR_NOT_IMPLEMENTED) {
340
		if (e.code == org.eclipse.swt.SWT.ERROR_NOT_IMPLEMENTED) {
339
			warnUnimplAPI("");
341
			warnUnimplAPI("");
340
		} else {
342
		} else {
Lines 343-362 Link Here
343
	} catch (AssertionFailedError e1) {
345
	} catch (AssertionFailedError e1) {
344
		try {
346
		try {
345
			String failure = this.getClass().getName()+">>"+getName();
347
			String failure = this.getClass().getName()+">>"+getName();
348
			//if optionalTests is null, that means this failure is not ignored in original suite, thus directly
349
			//throws the AssertionFailedError
346
			if (optionalTests != null) {
350
			if (optionalTests != null) {
347
				optionalTests.getString(failure);
351
				//if optionalTests is not null, it will check whether this corresponding test case is ignored in 
352
				//original suite. if yes, it will print out the corresponding message. if not, it will throws 
353
				//AssertionFailedError
354
				if (optionalTests.getString(failure).equalsIgnoreCase("y")){
355
					System.out.println(failure+" >> "+e1.getMessage()+">> failure >> is ignored in original suite");
356
				}else{
357
					throw(e1);
358
				}
348
			} else {
359
			} else {
349
				throw(e1);
360
				throw(e1);
350
			}
361
			}
351
		} catch (MissingResourceException e2) {
362
		} catch (MissingResourceException e2) {
352
			throw(e1);
363
			throw(e1);
353
		}
364
		}
354
	} finally {
365
	//Runtime Exception and Error will cause junit test producing errors	
366
	} catch (Throwable e) {
367
		try {
368
			String err = this.getClass().getName()+">>"+getName();
369
			//if optionalTests is null, that means this error is not ignored in original suite, thus directly
370
			//throws the Exception
371
			if (optionalTests != null) {
372
				//if optionalTests is not null, it will check whether this corresponding test case is ignored in 
373
				//original suite. if yes, it will print out the corresponding message. if not, it will throws 
374
				//Exception
375
				if(optionalTests.getString(err).equalsIgnoreCase("y")){
376
					System.out.println(err+" >> "+e.getMessage()+">> error >> is ignored in original suite");
377
				}else{
378
					throw(e);
379
				}
380
			} else {
381
				throw(e);
382
			}
383
		}catch (MissingResourceException e2) {
384
			throw(e);
385
		}
386
	}finally {
355
		tearDown();
387
		tearDown();
356
		Display d = Display.getCurrent();
388
		Display d = Display.getCurrent();
357
		if (d!=null) {
389
		if (d!=null) {
358
		    d.dispose();
390
		    d.dispose();
359
		}
391
		}
360
	}
392
	}
361
};
362
}
393
}
394
}
(-).classpath (-4 / +2 lines)
Lines 2-10 Link Here
2
<classpath>
2
<classpath>
3
	<classpathentry kind="src" path="src"/>
3
	<classpathentry kind="src" path="src"/>
4
	<classpathentry kind="src" path="/org.eclipse.ercp.swt.core.win"/>
4
	<classpathentry kind="src" path="/org.eclipse.ercp.swt.core.win"/>
5
	<classpathentry kind="var" path="JUNIT_HOME/junit.jar"/>
5
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
6
	<classpathentry sourcepath="IVEHOME/lib/charconv-src.zip" kind="var" path="IVEHOME/lib/charconv.zip"/>
6
	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
7
	<classpathentry sourcepath="IVEHOME/lib/jclFoundation10/source/source.zip" kind="var" path="IVEHOME/lib/jclFoundation10/classes.zip"/>
8
	<classpathentry sourcepath="IVEHOME/lib/jclFoundation10/source/locale-src.zip" kind="var" path="IVEHOME/lib/jclFoundation10/locale.zip"/>
9
	<classpathentry kind="output" path="bin"/>
7
	<classpathentry kind="output" path="bin"/>
10
</classpath>
8
</classpath>
(-).project (-1 / +1 lines)
Lines 1-6 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<projectDescription>
2
<projectDescription>
3
	<name>org.eclipse.eswt.core.tests</name>
3
	<name>org.eclipse.ercp.swt.core.tests</name>
4
	<comment></comment>
4
	<comment></comment>
5
	<projects>
5
	<projects>
6
		<project>org.eclipse.swt</project>
6
		<project>org.eclipse.swt</project>
(-)src/org/eclipse/ercp/swt/core/tests/junit/configuration-core-wm6pro.properties (+7 lines)
Added Link Here
1
# Identify configuration parameters for running the core junit tests
2
3
# PPC soft keyboard does not properly support DEL key event generation
4
delKeySupported=false
5
# on some platforms, a special echo char is used, so make this configurable
6
echoCharValue=
7
(-)src/org/eclipse/ercp/swt/core/tests/junit/junit-opt-core-wm6pro.properties (+17 lines)
Added Link Here
1
# Identify tests that are optional.  These tests will be run, but any failures and Errors will
2
# be ignored. Property values should be specified 
3
# as follows:
4
#
5
#     className>>methodName=y
6
# 
7
#     org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TreeItem>>test_getGrayed=y
8
9
# WM 5 & 6 Pro
10
#These failures appear to be an artifact of the testing methodology being used. 
11
#A stand-alone test (in which the user presses keys rather than using artificially 
12
#produced key events) can not re-create the problem. The programatic key event generation 
13
#apppears to have some timing problem and we can't determine whether this is in the test 
14
#case or in eSWT. But since this is not likely to be encountered in applications, 
15
#we will not continue working these defect.
16
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Combo>>test_verifyEvents=y
17
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Text>>test_verifyEvents=y
(-)src/org/eclipse/ercp/swt/core/tests/junit/configuration-core-wm6std.properties (+7 lines)
Added Link Here
1
# Identify configuration parameters for running the core junit tests
2
3
# PPC soft keyboard does not properly support DEL key event generation
4
delKeySupported=false
5
# on some platforms, a special echo char is used, so make this configurable
6
echoCharValue=
7
(-)src/org/eclipse/ercp/swt/core/tests/junit/junit-opt-core-wm6std.properties (+16 lines)
Added Link Here
1
# Identify tests that are optional.  These tests will be run, but any failures and Errors will
2
# be ignored. Property values should be specified 
3
# as follows:
4
#
5
#     className>>methodName=y
6
# 
7
#     org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_TreeItem>>test_getGrayed=y
8
9
#These failures appear to be an artifact of the testing methodology being used. 
10
#A stand-alone test (in which the user presses keys rather than using artificially 
11
#produced key events) can not re-create the problem. The programatic key event generation 
12
#apppears to have some timing problem and we can't determine whether this is in the test 
13
#case or in eSWT. But since this is not likely to be encountered in applications, 
14
#we will not continue working these defect.
15
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Combo>>test_verifyEvents=y
16
org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_widgets_Text>>test_verifyEvents=y

Return to bug 254458