Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/org.eclipse.jface.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Import-Package: org.junit.jupiter.api;version="[5.14.0,6.0.0)",
org.junit.jupiter.api.function;version="[5.14.0,6.0.0)",
org.junit.platform.commons.function;version="[1.14.0,2.0.0)",
org.junit.platform.suite.api;version="[1.14.0,2.0.0)",
org.opentest4j;version="1.3.0",
org.osgi.framework
Export-Package: org.eclipse.jface.tests.fieldassist;x-internal:=true,
org.eclipse.jface.tests.preferences;x-internal:=true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

package org.eclipse.jface.tests.labelProviders;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;

import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
Expand Down Expand Up @@ -83,21 +83,21 @@ public void testColorsAndFonts() {
Table table = (Table) fViewer.getControl();
TableItem item = table.getItem(0);

assertEquals("Background was not set", item.getBackground(0), background);
assertEquals("Foreground was not set", item.getForeground(0), foreground);
assertEquals("Font was not set", item.getFont(0), font);
assertEquals(background, item.getBackground(0), "Background was not set");
assertEquals(foreground, item.getForeground(0), "Foreground was not set");
assertEquals(font, item.getFont(0), "Font was not set");

Font oldFont = font;

clearColors();
fViewer.refresh(item.getData());

Display display = table.getDisplay();
assertEquals("Background was not cleared", item.getBackground(0),
display.getSystemColor(SWT.COLOR_LIST_BACKGROUND));
assertEquals("Foreground was not cleared", item.getForeground(0),
display.getSystemColor(SWT.COLOR_LIST_FOREGROUND));
assertNotEquals("Font was not cleared", item.getFont(0).getFontData()[0], oldFont.getFontData()[0]);
assertEquals(display.getSystemColor(SWT.COLOR_LIST_BACKGROUND), item.getBackground(0),
"Background was not cleared");
assertEquals(display.getSystemColor(SWT.COLOR_LIST_FOREGROUND), item.getForeground(0),
"Foreground was not cleared");
assertNotEquals(oldFont.getFontData()[0], item.getFont(0).getFontData()[0], "Font was not cleared");

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

package org.eclipse.jface.tests.labelProviders;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;

import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
Expand Down Expand Up @@ -91,21 +91,21 @@ public void testColorsAndFonts() {
Table table = (Table) fViewer.getControl();
TableItem item = table.getItem(0);

assertEquals("Background was not set", item.getBackground(0), background);
assertEquals("Foreground was not set", item.getForeground(0), foreground);
assertEquals("Font was not set", item.getFont(0), font);
assertEquals(background, item.getBackground(0), "Background was not set");
assertEquals(foreground, item.getForeground(0), "Foreground was not set");
assertEquals(font, item.getFont(0), "Font was not set");

Font oldFont = font;

clearColors();
fViewer.refresh(item.getData());

Display display = table.getDisplay();
assertEquals("Background was not cleared", item.getBackground(0),
display.getSystemColor(SWT.COLOR_LIST_BACKGROUND));
assertEquals("Foreground was not cleared", item.getForeground(0),
display.getSystemColor(SWT.COLOR_LIST_FOREGROUND));
assertNotEquals("Font was not cleared", item.getFont(0).getFontData()[0], oldFont.getFontData()[0]);
assertEquals(display.getSystemColor(SWT.COLOR_LIST_BACKGROUND), item.getBackground(0),
"Background was not cleared");
assertEquals(display.getSystemColor(SWT.COLOR_LIST_FOREGROUND), item.getForeground(0),
"Foreground was not cleared");
assertNotEquals(oldFont.getFontData()[0], item.getFont(0).getFontData()[0], "Font was not cleared");

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package org.eclipse.jface.tests.labelProviders;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
Expand Down Expand Up @@ -80,9 +80,9 @@ public void testColorsAndFonts() {
Table table = (Table) fViewer.getControl();
TableItem item = table.getItem(0);

assertEquals("Background was not set", item.getBackground(0), background);
assertEquals("Foreground was not set", item.getForeground(0), foreground);
assertEquals("Font was not set", item.getFont(0), font);
assertEquals(background, item.getBackground(0), "Background was not set");
assertEquals(foreground, item.getForeground(0), "Foreground was not set");
assertEquals(font, item.getFont(0), "Font was not set");

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
*******************************************************************************/
package org.eclipse.jface.tests.labelProviders;

import org.junit.runner.JUnitCore;

import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;

Expand All @@ -25,8 +23,4 @@
IDecorationContextTest.class })
public class DecoratingLabelProviderTests {

public static void main(String[] args) {
JUnitCore.main(DecoratingLabelProviderTests.class.getName());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package org.eclipse.jface.tests.labelProviders;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
Expand Down Expand Up @@ -85,9 +85,9 @@ public void testColorsAndFonts() {
Tree tree = (Tree) fViewer.getControl();
TreeItem item = tree.getItem(0);

assertEquals("Background was not set", item.getBackground(0), background);
assertEquals("Foreground was not set", item.getForeground(0), foreground);
assertEquals("Font was not set", item.getFont(0), font);
assertEquals(background, item.getBackground(0), "Background was not set");
assertEquals(foreground, item.getForeground(0), "Foreground was not set");
assertEquals(font, item.getFont(0), "Font was not set");

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package org.eclipse.jface.tests.labelProviders;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IColorProvider;
Expand Down Expand Up @@ -74,9 +74,9 @@ public void testColorsAndFonts() {
Tree tree = (Tree) fViewer.getControl();
TreeItem item = tree.getItem(0);

assertEquals("Background was not set", item.getBackground(0), background);
assertEquals("Foreground was not set", item.getForeground(0), foreground);
assertEquals("Font was not set", item.getFont(0), font);
assertEquals(background, item.getBackground(0), "Background was not set");
assertEquals(foreground, item.getForeground(0), "Foreground was not set");
assertEquals(font, item.getFont(0), "Font was not set");

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

package org.eclipse.jface.tests.labelProviders;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNotSame;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

import org.eclipse.core.runtime.AssertionFailedException;
import org.eclipse.jface.resource.JFaceResources;
Expand Down
Loading
Loading