Fixed signed/unsigned conversion in some tests