add iostream iterator test code