mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 14:48:25 +00:00
Guard calls to debug features in fabric test
Summary: In some setup, buck cxx test for android runs with `NDEBUG` set, hence we can't call debug symbols in the test cases. So guard those callsites with `#ifndef NDEBUG`. Also, some dependencies for this test target depend on Android specific symbols, so we have to mark it as instrumentation test for now (FB-specific). Reviewed By: sahrens Differential Revision: D13337637 fbshipit-source-id: 02ff152df9937f2b0b8596f53789cdee8ee8a539
This commit is contained in:
parent
4f9a3bc8f6
commit
01d7aad548
@ -79,6 +79,7 @@ fb_xplat_cxx_test(
|
|||||||
"-Wall",
|
"-Wall",
|
||||||
],
|
],
|
||||||
contacts = ["oncall+react_native@xmail.facebook.com"],
|
contacts = ["oncall+react_native@xmail.facebook.com"],
|
||||||
|
fbandroid_use_instrumentation_test = True,
|
||||||
platforms = (ANDROID, APPLE),
|
platforms = (ANDROID, APPLE),
|
||||||
deps = [
|
deps = [
|
||||||
"xplat//folly:molly",
|
"xplat//folly:molly",
|
||||||
|
@ -111,7 +111,9 @@ TEST(UITemplateProcessorTest, testSimpleBytecode) {
|
|||||||
*componentDescriptorRegistry,
|
*componentDescriptorRegistry,
|
||||||
nativeModuleRegistry,
|
nativeModuleRegistry,
|
||||||
mockReactNativeConfig_);
|
mockReactNativeConfig_);
|
||||||
|
#ifndef NDEBUG
|
||||||
LOG(INFO) << std::endl << root1->getDebugDescription();
|
LOG(INFO) << std::endl << root1->getDebugDescription();
|
||||||
|
#endif
|
||||||
auto props1 = std::dynamic_pointer_cast<const ViewProps>(root1->getProps());
|
auto props1 = std::dynamic_pointer_cast<const ViewProps>(root1->getProps());
|
||||||
ASSERT_NEAR(props1->opacity, 0.5, 0.001);
|
ASSERT_NEAR(props1->opacity, 0.5, 0.001);
|
||||||
ASSERT_STREQ(props1->testId.c_str(), "root");
|
ASSERT_STREQ(props1->testId.c_str(), "root");
|
||||||
@ -147,7 +149,9 @@ TEST(UITemplateProcessorTest, testConditionalBytecode) {
|
|||||||
*componentDescriptorRegistry,
|
*componentDescriptorRegistry,
|
||||||
nativeModuleRegistry,
|
nativeModuleRegistry,
|
||||||
mockReactNativeConfig_);
|
mockReactNativeConfig_);
|
||||||
|
#ifndef NDEBUG
|
||||||
LOG(INFO) << std::endl << root1->getDebugDescription();
|
LOG(INFO) << std::endl << root1->getDebugDescription();
|
||||||
|
#endif
|
||||||
auto props1 = std::dynamic_pointer_cast<const ViewProps>(root1->getProps());
|
auto props1 = std::dynamic_pointer_cast<const ViewProps>(root1->getProps());
|
||||||
ASSERT_STREQ(props1->testId.c_str(), "root");
|
ASSERT_STREQ(props1->testId.c_str(), "root");
|
||||||
auto children1 = root1->getChildren();
|
auto children1 = root1->getChildren();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user