mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Uncomment some plString tests to see if they work.
They do work in gcc on Linux.
This commit is contained in:
committed by
Anne Marije v/d Meer
parent
0f08019616
commit
985c05d4af
@ -3,45 +3,43 @@
|
||||
#include <wchar.h>
|
||||
|
||||
|
||||
TEST(PlStringTest,ToUtf16)
|
||||
{
|
||||
uint16_t text[] = {0x0061,0x0062,0x0063,0x0064};
|
||||
plStringBuffer<uint16_t> expected = plStringBuffer<uint16_t>(text,4);
|
||||
plStringBuffer<uint16_t> output = plString("abcd").ToUtf16();
|
||||
|
||||
const uint16_t* c = output.GetData();
|
||||
const uint16_t* d = expected.GetData();
|
||||
printf("expected size %d output size %d\n",expected.GetSize(),output.GetSize());
|
||||
for(int i=0;i<expected.GetSize();i++)
|
||||
{
|
||||
printf("%u %s \n",c,c);
|
||||
printf("%u %s \n",d,d);
|
||||
c++;
|
||||
d++;
|
||||
}
|
||||
}
|
||||
|
||||
//TEST(PlStringTest,ToUtf16)
|
||||
//{
|
||||
// uint16_t text[] = {4278124641,4278124776,4278125475,4278136649};
|
||||
// plStringBuffer<uint16_t> expected = plStringBuffer<uint16_t>(text,4);
|
||||
// plStringBuffer<uint16_t> output = plString("abcd").ToUtf16();
|
||||
//
|
||||
// const uint16_t* c = output.GetData();
|
||||
// const uint16_t* d = expected.GetData();
|
||||
// printf("expected size %d output size %d\n",expected.GetSize(),output.GetSize());
|
||||
// for(int i=0;i<expected.GetSize();i++)
|
||||
// {
|
||||
// printf("%u %s \n",c,c);
|
||||
// printf("%u %s \n",d,d);
|
||||
// c++;
|
||||
// d++;
|
||||
// }
|
||||
//}
|
||||
TEST(PlStringTest,ToWchar)
|
||||
{
|
||||
wchar_t text[] =L"abcdé";
|
||||
plStringBuffer<wchar_t> expected = plStringBuffer<wchar_t>(text,sizeof(text));
|
||||
plStringBuffer<wchar_t> output = plString("abcdé").ToWchar();
|
||||
const wchar_t* outputStr = output.GetData();
|
||||
const wchar_t* expectedStr = expected.GetData();
|
||||
EXPECT_STREQ(expectedStr,outputStr);
|
||||
}
|
||||
|
||||
//TEST(PlStringTest,ToWchar)
|
||||
//{
|
||||
// wchar_t text[] =L"abcdé";
|
||||
// plStringBuffer<wchar_t> expected = plStringBuffer<wchar_t>(text,sizeof(text));
|
||||
// plStringBuffer<wchar_t> output = plString("abcdé").ToWchar();
|
||||
// const wchar_t* outputStr = output.GetData();
|
||||
// const wchar_t* expectedStr = expected.GetData();
|
||||
// EXPECT_STREQ(expectedStr,outputStr);
|
||||
//}
|
||||
//
|
||||
//TEST(PlStringTest,ToIso8859_1)
|
||||
//{
|
||||
// char text[] ="abcde";
|
||||
// plStringBuffer<char> expected = plStringBuffer<char>(text,sizeof(text));
|
||||
// plStringBuffer<char> output = plString("abcde").ToIso8859_1();
|
||||
// const char* outputStr = output.GetData();
|
||||
// const char* expectedStr = expected.GetData();
|
||||
// EXPECT_STREQ(expectedStr,outputStr);
|
||||
//}
|
||||
TEST(PlStringTest,ToIso8859_1)
|
||||
{
|
||||
char text[] ="abcde";
|
||||
plStringBuffer<char> expected = plStringBuffer<char>(text,sizeof(text));
|
||||
plStringBuffer<char> output = plString("abcde").ToIso8859_1();
|
||||
const char* outputStr = output.GetData();
|
||||
const char* expectedStr = expected.GetData();
|
||||
EXPECT_STREQ(expectedStr,outputStr);
|
||||
}
|
||||
|
||||
TEST(PlStringTest,Format)
|
||||
{
|
||||
|
Reference in New Issue
Block a user