Skip to content

Commit 8ac2abc

Browse files
committed
[Tests] Guard Float80 usage in AutoDiff test
Float80 is avaialble in limited platforms rdar://problem/66409898
1 parent 79ff5e3 commit 8ac2abc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/AutoDiff/validation-test/class_differentiation.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ ClassTests.test("ClassMethods - generic") {
390390
}
391391
}
392392

393+
#if !(os(Windows) || os(Android)) && (arch(i386) || arch(x86_64))
393394
class SubSpecializeOverrideCustomDerivatives: Super<Float80> {
394395
@differentiable(wrt: x)
395396
override func f(_ x: Tracked<Float80>) -> Tracked<Float80> {
@@ -408,6 +409,7 @@ ClassTests.test("ClassMethods - generic") {
408409
return (f(x), { v in 3 * v })
409410
}
410411
}
412+
#endif
411413

412414
func classValueWithGradient<T: Differentiable & FloatingPoint>(
413415
_ c: Super<T>
@@ -420,7 +422,9 @@ ClassTests.test("ClassMethods - generic") {
420422
expectEqual((1, 1), classValueWithGradient(SubOverride<Float>()))
421423
expectEqual((3, 3), classValueWithGradient(SubSpecializeOverride()))
422424
expectEqual((3, 3), classValueWithGradient(SubOverrideCustomDerivatives<Float>()))
425+
#if !(os(Windows) || os(Android)) && (arch(i386) || arch(x86_64))
423426
expectEqual((3, 3), classValueWithGradient(SubSpecializeOverrideCustomDerivatives()))
427+
#endif
424428
}
425429

426430
ClassTests.test("ClassMethods - closure captures") {

0 commit comments

Comments
 (0)