From 8ffcb7144775ba0da65304c15d952ba7a1cb7da6 Mon Sep 17 00:00:00 2001 From: "Marc R. Hoffmann" Date: Wed, 20 Aug 2014 22:20:38 +0200 Subject: GitHub #232: Get code coverage for Java 8 lambda expressions --- .../src/org/jacoco/core/test/validation/targets/Stubs.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java') 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 fdea7858..f5179c63 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 @@ -104,4 +104,17 @@ public class Stubs { throw new StubException(); } + /** + * Directly executes the given runnable. + */ + public static void exec(Runnable task) { + task.run(); + } + + /** + * Never executes the given runnable. + */ + public static void noexec(Runnable task) { + } + } -- cgit v1.2.3