testlib icon indicating copy to clipboard operation
testlib copied to clipboard

force register* before actually using input and output streams

Open GassaFM opened this issue 8 years ago • 2 comments

If one forgets registerTestlibCmd or the like, the input and output streams are in some unspecified state. It would save developer time to have a clear error when such stream is used before registering.

GassaFM avatar Aug 21 '17 11:08 GassaFM

One way to do it is to use macros for register* commands which change streams' internal state. Another approach is to initialize the streams with something bad which, when used, manifests clearly and immediately.

GassaFM avatar Aug 21 '17 11:08 GassaFM

And if one forgets to register generator, then random seed seems to not be set from cmd arguments. As a result, stress-testing with such generator may be a waste of time.

stgatilov avatar Nov 12 '18 15:11 stgatilov

Fixed ages ago

MikeMirzayanov avatar Sep 28 '23 20:09 MikeMirzayanov