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()
|
||||
{
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
return (CGFloat)UIAnimationDragCoefficient();
|
||||
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();
|
||||
}
|
||||
#else
|
||||
return 1.0;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue