1
0
Fork 0
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:
Brian Fiete 2022-02-13 07:57:55 -05:00
parent a7075707fe
commit a89e36248f
3 changed files with 185 additions and 9 deletions

View file

@ -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');
}
}
}