1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc
.squirreljme
.plugin
.multivm
;
12 import org
.gradle
.api
.Task
;
13 import org
.gradle
.api
.specs
.Spec
;
16 * Checks that there are tests.
20 public class CheckForTests
23 /** The source set to check. */
24 protected final String sourceSet
;
27 * Initializes the checker.
29 * @param __sourceSet The source set to check.
30 * @throws NullPointerException On null arguments.
33 public CheckForTests(String __sourceSet
)
34 throws NullPointerException
36 if (__sourceSet
== null)
37 throw new NullPointerException("NARG");
39 this.sourceSet
= __sourceSet
;
47 public boolean isSatisfiedBy(Task __task
)
49 return !VMHelpers
.runningTests(__task
.getProject(),
50 this.sourceSet
).tests
.isEmpty();