mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 02:50:08 +08:00
Add wide string constant test.
This commit is contained in:
@ -62,3 +62,6 @@ extern void (*f13())();
|
|||||||
|
|
||||||
#define TEST_STRING_CONSTANT "test string constant"
|
#define TEST_STRING_CONSTANT "test string constant"
|
||||||
extern const char* f14();
|
extern const char* f14();
|
||||||
|
|
||||||
|
#define TEST_WIDE_STRING_CONSTANT L"test wide string constant"
|
||||||
|
extern const wchar_t* f15();
|
||||||
|
@ -180,3 +180,16 @@ t14()
|
|||||||
return false;
|
return false;
|
||||||
return *s2 == '\0';
|
return *s2 == '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 15 Compare wide string constants in file 1 and file 2.
|
||||||
|
|
||||||
|
bool
|
||||||
|
t15()
|
||||||
|
{
|
||||||
|
const wchar_t* s1 = TEST_WIDE_STRING_CONSTANT;
|
||||||
|
const wchar_t* s2 = f15();
|
||||||
|
while (*s1 != '\0')
|
||||||
|
if (*s1++ != *s2++)
|
||||||
|
return false;
|
||||||
|
return *s2 == '\0';
|
||||||
|
}
|
||||||
|
@ -100,3 +100,11 @@ f14()
|
|||||||
{
|
{
|
||||||
return TEST_STRING_CONSTANT;
|
return TEST_STRING_CONSTANT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 15 Compare wide string constants in file 1 and file 2.
|
||||||
|
|
||||||
|
const wchar_t*
|
||||||
|
f15()
|
||||||
|
{
|
||||||
|
return TEST_WIDE_STRING_CONSTANT;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user