forked from bazelbuild/rules_scala
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add validation test for groovy.transform.builder.Builder (bazelbuild#865
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
....validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyBuilderClassTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/******************************************************************************* | ||
* 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: | ||
* Jan Wloka - initial API and implementation | ||
* | ||
*******************************************************************************/ | ||
package org.jacoco.core.test.validation.groovy; | ||
|
||
import org.jacoco.core.test.validation.ValidationTestBase; | ||
import org.jacoco.core.test.validation.groovy.targets.GroovyBuilderClassTarget; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Test of class with {@link groovy.transform.builder.Builder} annotation. | ||
*/ | ||
public class GroovyBuilderClassTest extends ValidationTestBase { | ||
public GroovyBuilderClassTest() { | ||
super(GroovyBuilderClassTarget.class); | ||
} | ||
|
||
@Test | ||
public void test_method_count() { | ||
assertMethodCount(1); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyBuilderClassTarget.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/******************************************************************************* | ||
* 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: | ||
* Jan Wloka - initial API and implementation | ||
* | ||
*******************************************************************************/ | ||
package org.jacoco.core.test.validation.groovy.targets | ||
|
||
import groovy.transform.builder.Builder | ||
import groovy.transform.builder.SimpleStrategy | ||
|
||
@Builder(builderStrategy = SimpleStrategy) | ||
class GroovyBuilderClassTarget { // assertEmpty() | ||
|
||
String name // assertEmpty() | ||
|
||
static void main(String[] args) { | ||
new GroovyBuilderClassTarget() // assertFullyCovered() | ||
} | ||
} |