summaryrefslogtreecommitdiffstats
path: root/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_situational.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_situational.java')
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_situational.java64
1 files changed, 32 insertions, 32 deletions
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_situational.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_situational.java
index d7e2568df7..8dcf8fc062 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_situational.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_situational.java
@@ -60,7 +60,7 @@ public void test_createComposites() {
PerformanceMeter meter = createMeter("Create composites");
int samples;
- Performance performance = Performance.getDefault();
+ Performance.getDefault();
// Warm up.
for(samples = 0; samples < 2; samples++) {
@@ -68,11 +68,11 @@ public void test_createComposites() {
for (int i = 0; i < 100; i++) {
Composite c = new Composite(shell, SWT.NONE);
for (int j = 0; j < 10; j++) {
- Composite c2 = new Composite(c, SWT.NONE);
+ new Composite(c, SWT.NONE);
}
}
shell.dispose();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
}
for(samples = 0; samples < 100; samples++) {
@@ -81,12 +81,12 @@ public void test_createComposites() {
for (int i = 0; i < 100; i++) {
Composite c = new Composite(shell, SWT.NONE);
for (int j = 0; j < 50; j++) {
- Composite c2 = new Composite(c, SWT.NONE);
+ new Composite(c, SWT.NONE);
}
}
meter.stop();
shell.dispose();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
}
disposeMeter(meter);
}
@@ -105,24 +105,24 @@ public void test_createWidgets() {
for (int i = 0; i < 50; i++) {
Composite c = new Composite(shell, SWT.NONE);
for (int j = 0; j < 10; j++) {
- Button b = new Button(c, SWT.PUSH);
- Label label = new Label(c, SWT.NONE);
- Scale scale = new Scale(c, SWT.NONE);
- ProgressBar bar = new ProgressBar(c, SWT.NONE);
- List list = new List(c, SWT.NONE);
- Text text = new Text(c, SWT.SINGLE);
- Text multitext = new Text(c, SWT.MULTI);
- Slider slider = new Slider(c, SWT.NONE);
- Tree tree = new Tree(c, SWT.NONE);
- Table table = new Table(c, SWT.NONE);
- TabFolder tabFolder = new TabFolder(c, SWT.NONE);
- Group g = new Group(c, SWT.BORDER);
- Composite c2 = new Composite(c, SWT.NONE);
+ new Button(c, SWT.PUSH);
+ new Label(c, SWT.NONE);
+ new Scale(c, SWT.NONE);
+ new ProgressBar(c, SWT.NONE);
+ new List(c, SWT.NONE);
+ new Text(c, SWT.SINGLE);
+ new Text(c, SWT.MULTI);
+ new Slider(c, SWT.NONE);
+ new Tree(c, SWT.NONE);
+ new Table(c, SWT.NONE);
+ new TabFolder(c, SWT.NONE);
+ new Group(c, SWT.BORDER);
+ new Composite(c, SWT.NONE);
}
}
meter.stop();
shell.dispose();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
}
disposeMeter(meter);
}
@@ -194,9 +194,9 @@ public void test_layout() {
changedLabel.setLayoutData(data);
shell.open();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
try { Thread.sleep(2000); } catch (Exception e) {}
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
meter.start();
for(int numlayouts = 0; numlayouts < 20; numlayouts++) {
shell.layout(true);
@@ -206,7 +206,7 @@ public void test_layout() {
}
meter.stop();
shell.dispose();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
}
disposeMeter(meter);
}
@@ -240,7 +240,7 @@ public void test_imageDrawing() {
image.dispose();
color1.dispose();
color2.dispose();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
}
disposeMeter(meter);
}
@@ -261,9 +261,9 @@ public void test_windowDrawing() {
c.setLayoutData(data);
shell.pack();
shell.open();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
try { Thread.sleep(2000); } catch (Exception e) {}
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
Color color1 = new Color(display, 0xff, 0, 0xff);
Color color2 = new Color(display, 0, 0xff, 0xff);
int x1 = 0, y1 = height/2, x2 = width/2, y2 = 0;
@@ -285,7 +285,7 @@ public void test_windowDrawing() {
shell.dispose();
color1.dispose();
color2.dispose();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
}
disposeMeter(meter);
}
@@ -306,9 +306,9 @@ public void test_stringDrawing() {
c.setLayoutData(data);
shell.pack();
shell.open();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
try { Thread.sleep(2000); } catch (Exception e) {}
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
Color color1 = new Color(display, 0xff, 0, 0xff);
Color color2 = new Color(display, 0, 0xff, 0xff);
Font font1 = new Font(display, "Helvetica", 20, SWT.NONE);
@@ -333,7 +333,7 @@ public void test_stringDrawing() {
color2.dispose();
font1.dispose();
font2.dispose();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
}
disposeMeter(meter);
}
@@ -354,9 +354,9 @@ public void test_fastStringDrawing() {
c.setLayoutData(data);
shell.pack();
shell.open();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
try { Thread.sleep(2000); } catch (Exception e) {}
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
Color color1 = new Color(display, 0xff, 0, 0xff);
Color color2 = new Color(display, 0, 0xff, 0xff);
Font font1 = new Font(display, "Helvetica", 20, SWT.NONE);
@@ -380,7 +380,7 @@ public void test_fastStringDrawing() {
color2.dispose();
font1.dispose();
font2.dispose();
- while(display.readAndDispatch());
+ while(display.readAndDispatch()){/*empty*/}
}
disposeMeter(meter);
}