Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] mac os x port: Tree/TreeItem junit tests

Hi,

today I verified my native implementation of Tree/TreeItem using the junit test suite.
In the Tree test ran into two problems (TreeItem is another story ;-):

1. The test "isReparentable" fails, since in the SwtJunit class there is no flag "isCarbon" to ensure the reparentable feature is not available (isReparentable returns false in ControlĀ“s mac implementation).


The test in "isReparentable" (in the test for Control) is:
public
void test_isReparentable() {
if (SwtJunit.isWindows) {
assertTrue(control.isReparentable());
} else {
assertTrue(!control.isReparentable());
}

The flag "isWindows" in SwtJunit is defined as:
public final static boolean isMotif = isLinux || isAIX;
public final static boolean isWindows = !isMotif;


2. The test "setSelection" / "getSelection" expects a certain order of the selected items.
a. In the javadoc for getSelection no particular order is mentioned. Is the order of any significance?
b. What is this order supposed to look like, if there is one?
c. The order of returned items is tested for a flat tree only. How does the order look like in a hierarchical tree with subtrees opened?


I still have to deal with some redraw issues, otherwise the Tree seems to be quite complete.


martin

Back to the top