2018-01-22 05:54:01 +00:00
|
|
|
load("//ReactNative:DEFS", "IS_OSS_BUILD", "react_native_xplat_target")
|
|
|
|
|
2016-09-19 11:43:09 +00:00
|
|
|
TEST_SRCS = [
|
2017-02-25 05:40:45 +00:00
|
|
|
"RecoverableErrorTest.cpp",
|
|
|
|
"jsarg_helpers.cpp",
|
|
|
|
"jsbigstring.cpp",
|
|
|
|
"jscexecutor.cpp",
|
|
|
|
"jsclogging.cpp",
|
|
|
|
"methodcall.cpp",
|
|
|
|
"value.cpp",
|
2016-09-19 11:43:09 +00:00
|
|
|
]
|
2016-06-14 01:12:33 +00:00
|
|
|
|
2018-01-22 05:54:01 +00:00
|
|
|
if not IS_OSS_BUILD:
|
|
|
|
load("@xplat//configurations/buck/android:jni_instrumentation_test", "jni_instrumentation_test_lib")
|
|
|
|
load("@xplat//configurations/buck:fb_xplat_cxx", "cxx_test")
|
|
|
|
load("@xplat//configurations/buck:default_platform_defs.bzl", "APPLE")
|
|
|
|
jni_instrumentation_test_lib(
|
|
|
|
name = 'tests',
|
|
|
|
class_under_test = 'com/facebook/react/XplatBridgeTest',
|
|
|
|
soname = 'libxplat-bridge.so',
|
|
|
|
srcs = TEST_SRCS,
|
|
|
|
compiler_flags = [
|
|
|
|
'-fexceptions',
|
|
|
|
'-frtti',
|
|
|
|
'-std=c++14',
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
'xplat//third-party/linker_lib:android',
|
|
|
|
'xplat//third-party/gmock:gtest',
|
|
|
|
react_native_xplat_target('cxxreact:bridge'),
|
|
|
|
],
|
|
|
|
visibility = [
|
|
|
|
'fbandroid//instrumentation_tests/...'
|
|
|
|
],
|
|
|
|
)
|
2016-09-19 11:43:09 +00:00
|
|
|
|
2018-01-22 05:54:01 +00:00
|
|
|
cxx_test(
|
|
|
|
name = 'tests',
|
|
|
|
srcs = TEST_SRCS,
|
|
|
|
compiler_flags = [
|
|
|
|
'-fexceptions',
|
|
|
|
'-frtti',
|
|
|
|
],
|
|
|
|
platforms = APPLE,
|
|
|
|
deps = [
|
|
|
|
'xplat//folly:molly',
|
|
|
|
'xplat//third-party/gmock:gtest',
|
|
|
|
react_native_xplat_target('cxxreact:bridge'),
|
|
|
|
react_native_xplat_target('jschelpers:jschelpers'),
|
|
|
|
],
|
|
|
|
visibility = [
|
|
|
|
react_native_xplat_target('cxxreact/...'),
|
|
|
|
],
|
|
|
|
)
|