Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Conversation

@dlkw
Copy link
Contributor

@dlkw dlkw commented Oct 5, 2018

Implements #713

Are tests in ceylon-sdk supposed to be running through? I could not get them to compile:

[ceylon-compile] /home/d3/prj/ceylon/ceylon-sdk/test-source/test/ceylon/http/server/module.ceylon:13: error: cannot find module artifact 'npm:@angular/platform-browser-dynamic-2.0.0(.car|.jar)'
[ceylon-compile]     import io.netty "4.0.2.Final";
[ceylon-compile]     ^
[ceylon-compile]   due to connection error: Unknown suffix in @angular/platform-browser-dynamic
[ceylon-compile]   	- dependency tree: 'test.ceylon.http.server/1.3.4-SNAPSHOT' -> 'io.netty/4.0.2.Final' -> '@angular/platform-browser-dynamic/2.0.0'

Signed-off-by: Dirk Lattermann dlkw@dlkw.de

Signed-off-by: Dirk Lattermann <dlkw@dlkw.de>
@CPColin
Copy link
Contributor

CPColin commented Oct 6, 2018

Is the actual parameter supposed to come first in assertEquals?

@dlkw
Copy link
Contributor Author

dlkw commented Oct 6, 2018

See the test module docs, so, yes.

=> assertEquals (Comparison.greater, Duration(3450) <=> Duration(456));

shared test void testCompare()
=> assertEquals (Comparison.equal, Duration(345) <=> Duration(346));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

345 and 346 obviously should not be considered equal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, of course not, at least not if it's milliseconds of a duration. 😃
Sorry—fixed.

Signed-off-by: Dirk Lattermann <dlkw@dlkw.de>
@CPColin
Copy link
Contributor

CPColin commented Oct 10, 2018

See the test module docs, so, yes.

Some of your tests have the expected value first, instead of the actual value.


shared actual Duration negated => Duration(milliseconds.negated);

shared actual Duration minus(Duration other) => Duration(milliseconds.minus(other.milliseconds));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn’t this be simpler to read:

milliseconds - other.milliseconds

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

dlkw added 2 commits October 11, 2018 07:41
Signed-off-by: Dirk Lattermann <dlkw@dlkw.de>
Signed-off-by: Dirk Lattermann <dlkw@dlkw.de>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants