diff options
author | Grant Gayed | 2005-01-13 22:13:22 +0000 |
---|---|---|
committer | Grant Gayed | 2005-01-13 22:13:22 +0000 |
commit | 02a6cf62a41dc29a1bb37e280adbd40cfc9bdff8 (patch) | |
tree | 9cee7496b9275140c9c556bccc9051462161dc49 | |
parent | 36cc032b729eb35b9727bbb6e737fff737396ad2 (diff) | |
download | eclipse.platform.swt-02a6cf62a41dc29a1bb37e280adbd40cfc9bdff8.tar.gz eclipse.platform.swt-02a6cf62a41dc29a1bb37e280adbd40cfc9bdff8.tar.xz eclipse.platform.swt-02a6cf62a41dc29a1bb37e280adbd40cfc9bdff8.zip |
*** empty log message ***v3114for30b
4 files changed, 17 insertions, 8 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/SwtPerformanceTestCase.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/SwtPerformanceTestCase.java index ca604013a1..ca208740d4 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/SwtPerformanceTestCase.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/SwtPerformanceTestCase.java @@ -16,6 +16,7 @@ import java.net.URL; import junit.framework.TestCase; +import org.eclipse.swt.SWT; import org.eclipse.swt.internal.*; import org.eclipse.test.performance.*; @@ -25,6 +26,8 @@ public class SwtPerformanceTestCase extends TestCase { // be written to System.out public static boolean verbose = false; + public final static boolean isGTK = SWT.getPlatform().equals("gtk"); + // allow specific image formats to be tested public static String[] imageFormats = new String[] {"bmp", "jpg", "gif", "png"}; public static String[] imageFilenames = new String[] {"folder", "folderOpen", "target"}; @@ -70,7 +73,7 @@ protected String getPath(String fileName) { } if (File.separatorChar != '/') urlPath = urlPath.replace('/', File.separatorChar); - if (urlPath.indexOf(File.separatorChar) == 0) urlPath = urlPath.substring(1); +// if (urlPath.indexOf(File.separatorChar) == 0) urlPath = urlPath.substring(1); urlPath = urlPath.replaceAll("%20", " "); if (verbose) { diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Color.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Color.java index 50e0340c1b..3a6f612498 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Color.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Color.java @@ -38,7 +38,8 @@ protected void setUp() throws Exception { } public void test_ConstructorLorg_eclipse_swt_graphics_DeviceIII() { - final int COUNT = 3000000; + // adding 500000 to either of these cause OOM + final int COUNT = isGTK ? 1500000 : 3000000; Color[] colors = new Color [COUNT]; @@ -57,7 +58,8 @@ public void test_ConstructorLorg_eclipse_swt_graphics_DeviceIII() { } public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_RGB() { - final int COUNT = 3000000; // 3500000 causes OOM + // adding 500000 to either of these cause OOM + final int COUNT = isGTK ? 1500000 : 3000000; Color[] colors = new Color [COUNT]; RGB rgb = new RGB(102, 255, 3); diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_GC.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_GC.java index f60eddad5f..a648b8fd39 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_GC.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_GC.java @@ -72,6 +72,8 @@ public void test_ConstructorLorg_eclipse_swt_graphics_Drawable() { disposeMeter(meter); + if (isGTK) return; + count /= 10; Class printerClass = null; @@ -130,6 +132,8 @@ public void test_ConstructorLorg_eclipse_swt_graphics_DrawableI() { disposeMeter(meter); + if (isGTK) return; + count /= 10; Class printerClass = null; @@ -849,7 +853,7 @@ public void test_fillArcIIIIII() { } public void test_fillGradientRectangleIIIIZ() { - final int COUNT = 500000; + final int COUNT = 250000; // precompute points Rectangle bounds = gc.getClipping(); @@ -996,7 +1000,7 @@ public void test_fillRoundRectangleIIIIII() { } public void test_getAdvanceWidthC() { - final int COUNT = 2200000; + final int COUNT = 2000000; PerformanceMeter meter = createMeter("GC getAdvanceWidthC"); meter.start(); diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_widgets_Control.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_widgets_Control.java index 68e2b443b3..59ea08a4b7 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_widgets_Control.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_widgets_Control.java @@ -714,7 +714,7 @@ public void test_removeTraverseListenerLorg_eclipse_swt_events_TraverseListener( } public void test_setBackgroundLorg_eclipse_swt_graphics_Color() { - final int COUNT = 2000000; + final int COUNT = isGTK ? 20000 : 2000000; Color red = control.getDisplay().getSystemColor(SWT.COLOR_RED); Color blue = control.getDisplay().getSystemColor(SWT.COLOR_BLUE); @@ -850,7 +850,7 @@ public void test_setFocus() { } public void test_setFontLorg_eclipse_swt_graphics_Font() { - final int COUNT = 800000; + final int COUNT = isGTK ? 200000 : 800000; Font font1 = control.getFont(); FontData[] data = font1.getFontData(); @@ -876,7 +876,7 @@ public void test_setFontLorg_eclipse_swt_graphics_Font() { } public void test_setForegroundLorg_eclipse_swt_graphics_Color() { - final int COUNT = 2000000; + final int COUNT = isGTK ? 20000 : 2000000; Color red = control.getDisplay().getSystemColor(SWT.COLOR_RED); Color blue = control.getDisplay().getSystemColor(SWT.COLOR_BLUE); |