Tests for _while algorithms.