Ticket #8336: io.cpp.patch
File io.cpp.patch, 1.1 KB (added by , 10 years ago) |
---|
-
io.cpp
73 73 BOOST_TEST (os2.str() == std::string("(TUPU:HUPU:LUPU:4.5)") ); 74 74 } 75 75 76 { 77 useThisOStringStream os2; 78 // Set format (a:b:c) for os2; 79 os2 << tuple_open('('); 80 os2 << tuple_close(')'); 81 os2 << tuple_delimiter(':'); 82 // overwrite previous setting 83 os2 << tuple_open("< "); 84 os2 << tuple_close('>'); 85 os2 << tuple_delimiter(", "); 86 87 os2 << make_vector("TUPU", "HUPU", "LUPU", 4.5); 88 BOOST_TEST (os2.str() == std::string("< TUPU, HUPU, LUPU, 4.5>") ); 89 } 90 76 91 // The format is still [a, b, c] for os1 77 92 os1 << make_vector(1, 2, 3); 78 93 BOOST_TEST (os1.str() == std::string("[1,2,3][1,2,3]") ); … … 103 118 useThisIStringStream is("(100 200 300)"); 104 119 105 120 vector<int, int, int> ti; 106 BOOST_TEST( bool(is >> ti) != 0);121 BOOST_TEST((is >> ti) != 0); 107 122 BOOST_TEST(ti == make_vector(100, 200, 300)); 108 123 109 124 // Note that strings are problematic: