Community
Participate
Working Groups
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:
PRODUCT VERSION: R0.9
Deferring until after 2.0 to fix the bugs in 2, 3, 4.
Post 2.0. Re-opening bug reports for review.
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.
Agree. I changed version to 3.0 and priority to P3 (normal) so that it gets looked at early in the cycle. Thanks, Felipe.
I've verified that all these tests are working as expected. Closing problem report.