test code for the layout iterator