mirror of
				https://github.com/fmtlib/fmt.git
				synced 2025-11-03 23:51:41 +01:00 
			
		
		
		
	Replace operator<< with write function
This commit is contained in:
		@@ -60,7 +60,9 @@ TEST(StringBufferTest, MoveTo) {
 | 
			
		||||
 | 
			
		||||
TEST(StringWriterTest, MoveTo) {
 | 
			
		||||
  fmt::StringWriter out;
 | 
			
		||||
  out << "The answer is " << 42 << "\n";
 | 
			
		||||
  out.write("The answer is ");
 | 
			
		||||
  out.write(42);
 | 
			
		||||
  out.write("\n");
 | 
			
		||||
  std::string s;
 | 
			
		||||
  out.move_to(s);
 | 
			
		||||
  EXPECT_EQ("The answer is 42\n", s);
 | 
			
		||||
@@ -69,7 +71,9 @@ TEST(StringWriterTest, MoveTo) {
 | 
			
		||||
 | 
			
		||||
TEST(StringWriterTest, WString) {
 | 
			
		||||
  fmt::WStringWriter out;
 | 
			
		||||
  out << "The answer is " << 42 << "\n";
 | 
			
		||||
  out.write("The answer is ");
 | 
			
		||||
  out.write(42);
 | 
			
		||||
  out.write("\n");
 | 
			
		||||
  std::wstring s;
 | 
			
		||||
  out.move_to(s);
 | 
			
		||||
  EXPECT_EQ(L"The answer is 42\n", s);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user