Bug 4808 - Commented out JUnit test failures (1GJ6EIU)
Summary: Commented out JUnit test failures (1GJ6EIU)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:23 EDT by Carolyn MacLeod CLA
Modified: 2005-06-22 14:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carolyn MacLeod CLA 2001-10-11 14:23:22 EDT
The following JUnit tests were commented out so that release engineering could run the tests
	without failures for the R1.0NL release.

	Each test needs to be re-evaluated and uncommented, with the appropriate fix in either the test, or SWT.

	1) Shell tests: anything to do with setSize or setBounds commented out due to fencepost tests failing.
		This is because Windows doesn't let you set the size of a shell larger than the screen.
		Should probably rewrite the tests so that it tests for setting larger than the screen, and
		passes if the getSize returns the size of the screen.

	2) Table.test_remove_6: commented out because Table.remove(int, int) should fail for negative arguments,
		but it isn't testing for them, so we are getting a bogus ArrayIndexOutOfBounds exception.
		Need to put a test in SWT Table.remove(int, int) to test for negative values and throw appropriate exception.

	3) TableColumn.test_getSetWidth: should not allow TableColumn width to be set to -1. SWT should throw an error
		if the value is -1. This value happens to correspond to a Windows constant that sets to a default width, so we
		are failing the "set to -1, is the width -1?" test because when we set to -1 windows sets to default width.
		Suggest adding the following to the Javadoc for the method TableColumn.setWidth:
				 * @exception IllegalArgumentException <ul>
				 *    <li>ERROR_INVALID_ARGUMENT - if the listener is null</li>
				 * </ul>
		and adding the following test after the call to checkWidget();
					if (width < 0) error (SWT.ERROR_INVALID_ARGUMENT);

	4) Table.test_remove_26 and test_remove_27: Table.remove(int, int) should test for negative values.
		These are the same problems as problem 2, above.
		Here is the code (to go right after checkWidget()):
				if (start < 0 || end < 0) {
					error (SWT.ERROR_INVALID_RANGE);
				}



NOTES:
Comment 1 DJ Houghton CLA 2001-10-29 16:40:08 EST
PRODUCT VERSION:
	R0.9

Comment 2 Carolyn MacLeod CLA 2002-06-06 18:43:49 EDT
Deferring until after 2.0 to fix the bugs in 2, 3, 4.
Comment 3 Veronika Irvine CLA 2002-09-10 10:22:30 EDT
Post 2.0. Re-opening bug reports for review.
Comment 4 Felipe Heidrich CLA 2004-06-28 11:21:38 EDT
I bet this problem is already fixed.
Anyway, lets wait for the NLS fragment for 3.0 to be available, run the tests 
and then close this pr.
Comment 5 Carolyn MacLeod CLA 2004-06-28 11:43:36 EDT
Agree. I changed version to 3.0 and priority to P3 (normal) so that it gets 
looked at early in the cycle. Thanks, Felipe.
Comment 6 Felipe Heidrich CLA 2005-06-22 14:48:34 EDT
I've verified that all these tests are working as expected.
Closing problem report.