blob: c63cd46a45adfb9faa4fcea03e5158feb1b0e25c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.tests.junit;
import org.eclipse.swt.SWT;
/**
* Platform-specific constants used in SWT test cases.
*/
public class SwtJunit {
public static final String testFontName;
public final static boolean isWindows = SWT.getPlatform().startsWith("win32");
public final static boolean isCarbon = SWT.getPlatform().startsWith("carbon");
public final static boolean isMotif = SWT.getPlatform().equals("motif");
public final static boolean isGTK = SWT.getPlatform().equals("gtk");
public final static boolean isPhoton = SWT.getPlatform().equals("photon");
public final static boolean isLinux = System.getProperty("os.name").equals("Linux");
public final static boolean isAIX = System.getProperty("os.name").equals("AIX");
public final static boolean isSolaris = System.getProperty("os.name").equals("Solaris") || System.getProperty("os.name").equals("SunOS");
public final static boolean isHPUX = System.getProperty("os.name").equals("HP-UX");
static {
if (isMotif) {
testFontName = "misc-fixed";
}
else {
testFontName = "Helvetica";
}
}
}
|