Fix tests for UTF-16 strings

This commit is contained in:
gingerBill
2025-08-02 13:01:58 +01:00
parent 5aec40e3e0
commit e049dde582
4 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import "core:testing"
string_from_clsid :: proc(t: ^testing.T) {
p: win32.LPOLESTR
hr := win32.StringFromCLSID(win32.CLSID_FileOpenDialog, &p)
defer if p != nil {win32.CoTaskMemFree(p)}
defer if p != nil {win32.CoTaskMemFree(rawptr(p))}
testing.expectf(t, win32.SUCCEEDED(hr), "%x (should be: %x)", u32(hr), 0)
testing.expectf(t, p != nil, "%v is nil", p)
@@ -33,7 +33,7 @@ clsid_from_string :: proc(t: ^testing.T) {
string_from_iid :: proc(t: ^testing.T) {
p: win32.LPOLESTR
hr := win32.StringFromIID(win32.IID_IFileDialog, &p)
defer if p != nil {win32.CoTaskMemFree(p)}
defer if p != nil {win32.CoTaskMemFree(rawptr(p))}
testing.expectf(t, win32.SUCCEEDED(hr), "%x (should be: %x)", u32(hr), 0)
testing.expectf(t, p != nil, "%v is nil", p)