test while with assignation in condition