diff options
7 files changed, 162 insertions, 0 deletions
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml index d8fb3d95..8c579afa 100644 --- a/org.jacoco.build/pom.xml +++ b/org.jacoco.build/pom.xml @@ -267,6 +267,7 @@ <exclude>**/*.java</exclude> <exclude>**/*.kt</exclude> <exclude>**/*.groovy</exclude> + <exclude>**/*.scala</exclude> <exclude>**/*.properties</exclude> </excludes> </resource> @@ -570,6 +571,7 @@ <fileset dir="${basedir}" includes="**/*.java,**/*.xml,**/*.bsh" excludes="target/**,.idea/**,nb-configuration.xml" id="missinglicense.fileset"> <include name="**/*.kt"/> <include name="**/*.groovy"/> + <include name="**/*.scala"/> <not> <and> <contains text="Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors"/> diff --git a/org.jacoco.core.test.validation.scala/.classpath b/org.jacoco.core.test.validation.scala/.classpath new file mode 100644 index 00000000..ebe550b7 --- /dev/null +++ b/org.jacoco.core.test.validation.scala/.classpath @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/classes" path="src"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/org.jacoco.core.test.validation.scala/.project b/org.jacoco.core.test.validation.scala/.project new file mode 100644 index 00000000..b742da86 --- /dev/null +++ b/org.jacoco.core.test.validation.scala/.project @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.jacoco.core.test.validation.scala</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> + <linkedResources> + <link> + <name>.settings</name> + <type>2</type> + <locationURI>PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings</locationURI> + </link> + </linkedResources> +</projectDescription> diff --git a/org.jacoco.core.test.validation.scala/pom.xml b/org.jacoco.core.test.validation.scala/pom.xml new file mode 100644 index 00000000..ea859ef8 --- /dev/null +++ b/org.jacoco.core.test.validation.scala/pom.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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 +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.jacoco</groupId> + <artifactId>org.jacoco.core.test.validation</artifactId> + <version>0.8.5-SNAPSHOT</version> + <relativePath>../org.jacoco.core.test.validation</relativePath> + </parent> + + <artifactId>org.jacoco.core.test.validation.scala</artifactId> + + <name>JaCoCo :: Test :: Core :: Validation Scala</name> + + <properties> + <bytecode.version>6</bytecode.version> + </properties> + + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>org.jacoco.core.test</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + <version>2.12.8</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>net.alchim31.maven</groupId> + <artifactId>scala-maven-plugin</artifactId> + <version>4.0.2</version> + <executions> + <execution> + <id>compile</id> + <phase>process-sources</phase> + <goals> + <goal>compile</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSingletonObjectTest.java b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSingletonObjectTest.java new file mode 100644 index 00000000..ec9c1913 --- /dev/null +++ b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSingletonObjectTest.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.scala; + +import org.jacoco.core.test.validation.ValidationTestBase; +import org.jacoco.core.test.validation.scala.targets.ScalaSingletonObjectTarget; + +/** + * Test of singleton object. + */ +public class ScalaSingletonObjectTest extends ValidationTestBase { + + public ScalaSingletonObjectTest() { + super(ScalaSingletonObjectTarget.class); + } + +} diff --git a/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSingletonObjectTarget.scala b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSingletonObjectTarget.scala new file mode 100644 index 00000000..49623f88 --- /dev/null +++ b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSingletonObjectTarget.scala @@ -0,0 +1,22 @@ +/******************************************************************************* + * 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.scala.targets + +/** + * This test target is singleton object. + */ +object ScalaSingletonObjectTarget { // assertFullyCovered() + + def main(args: Array[String]): Unit = { // assertFullyCovered() + } // assertEmpty() + +} diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml index 33a52611..34e55ef9 100644 --- a/org.jacoco.core.test.validation/pom.xml +++ b/org.jacoco.core.test.validation/pom.xml @@ -135,6 +135,7 @@ <module>../org.jacoco.core.test.validation.java7</module> <module>../org.jacoco.core.test.validation.java8</module> <module>../org.jacoco.core.test.validation.groovy</module> + <module>../org.jacoco.core.test.validation.scala</module> </modules> </profile> |