Skip to content

Commit 13554e9

Browse files
committed
metal: Check if returned value responds to selector
1 parent 8705424 commit 13554e9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

macos/metal/metal_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ func TestMetalValid(t *testing.T) {
88

99
func TestCreateSystemDefaultDevice(t *testing.T) {
1010
d := CreateSystemDefaultDevice()
11-
t.Log(d.HasSupportsFamily())
12-
t.Log(d.SupportsFamily(GPUFamily(5001)))
13-
t.Log("MaxThreadgroupMemoryLength", d.MaxThreadgroupMemoryLength())
14-
t.Log("MaxBufferLength", d.MaxBufferLength())
15-
t.Log("MaxThreadsPerThreadgroup", d.MaxThreadsPerThreadgroup())
11+
if d.HasSupportsFamily() {
12+
t.Log(d.SupportsFamily(GPUFamily(5001)))
13+
t.Log("MaxThreadgroupMemoryLength", d.MaxThreadgroupMemoryLength())
14+
t.Log("MaxBufferLength", d.MaxBufferLength())
15+
t.Log("MaxThreadsPerThreadgroup", d.MaxThreadsPerThreadgroup())
16+
}
1617
}

0 commit comments

Comments
 (0)