-
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.
Unit tests for target annotations selection, workaround for ceylon bug …
- Loading branch information
Showing
7 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
test/test/herd/depin/engine/ceylon/AnnotationsFromConstructorParameter.ceylon
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,21 @@ | ||
import ceylon.test { | ||
test, | ||
ignore | ||
} | ||
shared class ConstructorTestClass{ | ||
String param; | ||
shared new (String param){ | ||
this.param = param;} | ||
} | ||
|
||
shared class AnnotationsFromConstructorParameter() { | ||
|
||
ignore | ||
shared test void shouldGetAnnotationsFromConstructorParameter(){ | ||
assert (exists constructor = `class ConstructorTestClass`.defaultConstructor); | ||
assert(exists param=constructor.parameterDeclarations.first); | ||
assert(param.annotations<Annotation>().empty); | ||
} | ||
|
||
|
||
} |
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 @@ | ||
shared package test.herd.depin.engine.ceylon; |
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
7 changes: 7 additions & 0 deletions
7
test/test/herd/depin/engine/integration/dependencies/targetedConstructorDependencies.ceylon
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,7 @@ | ||
import test.herd.depin.engine.integration.model { | ||
fixture | ||
} | ||
import herd.depin.engine { | ||
dependency | ||
} | ||
shared dependency String something =fixture.targetWithTwoCallableConstructors.param; |
17 changes: 17 additions & 0 deletions
17
test/test/herd/depin/engine/integration/model/TargetWithTwoCallableConstructors.ceylon
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,17 @@ | ||
import herd.depin.engine { | ||
target, | ||
named | ||
} | ||
shared class TargetWithTwoCallableConstructors { | ||
|
||
shared String something; | ||
shared new (String something){ | ||
this.something = something; | ||
|
||
} | ||
|
||
shared target new targetedConstructor(named("Abc") String something){ | ||
this.something=something.reversed; | ||
} | ||
|
||
} |
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