mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Fix tests for UTF-16 strings
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user