[test] Make KeyPath test pointer-size agnostic part 2

This commit is contained in:
Yuta Saito
2023-06-29 05:57:18 +00:00
parent 964a51f4e9
commit cadc20cf3a

View File

@@ -1100,7 +1100,7 @@ if #available(SwiftStdlib 5.9, *) {
let catNameKp = _createOffsetBasedKeyPath(
root: Cat.self,
value: String.self,
offset: 16
offset: 2 * MemoryLayout<UnsafeRawPointer>.size
) as? KeyPath<Cat, String>
expectNotNil(catNameKp)