• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*******************************************************************************
2  * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
3  * This program and the accompanying materials are made available under
4  * the terms of the Eclipse Public License 2.0 which is available at
5  * http://www.eclipse.org/legal/epl-2.0
6  *
7  * SPDX-License-Identifier: EPL-2.0
8  *
9  * Contributors:
10  *    Evgeny Mandrikov - initial API and implementation
11  *
12  *******************************************************************************/
13 package org.jacoco.core.test.validation.java14;
14 
15 import org.jacoco.core.test.validation.Source.Line;
16 import org.jacoco.core.test.validation.ValidationTestBase;
17 import org.jacoco.core.test.validation.java14.targets.InstanceofTarget;
18 
19 /**
20  * Test of code coverage in {@link InstanceofTarget}.
21  */
22 public class InstanceofTest extends ValidationTestBase {
23 
InstanceofTest()24 	public InstanceofTest() {
25 		super(InstanceofTarget.class);
26 	}
27 
assertInstanceof(final Line line)28 	public void assertInstanceof(final Line line) {
29 		if (isJDKCompiler && JAVA_VERSION.isBefore("15")) {
30 			// https://bugs.openjdk.java.net/browse/JDK-8237528
31 			assertFullyCovered(line, 1, 3);
32 		} else {
33 			assertFullyCovered(line, 0, 2);
34 		}
35 	}
36 
37 }
38