mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-4187 java/awt/GraphicsDevice/DisplayModes/UnknownRefrshRateTest.java.UnknownRefrshRateTest fails on mac
Constrained display modes count used by the test
This commit is contained in:
@@ -33,6 +33,7 @@ import java.awt.GraphicsDevice;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
|
||||
public class UnknownRefrshRateTest {
|
||||
private static final int MAX_MODES = 10;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
@@ -50,7 +51,9 @@ public class UnknownRefrshRateTest {
|
||||
DisplayMode[] modes = d.getDisplayModes();
|
||||
System.out.println("There are " + modes.length + " modes.");
|
||||
try {
|
||||
for (int i=0; i<modes.length; i++) {
|
||||
int modesCount = modes.length < MAX_MODES ? modes.length : MAX_MODES;
|
||||
|
||||
for (int i=0; i<modesCount; i++) {
|
||||
DisplayMode mode = modes[i];
|
||||
System.out.println("copying from mode " + i + " : " + mode);
|
||||
int w = mode.getWidth();
|
||||
|
||||
Reference in New Issue
Block a user