*** empty log message ***
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 ca60401..ca20874 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 junit.framework.TestCase; +import org.eclipse.swt.SWT; import org.eclipse.swt.internal.*; import org.eclipse.test.performance.*; @@ -25,6 +26,8 @@ // 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 @@ } 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 50e0340c..3a6f612 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 @@ } 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_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 f60edda..a648b8f 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 @@ disposeMeter(meter); + if (isGTK) return; + count /= 10; Class printerClass = null; @@ -130,6 +132,8 @@ disposeMeter(meter); + if (isGTK) return; + count /= 10; Class printerClass = null; @@ -849,7 +853,7 @@ } 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_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 68e2b44..59ea08a 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_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_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_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);