client/cpp/encoder_unittest.cc
// We need the same "random" inputs to the IRR
// each time to have reproducible tests.
We need the same "random" inputs to the IRR
each time to have reproducible tests.
We need the same " random " inputs to the IRR each time to have reproducible tests .
FILE* mock_urandom(void) {
 int i;
 FILE *fp;
 fp = tmpfile();
 for (i = 0; i < 1024; i++) {
   fputc((i * 17) % 256, fp);
 }
 fflush(fp);
 fp = freopen(NULL, "r", fp);
 return fp;
}
FILE * mock_urandom ( void ) { int i ; FILE * fp ; fp = tmpfile ( ) ; for ( i = 0 ; i < 1024 ; i ++ ) { fputc ( ( i * 17 ) % 256 , fp ) ; } fflush ( fp ) ; fp = freopen ( NULL , " " , fp ) ; return fp ; }
We need the same "random" inputs to the IRR
each time to have reproducible tests.
We need the same " random " inputs to the IRR each time to have reproducible tests .