This repository was archived by the owner on Apr 13, 2023. It is now read-only.
Implement Summable, Invertible, Comparable for Duration#714
Open
dlkw wants to merge 4 commits intoeclipse-archived:masterfrom
Open
Implement Summable, Invertible, Comparable for Duration#714dlkw wants to merge 4 commits intoeclipse-archived:masterfrom
dlkw wants to merge 4 commits intoeclipse-archived:masterfrom
Conversation
Signed-off-by: Dirk Lattermann <dlkw@dlkw.de>
Contributor
|
Is the |
Contributor
Author
|
See the test module docs, so, yes. |
xkr47
suggested changes
Oct 8, 2018
| => assertEquals (Comparison.greater, Duration(3450) <=> Duration(456)); | ||
|
|
||
| shared test void testCompare() | ||
| => assertEquals (Comparison.equal, Duration(345) <=> Duration(346)); |
Contributor
There was a problem hiding this comment.
345 and 346 obviously should not be considered equal?
Contributor
Author
There was a problem hiding this comment.
Yes, of course not, at least not if it's milliseconds of a duration. 😃
Sorry—fixed.
Signed-off-by: Dirk Lattermann <dlkw@dlkw.de>
Contributor
Some of your tests have the |
luolong
reviewed
Oct 11, 2018
|
|
||
| shared actual Duration negated => Duration(milliseconds.negated); | ||
|
|
||
| shared actual Duration minus(Duration other) => Duration(milliseconds.minus(other.milliseconds)); |
Contributor
There was a problem hiding this comment.
Wouldn’t this be simpler to read:
milliseconds - other.milliseconds
Contributor
Author
There was a problem hiding this comment.
I wanted to make it visible that it just delegates to the corresponding method on the milliseconds, but I won't object changing it if you like. Should I?
Signed-off-by: Dirk Lattermann <dlkw@dlkw.de>
Signed-off-by: Dirk Lattermann <dlkw@dlkw.de>
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #713
Are tests in ceylon-sdk supposed to be running through? I could not get them to compile:
Signed-off-by: Dirk Lattermann dlkw@dlkw.de