![]() ![]() When finished, redirect cout to the original bufferĪssert::AreEqual(expected, buffer.str()) Std::cout.rdbuf(buffer.rdbuf()) // Redirect cout to the stringstream buffer Std::streambuf* sbuf = std::cout.rdbuf() // Save cout's buffer Using namespace Microsoft::VisualStudio::CppUnitTestFramework #include "./HelloWorldUnitTestCPP/HelloWorldUnitTestCPP.cpp" // Update using your project name Private const string Expected = "Hello World!"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |