Ronald, static cast from size_t to int can truncate, perhaps better to upcast from int to size_t. Either way there is a signedness difference though. Best solution will depend on the exact code.
Regarding tests, yes, there are some currently, I mean we can contribute more tests, including some that lead to unexpected/undesired failure.
Sean