mirror of
https://github.com/dobin/RedEdr
synced 2026-08-09 12:30:51 +00:00
34 lines
820 B
C++
34 lines
820 B
C++
//#include "pch.h"
|
|
#include "CppUnitTest.h"
|
|
|
|
#include "event_aggregator.h"
|
|
#include "utils.h"
|
|
#include "json.hpp"
|
|
#include "logging.h"
|
|
|
|
|
|
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
|
|
|
|
|
namespace UnitTests
|
|
{
|
|
TEST_CLASS(EventProducerTest)
|
|
{
|
|
public:
|
|
TEST_METHOD(ConvertWstringToString) {
|
|
std::wstring input = L"Hello\\World";
|
|
std::string reference = "Hello\\World";
|
|
|
|
std::string result = wstring2string(input);
|
|
Assert::AreEqual(reference.c_str(), result.c_str());
|
|
}
|
|
TEST_METHOD(ConvertWstringToString2) {
|
|
std::wstring input = L"Hello\\\\World";
|
|
std::string reference = "Hello\\\\World";
|
|
|
|
std::string result = wstring2string(input);
|
|
Assert::AreEqual(reference.c_str(), result.c_str());
|
|
}
|
|
};
|
|
}
|