options.SetPrefixToken('u');
options.SetQuote('\'');
options.SetSourceSize(1);
+ options.SetBinaryZeroIsTerminator(false);
return ReadBufferAndDumpToStream<StringElementType::UTF16>(options);
}
options.SetPrefixToken('U');
options.SetQuote('\'');
options.SetSourceSize(1);
+ options.SetBinaryZeroIsTerminator(false);
return ReadBufferAndDumpToStream<StringElementType::UTF32>(options);
}
options.SetPrefixToken('L');
options.SetQuote('\'');
options.SetSourceSize(1);
+ options.SetBinaryZeroIsTerminator(false);
return ReadBufferAndDumpToStream<StringElementType::UTF16>(options);
}
self.expect("frame variable s16 s32",
substrs = ['(char16_t *) s16 = 0x','(char32_t *) s32 = ','"色ハ匂ヘト散リヌルヲ"','"෴"'])
+ # check that zero values are properly handles
+ self.expect('frame variable cs16_zero', substrs=["U+0000 u'\\0'"])
+ self.expect('frame variable cs32_zero', substrs=["U+0x00000000 U'\\0'"])
+ self.expect('expression cs16_zero', substrs=["U+0000 u'\\0'"])
+ self.expect('expression cs32_zero', substrs=["U+0x00000000 U'\\0'"])
+
# Check that we can run expressions that return charN_t
self.expect("expression u'a'",substrs = ['(char16_t) $',"61 u'a'"])
self.expect("expression U'a'",substrs = ['(char32_t) $',"61 U'a'"])
int main (int argc, char const *argv[])
{
+ auto cs16_zero = (char16_t)0;
+ auto cs32_zero = (char32_t)0;
auto cs16 = u"hello world ྒྙྐ";
auto cs32 = U"hello world ྒྙྐ";
char16_t *s16 = (char16_t *)u"ﺸﺵۻ";
self.expect("frame variable array",substrs = ['L"Hey, I\'m a super wchar_t string'])
self.expect("frame variable array",substrs = ['[0]'], matching=False)
+
+ self.expect('frame variable wchar_zero', substrs=["L'\\0'"])
+ self.expect('expression wchar_zero', substrs=["L'\\0'"])
if __name__ == '__main__':
import atexit
wchar_t *ws_NULL = nullptr;
wchar_t *ws_empty = L"";
wchar_t array[200], * array_source = L"Hey, I'm a super wchar_t string, éõñž";
+ wchar_t wchar_zero = (wchar_t)0;
memcpy(array, array_source, 39 * sizeof(wchar_t));
return 0; // Set break point at this line.
}