Proper handling of longs (and doubles) with tests