See D19981. Make more of an effort to make sure that nothing unexpected-but-in-our-control can go awry here.
Details
Details
See unit tests.
Diff Detail
Diff Detail
- Repository
- rPHU libphutil
- Branch
- mfa25
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 21547 Build 29367: Run Core Tests Build 29366: arc lint + arc unit
Time | Test | |
---|---|---|
0 ms | FilesystemTestCase::Unknown Unit Message ("") EXCEPTION (RuntimeException): Use of undefined constant PHP_INT_MIN - assumed 'PHP_INT_MIN'
#0 /core/data/drydock/workingcopy-75/repo/libphutil/src/filesystem/__tests__/FilesystemTestCase.php(184): PhutilErrorHandler::handleError(8, 'Use of undefine...', '/core/data/dryd...', 184, Array)
#1 [internal function]: FilesystemTestCase->testRandomIntegers()
| |
1 ms | AbstractDirectedGraphTestCase::Unknown Unit Message ("") 2 assertions passed. | |
0 ms | AbstractDirectedGraphTestCase::Unknown Unit Message ("") 1 assertion passed. | |
0 ms | AbstractDirectedGraphTestCase::Unknown Unit Message ("") 1 assertion passed. | |
0 ms | AbstractDirectedGraphTestCase::Unknown Unit Message ("") 25 assertions passed. | |
View Full Test Results (1 Failed · 377 Passed · 3 Skipped) |
Event Timeline
Comment Actions
- Remove PHP_INT_MIN test that only works on PHP 7.0.0 or newer.
- Add a check for mt_getrandmax() before hitting the MT code.
src/filesystem/Filesystem.php | ||
---|---|---|
576–582 | This specific test came out of the "Notes" section in the mt_rand() documentation. I think the implementation is: generate a value, normalize it to [0, max - min], then add min -- so it's only the difference between min and max that matters, not the actual value of min or max. |