Skip to content

Commit 06326e6

Browse files
kateinoigakukunAnka
authored andcommitted
[test] Make KeyPath test pointer-size agnostic
The field offset of the `age` property is 16 bytes on 64-bit platforms but not on other pointer-sized platforms.
1 parent da44d84 commit 06326e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/stdlib/KeyPath.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ if #available(SwiftStdlib 5.9, *) {
10851085
let dogAgeKp = _createOffsetBasedKeyPath(
10861086
root: Dog.self,
10871087
value: Int.self,
1088-
offset: 16
1088+
offset: MemoryLayout<String>.size
10891089
) as? KeyPath<Dog, Int>
10901090

10911091
expectNotNil(dogAgeKp)

0 commit comments

Comments
 (0)