blob: 59ec6390121e3052c634708f16126197681ca176 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
/*******************************************************************************
* Copyright (c) 2009, 2016 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;
import org.jacoco.core.analysis.ICounter;
import org.jacoco.core.test.validation.targets.BadCycleInterface;
import org.junit.Test;
/**
* Test of "bad cycles" with interfaces.
*/
public class BadCycleInterfaceTest extends ValidationTestBase {
public BadCycleInterfaceTest() throws Exception {
super("src-java8", BadCycleInterface.class);
}
@Test
public void test() throws Exception {
if (System.getProperty("java.version").startsWith("9-ea")) {
// JDK-9042842
assertLine("baseclinit", ICounter.EMPTY);
assertLine("childdefault", ICounter.NOT_COVERED);
} else {
assertLine("baseclinit", ICounter.FULLY_COVERED);
assertLine("childdefault", ICounter.FULLY_COVERED);
}
assertLine("childclinit", ICounter.FULLY_COVERED);
assertLine("childstatic", ICounter.FULLY_COVERED);
}
}
|