blob: bb1e59fc1dedb98feadb95543c80758638b51da7 [file] [log] [blame]
// Copyright (c) 2020, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.utils;
import java.util.function.Supplier;
public class AssertionUtils {
public static boolean assertNotNull(Object o) {
assert o != null;
return true;
}
public static boolean forTesting(InternalOptions options, Supplier<Boolean> test) {
return options.testing.enableTestAssertions ? test.get() : true;
}
}