mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This change does two things: 1) Moves RNTester on iOS to use an `.xctestplan` to configure its tests. This moves the test configuration out of the `.xcscheme` file, and into a new json file that Xcode likes. It also allows you to run the same tests multiple times with different configurations. This was done by clicking the focused button below.  Note: this is partially me upstreaming a change from React Native macOS (https://github.com/microsoft/react-native-macos/pull/190/), though at some point our Xcode project got messed up and we were no longer referencing them ��. 2) Enables Address Sanitizer and Udefined Behavior Sanitizer through the xctestplan This should help catch some extra vulnerabilities should they ever show up while our tests run. Notably, I did not _also_ add a configuration to run Thread Sanitizer, because tests start failing with that enabled 😅. ## Changelog: [IOS] [SECURITY] - Enable Address and Undefined Behavior Sanitizers on RNTester Pull Request resolved: https://github.com/facebook/react-native/pull/36443 Test Plan: CI should pass Reviewed By: cortinico Differential Revision: D44213517 Pulled By: cipolleschi fbshipit-source-id: 0646174c4b416413a563e8178aa2cfca230b5e66
46 lines
1.4 KiB
Objective-C
46 lines
1.4 KiB
Objective-C
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <CoreGraphics/CoreGraphics.h>
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <React/RCTDefines.h>
|
|
|
|
RCT_EXTERN NSString *const EXTRAPOLATE_TYPE_IDENTITY;
|
|
RCT_EXTERN NSString *const EXTRAPOLATE_TYPE_CLAMP;
|
|
RCT_EXTERN NSString *const EXTRAPOLATE_TYPE_EXTEND;
|
|
|
|
RCT_EXTERN NSUInteger RCTFindIndexOfNearestValue(CGFloat value, NSArray<NSNumber *> *range);
|
|
|
|
RCT_EXTERN CGFloat RCTInterpolateValue(
|
|
CGFloat value,
|
|
CGFloat inputMin,
|
|
CGFloat inputMax,
|
|
CGFloat outputMin,
|
|
CGFloat outputMax,
|
|
NSString *extrapolateLeft,
|
|
NSString *extrapolateRight);
|
|
|
|
RCT_EXTERN CGFloat RCTInterpolateValueInRange(
|
|
CGFloat value,
|
|
NSArray<NSNumber *> *inputRange,
|
|
NSArray<NSNumber *> *outputRange,
|
|
NSString *extrapolateLeft,
|
|
NSString *extrapolateRight);
|
|
|
|
RCT_EXTERN uint32_t
|
|
RCTInterpolateColorInRange(CGFloat value, NSArray<NSNumber *> *inputRange, NSArray<UIColor *> *outputRange);
|
|
|
|
// Represents a color as a int32_t. RGB components are assumed to be in [0-255] range and alpha in [0-1] range
|
|
RCT_EXTERN uint32_t RCTColorFromComponents(CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha);
|
|
|
|
/**
|
|
* Coefficient to slow down animations, respects the ios
|
|
* simulator `Slow Animations (⌘T)` option.
|
|
*/
|
|
RCT_EXTERN CGFloat RCTAnimationDragCoefficient(void);
|