mirror of
https://github.com/RetroAchievements/RAIntegration.git
synced 2026-10-12 10:39:53 +00:00
34 lines
717 B
C++
34 lines
717 B
C++
#include "services\impl\StringTextWriter.hh"
|
|
|
|
#include "testutil\CppUnitTest.hh"
|
|
|
|
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
|
|
|
namespace ra {
|
|
namespace services {
|
|
namespace impl {
|
|
namespace tests {
|
|
|
|
TEST_CLASS(StringTextWriter_Tests)
|
|
{
|
|
public:
|
|
TEST_METHOD(TestEmpty)
|
|
{
|
|
StringTextWriter writer;
|
|
Assert::AreEqual(std::string(""), writer.GetString());
|
|
}
|
|
|
|
TEST_METHOD(TestWriteLine)
|
|
{
|
|
StringTextWriter writer;
|
|
writer.Write(std::string("Test"));
|
|
writer.Write(std::string("1\n"));
|
|
Assert::AreEqual(std::string("Test1\n"), writer.GetString());
|
|
}
|
|
};
|
|
|
|
} // namespace tests
|
|
} // namespace impl
|
|
} // namespace services
|
|
} // namespace ra
|