mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
32-bit c_wchar improvements
This commit is contained in:
parent
a7075707fe
commit
a89e36248f
3 changed files with 185 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Interop;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
|
@ -19,6 +20,14 @@ namespace Tests
|
|||
var str2 = scope String();
|
||||
FormatString(str2, $"\a{200+300}B{200+300:X}");
|
||||
Test.Assert(str2 == "\a500B1F4");
|
||||
|
||||
static c_wchar[?] cWStr = "Test".ToConstNativeW();
|
||||
c_wchar* wStr = &cWStr;
|
||||
Test.Assert(wStr[0] == 'T');
|
||||
Test.Assert(wStr[1] == 'e');
|
||||
Test.Assert(wStr[2] == 's');
|
||||
Test.Assert(wStr[3] == 't');
|
||||
Test.Assert(wStr[4] == '\0');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue