mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
24 lines
619 B
Java
24 lines
619 B
Java
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
|
package com.jetbrains;
|
|
|
|
import com.intellij.openapi.util.SystemInfo;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import java.util.function.Supplier;
|
|
|
|
public enum TestEnv {
|
|
|
|
WINDOWS(() -> SystemInfo.isWindows), LINUX(() -> SystemInfo.isLinux), MAC(() -> SystemInfo.isMac);
|
|
|
|
@NotNull
|
|
private final Supplier<Boolean> myThisOs;
|
|
|
|
TestEnv(@NotNull final Supplier<Boolean> isThisOs) {
|
|
myThisOs = isThisOs;
|
|
}
|
|
|
|
public boolean isThisOs() {
|
|
return myThisOs.get();
|
|
}
|
|
}
|