-
-
Notifications
You must be signed in to change notification settings - Fork 747
More removal of version(unittest) #6453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -122,14 +122,10 @@ else | |
|
|
||
| version(unittest) | ||
| { | ||
| static assert(is(uint32_t == uint)); | ||
| static assert(is(uint16_t == ushort)); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note, |
||
|
|
||
| import std.stdio : writefln; | ||
|
|
||
| // Print a message on exception instead of failing the unittest. | ||
| private void softUnittest(void delegate() @safe test, int line = __LINE__) @trusted | ||
| { | ||
| import std.stdio : writefln; | ||
| try | ||
| test(); | ||
| catch (Throwable e) | ||
|
|
@@ -454,6 +450,7 @@ class Protocol | |
| version(CRuntime_Bionic) {} else | ||
| @safe unittest | ||
| { | ||
| // import std.stdio : writefln; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| softUnittest({ | ||
| Protocol proto = new Protocol; | ||
| assert(proto.getProtocolByType(ProtocolType.TCP)); | ||
|
|
@@ -555,6 +552,7 @@ class Service | |
|
|
||
| @safe unittest | ||
| { | ||
| import std.stdio : writefln; | ||
| softUnittest({ | ||
| Service serv = new Service; | ||
| if (serv.getServiceByName("epmap", "tcp")) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting a trusted function like this in the global namespace is not a good idea.