Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLakshmi Shanmugam2018-04-06 07:12:23 +0000
committerAlexander Kurtakov2018-04-24 18:48:21 +0000
commitd3da5c5ceec7fff7568841d9eb69a77433b7dac6 (patch)
tree4f2388fae5076362ee08f1074c8b18c17ea2c0a0 /tests
parentecb072664278dc6cfba0ce56ea06e669e0675959 (diff)
downloadeclipse.platform.swt-d3da5c5ceec7fff7568841d9eb69a77433b7dac6.tar.gz
eclipse.platform.swt-d3da5c5ceec7fff7568841d9eb69a77433b7dac6.tar.xz
eclipse.platform.swt-d3da5c5ceec7fff7568841d9eb69a77433b7dac6.zip
Bug 480639: Provide monitor-specific DPI scaling / zoom level
Added JUnit test for Monitor.getZoom() API Change-Id: I67430320238f6ba6ea0a16001a260537e4385f34
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Monitor.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Monitor.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Monitor.java
index b30b837c6a..58579583c6 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Monitor.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Monitor.java
@@ -11,6 +11,7 @@
*******************************************************************************/
package org.eclipse.swt.tests.junit;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -73,6 +74,16 @@ public void test_getClientArea() {
}
@Test
+public void test_getZoom() {
+ int zoom = primary.getZoom();
+ assertNotEquals(0, zoom);
+ for (int i = 0; i < monitors.length; i++) {
+ zoom = monitors[i].getZoom();
+ assertNotEquals(0, zoom);
+ }
+}
+
+@Test
public void test_hashCode() {
for (int i = 0; i < monitors.length; i++) {
if (primary.equals(monitors[i])) {

Back to the top