Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrey Loskutov2017-02-21 06:58:44 +0000
committerNiraj Modi2017-02-21 06:58:44 +0000
commit5909628e5fc5f3a5bb64c71b94a81803e36cd71b (patch)
tree578192da0a38695632c2073aaf8e657ed8ccec22 /tests
parent39b7853d7f96da18ea54bb0b2cfb7cedc605fe35 (diff)
downloadeclipse.platform.swt-5909628e5fc5f3a5bb64c71b94a81803e36cd71b.tar.gz
eclipse.platform.swt-5909628e5fc5f3a5bb64c71b94a81803e36cd71b.tar.xz
eclipse.platform.swt-5909628e5fc5f3a5bb64c71b94a81803e36cd71b.zip
Bug 511718 - tests for new CTabFolder.set/getHighlightEnabled API Added
tests for CTabFolder.setHighlightEnabled(boolean) and CTabFolder.getHighlightEnabled() Change-Id: I073178cc42f48e21d13532bfc50beac35c4d2c69 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java
index 0640de4191..03e583675f 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,6 +11,9 @@
package org.eclipse.swt.tests.junit;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
import java.util.ArrayList;
import java.util.List;
@@ -135,4 +138,13 @@ public void test_consistency_DragDetect () {
consistencyEvent(50, 5, 70, 10, ConsistencyUtility.MOUSE_DRAG, events);
}
+@Test
+public void test_setHighlightEnabled () {
+ assertTrue("By default, highlighting should be enabled", ctabFolder.getHighlightEnabled());
+ ctabFolder.setHighlightEnabled(false);
+ assertFalse(ctabFolder.getHighlightEnabled());
+ ctabFolder.setHighlightEnabled(true);
+ assertTrue(ctabFolder.getHighlightEnabled());
+}
+
}

Back to the top