add ostream iterator test cpp