aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2019-04-17 14:03:00 +0200
committerEvgeny Mandrikov <mandrikov@gmail.com>2019-04-17 14:03:00 +0200
commita7b061c84cf0c6ee3fe46b381f191e72c55a0a9f (patch)
tree0edb761ddfa5b8bcccf1d5361a75b6aacc0dbef3
parente03e5bd026e7b89de1f9a5745483b4a052a59dd5 (diff)
downloadplatform_external_jacoco-a7b061c84cf0c6ee3fe46b381f191e72c55a0a9f.tar.gz
platform_external_jacoco-a7b061c84cf0c6ee3fe46b381f191e72c55a0a9f.tar.bz2
platform_external_jacoco-a7b061c84cf0c6ee3fe46b381f191e72c55a0a9f.zip
Add validation test for Kotlin callable references
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCallableReferenceTest.java26
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCallableReferenceTarget.kt32
2 files changed, 58 insertions, 0 deletions
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCallableReferenceTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCallableReferenceTest.java
new file mode 100644
index 00000000..321c717e
--- /dev/null
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCallableReferenceTest.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2019 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.kotlin;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.kotlin.targets.KotlinCallableReferenceTarget;
+
+/**
+ * Test of callable references.
+ */
+public class KotlinCallableReferenceTest extends ValidationTestBase {
+
+ public KotlinCallableReferenceTest() {
+ super(KotlinCallableReferenceTarget.class);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCallableReferenceTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCallableReferenceTarget.kt
new file mode 100644
index 00000000..fb032b4e
--- /dev/null
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCallableReferenceTarget.kt
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2019 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.kotlin.targets
+
+import org.jacoco.core.test.validation.targets.Stubs.nop
+
+/**
+ * Test target for callable references.
+ */
+object KotlinCallableReferenceTarget {
+
+ @JvmStatic
+ fun main(args: Array<String>) {
+
+ /*
+ anonymous class generated for callable reference is not marked as synthetic
+ https://youtrack.jetbrains.com/issue/KT-28453
+ */
+ nop(::main) // assertPartlyCovered(0, 0)
+
+ }
+
+}