fix broken animation tests
Summary: UIAnimationDragCoefficient is 10.0 in tests for some reason, but we need it to be 1.0 for our tests. Reviewed By: PeteTheHeat Differential Revision: D10096375 fbshipit-source-id: 9acd042a3d87a9c6a253745fe48145f0442f6567
This commit is contained in:
parent
199c918dbe
commit
ae4be91cac
|
@ -102,7 +102,13 @@ float UIAnimationDragCoefficient(void);
|
||||||
CGFloat RCTAnimationDragCoefficient()
|
CGFloat RCTAnimationDragCoefficient()
|
||||||
{
|
{
|
||||||
#if TARGET_IPHONE_SIMULATOR
|
#if TARGET_IPHONE_SIMULATOR
|
||||||
|
if (NSClassFromString(@"XCTest") != nil) {
|
||||||
|
// UIAnimationDragCoefficient is 10.0 in tests for some reason, but
|
||||||
|
// we need it to be 1.0. Fixes T34233294
|
||||||
|
return 1.0;
|
||||||
|
} else {
|
||||||
return (CGFloat)UIAnimationDragCoefficient();
|
return (CGFloat)UIAnimationDragCoefficient();
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
return 1.0;
|
return 1.0;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue