Added forloop tests and missing unit test.