The same way you test for leap-year bugs, write unit-tested code that tests all your boundary conditions.
Very different than something which only happens after 50 days because obviously in small intervals it's not a noticeable bug.
But more to the point - the consumers of GetTickTime should have also had tests to verify that the consuming code appropriately handles time rollovers.
Granted, this was Win95 so I'll cut them some slack, but that should be standard procedure for any code that consumes an incrementing counter API. First question should always be - 'how will this code handle a rollover value'?