Re: Feedback to stdout when a specific unittest is run

2020-07-23 Thread Steven Schveighoffer via Digitalmars-d-learn

On 7/23/20 11:10 AM, Per Nordlöw wrote:
Is it possible to activate some feedback print to stdout when a unittest 
is started and ended to track which unittests that take the longest to 
execute?


Alternatively inject a hook being run before each test is run.


Yes, you can copy the code [1], and handle the unittest runtime yourself 
[2], putting in whatever outputs you wish.


-Steve

[1] 
https://github.com/dlang/druntime/blob/d19c70b6130d70e6d727cd573230e4519eb0ef55/src/core/runtime.d#L602-L641
[2] 
https://dlang.org/phobos/core_runtime.html#.Runtime.extendedModuleUnitTester


Re: Feedback to stdout when a specific unittest is run

2020-07-23 Thread Per Nordlöw via Digitalmars-d-learn

On Thursday, 23 July 2020 at 15:10:50 UTC, Per Nordlöw wrote:
Is it possible to activate some feedback print to stdout when a 
unittest is started and ended to track which unittests that 
take the longest to execute?


Alternatively inject a hook being run before each test is run.


I found https://code.dlang.org/packages/silly

Problem solved.


Feedback to stdout when a specific unittest is run

2020-07-23 Thread Per Nordlöw via Digitalmars-d-learn
Is it possible to activate some feedback print to stdout when a 
unittest is started and ended to track which unittests that take 
the longest to execute?


Alternatively inject a hook being run before each test is run.


Re: std/process.d: nothrow functions which throw (in struct ProcessPipes)

2020-07-23 Thread Drone1h via Digitalmars-d-learn
Steven Schveighoffer, Adam D. Ruppe, I wish to thank you both for 
your explanations ! I have understood and I have created a small 
test program. Indeed, at least on Windows, the destructor of an 
automatic struct does not seem to run.


Have a wonderful day... and I hope to be bugging the community 
again soon !


Re: Good way to send/receive UDP packets?

2020-07-23 Thread Kagamin via Digitalmars-d-learn

On Wednesday, 22 July 2020 at 16:14:24 UTC, wjoe wrote:
If you send a UDP datagram to a single address, however, it 
will still be delivered to every program on that PC which 
receives UDP datagrams from that port.


Normally binding two sockets to the same port is not allowed.