The individual tests shouldn't reseed the random number generator (other than for local debugging). Hardcoding a specific random seed here leads to this test (and all subsequent tests) not testing things randomly as intended, but always testing the same parameters.
Showing the changes to test/api/encode_decode_api_test.cpp (1 of 1 file). Show all
Unified · Split
| @@ -3463,7 +3463,6 @@ INSTANTIATE_TEST_CASE_P (EncodeDecodeTestAPIBase, EncodeTestAPI, · 3462 unmodified lines | ||
| 3463 | 3463 | ::testing::ValuesIn (kOptionParamArray)); |
| 3464 | 3464 | |
| 3465 | 3465 | TEST_P (EncodeTestAPI, SetEncOptionSize) { |
| 3466 | − srand(1002); | |
| 3467 | 3466 | EncodeOptionParam p = GetParam(); |
| 3468 | 3467 | FILE * pFile = NULL; |
| 3469 | 3468 | if (p.sFileSave != NULL && strlen(p.sFileSave) > 0) { |