fix toints unit test to avoid signed integer overflow