diff options
Diffstat (limited to 'org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java')
-rw-r--r-- | org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java index 97b49e4b..372af224 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java +++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors + * Copyright (c) 2009, 2018 Mountainminds GmbH & Co. KG and Contributors * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -108,6 +108,15 @@ public class Stubs { } /** + * Throws a {@link RuntimeException} if given argument is <code>true</code>. + */ + public static void ex(boolean t) { + if (t) { + throw new StubException(); + } + } + + /** * Directly executes the given runnable. */ public static void exec(Runnable task) { |