3 ms·
Refactoring so that the class gets an istream or some other abstraction would be better, but when you can't change the code easily, "/dev/fd/<n>" can be an opti
by gpderetta 3y ago
Refactoring so that the class gets an istream or some other abstraction would be better, but when you can't change the code easily, "/dev/fd/<n>" can be an option on Linux and some other unices.
I have also seen horrific but effective test harness code that override open/close/read/write from libc.