| Summary: | ToolBar getRowCount() returns 1 failing Unit Test (AllTests) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Anatoly Spektor <spektor.anatoly> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | akurtakov, ericwill |
| Version: | 4.3 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Anatoly, the thing is on other platforms Toolbars can wrap and the test is good there. (In reply to comment #1) > Anatoly, the thing is on other platforms Toolbars can wrap and the test is > good there. Ok got it, thanks! But shouldn't the Assert method be guarded with flag defining on what platform it should run ? Any update on this, can I close this bug? (In reply to Eric Williams from comment #3) > Any update on this, can I close this bug? Closing. |
After running Unit tests (AllTests) one of the failures I see is: Test_org_eclipse_swt_widgets_ToolBar .getRowCount() public void test_getRowCount() { toolBar = new ToolBar(shell, SWT.WRAP); int number = 5; ToolItem[] items = new ToolItem[number]; for (int i = 0; i<number ; i++){ items[i] = new ToolItem(toolBar, 0); } assertTrue(":a:" + toolBar.getRowCount(), toolBar.getRowCount()==number); //???? because of Size(0, 0); ..... } Assert is failing due to getRowCount always return 1: ToolBar.getRowCount(): public int getRowCount () { checkWidget(); /* On GTK, toolbars cannot wrap */ return 1; } I think either Assert should be "== 1" or getRowCount() should have some kind of implementation for Wrap. Would be great to get feedback on this. Thanks!