Added foreach_reverse test cases