test/: avoid integer overflow on 32 bit systems
Merge pull request #5360 from mschauer/fixtests

test/: avoid integer overflow on 32 bit systems