-
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.
More integration tests for defaulted parameters (#12)
- Loading branch information
Showing
6 changed files
with
59 additions
and
7 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
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
4 changes: 2 additions & 2 deletions
4
...ation/model/DefaultParametersModel.ceylon → ...model/DefaultParametersConstructor.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
18 changes: 18 additions & 0 deletions
18
test/test/herd/depin/engine/integration/model/DefaultedParameterFunction.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,18 @@ | ||
shared class DefaultedParameterFunction(shared String fun()=> fixture.defaultedParameterFunction.param) { | ||
|
||
shared actual Boolean equals(Object that) { | ||
if (is DefaultedParameterFunction that) { | ||
return true; | ||
} | ||
else { | ||
return false; | ||
} | ||
} | ||
|
||
shared actual Integer hash { | ||
variable value hash = 1; | ||
return hash; | ||
} | ||
|
||
|
||
} |
15 changes: 15 additions & 0 deletions
15
test/test/herd/depin/engine/integration/model/DefaultedParametersByFunction.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,15 @@ | ||
shared class DefaultedParametersByFunction(shared String defaultedByFunction) { | ||
|
||
|
||
shared actual Boolean equals(Object that) { | ||
if (is DefaultedParametersByFunction that) { | ||
return defaultedByFunction==that.defaultedByFunction; | ||
} | ||
else { | ||
return false; | ||
} | ||
} | ||
|
||
shared actual Integer hash => defaultedByFunction.hash; | ||
|
||
} |
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