mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Platform: Improve Windows wstring support
This commit is contained in:
committed by
Kyle Schwarz
parent
c5ba2d8d32
commit
f04cd16bee
@@ -0,0 +1,23 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <icsneo/platform/windows/strings.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
TEST(WindowsUtilTest, testConvertWideString) {
|
||||
#ifdef WIN32
|
||||
std::wstring wideString(L"Hello World!");
|
||||
auto normalString = icsneo::convertWideString(wideString);
|
||||
|
||||
ASSERT_STREQ(normalString.c_str(), "Hello World!");
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(WindowsUtilTest, testConvertStringToWide) {
|
||||
#ifdef WIN32
|
||||
std::string normalString("Hello World!");
|
||||
auto wideString = icsneo::convertStringToWide(normalString);
|
||||
|
||||
ASSERT_STREQ(wideString.c_str(), L"Hello World!");
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user