File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed
private/react-native-fantom/tester Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ add_react_third_party_ndk_subdir(folly)
37
37
38
38
# Common targets
39
39
add_react_common_subdir (yoga )
40
+ add_react_common_subdir (react/featureflags )
40
41
41
42
file (GLOB SOURCES "src/*.cpp" "src/*.h" )
42
43
add_executable (fantom_tester ${SOURCES} )
@@ -48,6 +49,7 @@ target_link_libraries(fantom_tester
48
49
double-conversion
49
50
fast_float
50
51
folly_runtime
52
+ react_featureflags
51
53
yogacore )
52
54
53
55
target_compile_options (fantom_tester
Original file line number Diff line number Diff line change @@ -15,3 +15,10 @@ cmake -S "$SCRIPT_DIR" -B "$BUILD_DIR" \
15
15
-DREACT_COMMON_DIR=" ${REACT_NATIVE_ROOT_DIR} /ReactCommon"
16
16
17
17
cmake --build " $BUILD_DIR " --target fantom_tester
18
+
19
+ while getopts " :r" opt; do
20
+ case $opt in
21
+ r) " $BUILD_DIR /fantom_tester" ;;
22
+ \? ) echo " Invalid option: -$OPTARG " ; exit 1;;
23
+ esac
24
+ done
Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
#include < glog/logging.h>
9
+ #include < react/featureflags/ReactNativeFeatureFlags.h>
10
+ #include < react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h>
9
11
#include < yoga/YGEnums.h>
10
12
#include < yoga/YGValue.h>
11
13
#include < format>
12
14
#include < iostream>
15
+ #include < memory>
13
16
14
- int main () {
15
- google::InitGoogleLogging (" fantom_tester" );
17
+ using namespace facebook ::react;
18
+
19
+ static void setUpLogging () {
20
+ google::InitGoogleLogging (" react-native-fantom" );
16
21
FLAGS_logtostderr = true ;
22
+ }
17
23
18
- LOG (INFO) << " Hello, I am fantom_tester using glog!" ;
24
+ static void setUpFeatureFlags () {
25
+ folly::dynamic dynamicFeatureFlags = folly::dynamic::object ();
26
+
27
+ dynamicFeatureFlags[" enableBridgelessArchitecture" ] = true ;
28
+ dynamicFeatureFlags[" cxxNativeAnimatedEnabled" ] = true ;
19
29
30
+ ReactNativeFeatureFlags::override (
31
+ std::make_unique<ReactNativeFeatureFlagsDynamicProvider>(
32
+ dynamicFeatureFlags));
33
+ }
34
+
35
+ int main () {
36
+ setUpLogging ();
37
+
38
+ setUpFeatureFlags ();
39
+
40
+ LOG (INFO) << " Hello, I am fantom_tester using glog!" ;
20
41
LOG (INFO) << std::format (
21
42
" [Yoga] undefined == zero: {}" , YGValueZero == YGValueUndefined);
22
43
You can’t perform that action at this time.
0 commit comments