diff options
author | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2018-08-02 21:56:26 +0200 |
---|---|---|
committer | Evgeny Mandrikov <Godin@users.noreply.github.com> | 2018-08-02 21:56:26 +0200 |
commit | b2c5ff73d24cc0c57f308f046de008568068b4c8 (patch) | |
tree | ede5f93173e1a7f9fc7fe8300b2ba94040a8a46c /org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java | |
parent | 65d1aea1bd0f85f8be9bbc5076b7191515fe5f39 (diff) | |
download | platform_external_jacoco-b2c5ff73d24cc0c57f308f046de008568068b4c8.tar.gz platform_external_jacoco-b2c5ff73d24cc0c57f308f046de008568068b4c8.tar.bz2 platform_external_jacoco-b2c5ff73d24cc0c57f308f046de008568068b4c8.zip |
Reorganize validation test packages (#716)
* Use module names as package names
* Merge previously separate filter validation tests
* Move non-version specific tests to org.jacoco.core.test
Diffstat (limited to 'org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java')
-rw-r--r-- | org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java new file mode 100644 index 00000000..bac69f81 --- /dev/null +++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Evgeny Mandrikov - initial API and implementation + * + *******************************************************************************/ +package org.jacoco.core.test.validation.java8.targets; + +import org.jacoco.core.test.validation.targets.Stubs; + +public class BadCycleInterfaceTarget { + + public interface Base { + static final Object BASE_CONST = new Child() { + { + Stubs.logEvent("baseclinit"); // $line-baseclinit$ + } + }.childDefaultMethod(); + + default void baseDefaultMethod() { + } + } + + public interface Child extends Base { + static final Object CHILD_CONST = new Object() { + { + Stubs.logEvent("childclinit"); // $line-childclinit$ + } + }; + + default Object childDefaultMethod() { + Stubs.logEvent("childdefaultmethod"); // $line-childdefault$ + return null; + } + + static void childStaticMethod() { + Stubs.logEvent("childstaticmethod"); // $line-childstatic$ + } + } + + public static void main(String[] args) { + Child.childStaticMethod(); + } + +} |