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)
3737
3838# Common targets
3939add_react_common_subdir(yoga)
40+ add_react_common_subdir(react/featureflags)
4041
4142file (GLOB SOURCES "src/*.cpp" "src/*.h" )
4243add_executable (fantom_tester ${SOURCES} )
@@ -48,6 +49,7 @@ target_link_libraries(fantom_tester
4849 double-conversion
4950 fast_float
5051 folly_runtime
52+ react_featureflags
5153 yogacore)
5254
5355target_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" \
1515 -DREACT_COMMON_DIR=" ${REACT_NATIVE_ROOT_DIR} /ReactCommon"
1616
1717cmake --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 66 */
77
88#include < glog/logging.h>
9+ #include < react/featureflags/ReactNativeFeatureFlags.h>
10+ #include < react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h>
911#include < yoga/YGEnums.h>
1012#include < yoga/YGValue.h>
1113#include < format>
1214#include < iostream>
15+ #include < memory>
1316
14- int main () {
15- google::InitGoogleLogging (" fantom_tester" );
17+ using namespace facebook ::react;
18+
19+ static void setUpLogging () {
20+ google::InitGoogleLogging (" react-native-fantom" );
1621 FLAGS_logtostderr = true ;
22+ }
1723
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 ;
1929
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!" ;
2041 LOG (INFO) << std::format (
2142 " [Yoga] undefined == zero: {}" , YGValueZero == YGValueUndefined);
2243
You can’t perform that action at this time.
0 commit comments