iOS: added placeholder test setup for fabric graphics/uimanager/view targets
Reviewed By: shergin Differential Revision: D7390366 fbshipit-source-id: d49fcc335fc03d52402676341f1da24177c6084b
This commit is contained in:
Родитель
408a5f264b
Коммит
1acef45977
|
@ -10,14 +10,12 @@ if not IS_OSS_BUILD:
|
||||||
rn_xplat_cxx_library(
|
rn_xplat_cxx_library(
|
||||||
name = "debug",
|
name = "debug",
|
||||||
srcs = glob(
|
srcs = glob(
|
||||||
[
|
["**/*.cpp"],
|
||||||
"*.cpp",
|
excludes = glob(["tests/**/*.cpp"]),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
headers = glob(
|
headers = glob(
|
||||||
[
|
["**/*.h"],
|
||||||
"*.h",
|
excludes = glob(["tests/**/*.h"]),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
header_namespace = "",
|
header_namespace = "",
|
||||||
exported_headers = subdir_glob(
|
exported_headers = subdir_glob(
|
||||||
|
@ -54,6 +52,7 @@ if not IS_OSS_BUILD:
|
||||||
cxx_test(
|
cxx_test(
|
||||||
name = "tests",
|
name = "tests",
|
||||||
srcs = glob(["tests/**/*.cpp"]),
|
srcs = glob(["tests/**/*.cpp"]),
|
||||||
|
headers = glob(["tests/**/*.h"]),
|
||||||
contacts = ["oncall+react_native@xmail.facebook.com"],
|
contacts = ["oncall+react_native@xmail.facebook.com"],
|
||||||
compiler_flags = [
|
compiler_flags = [
|
||||||
"-fexceptions",
|
"-fexceptions",
|
||||||
|
|
|
@ -10,14 +10,12 @@ if not IS_OSS_BUILD:
|
||||||
rn_xplat_cxx_library(
|
rn_xplat_cxx_library(
|
||||||
name = "graphics",
|
name = "graphics",
|
||||||
srcs = glob(
|
srcs = glob(
|
||||||
[
|
["**/*.cpp"],
|
||||||
"**/*.cpp",
|
excludes = glob(["tests/**/*.cpp"]),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
headers = glob(
|
headers = glob(
|
||||||
[
|
["**/*.h"],
|
||||||
"**/*.h",
|
excludes = glob(["tests/**/*.h"]),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
header_namespace = "",
|
header_namespace = "",
|
||||||
exported_headers = subdir_glob(
|
exported_headers = subdir_glob(
|
||||||
|
@ -39,6 +37,9 @@ rn_xplat_cxx_library(
|
||||||
"-DLOG_TAG=\"ReactNative\"",
|
"-DLOG_TAG=\"ReactNative\"",
|
||||||
"-DWITH_FBSYSTRACE=1",
|
"-DWITH_FBSYSTRACE=1",
|
||||||
],
|
],
|
||||||
|
tests = [
|
||||||
|
":tests",
|
||||||
|
],
|
||||||
visibility = ["PUBLIC"],
|
visibility = ["PUBLIC"],
|
||||||
deps = [
|
deps = [
|
||||||
"xplat//fbsystrace:fbsystrace",
|
"xplat//fbsystrace:fbsystrace",
|
||||||
|
@ -48,3 +49,25 @@ rn_xplat_cxx_library(
|
||||||
"xplat//third-party/glog:glog",
|
"xplat//third-party/glog:glog",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not IS_OSS_BUILD:
|
||||||
|
load("@xplat//configurations/buck:default_platform_defs.bzl", "APPLE")
|
||||||
|
|
||||||
|
cxx_test(
|
||||||
|
name = "tests",
|
||||||
|
srcs = glob(["tests/**/*.cpp"]),
|
||||||
|
headers = glob(["tests/**/*.h"]),
|
||||||
|
contacts = ["oncall+react_native@xmail.facebook.com"],
|
||||||
|
compiler_flags = [
|
||||||
|
"-fexceptions",
|
||||||
|
"-frtti",
|
||||||
|
"-std=c++14",
|
||||||
|
"-Wall",
|
||||||
|
],
|
||||||
|
platforms = APPLE,
|
||||||
|
deps = [
|
||||||
|
"xplat//folly:molly",
|
||||||
|
"xplat//third-party/gmock:gtest",
|
||||||
|
":graphics",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include <fabric/graphics/graphicValuesConversions.h>
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
using namespace facebook::react;
|
||||||
|
|
||||||
|
TEST(GraphicsTest, testSomething) {
|
||||||
|
// TODO
|
||||||
|
}
|
|
@ -10,14 +10,12 @@ if not IS_OSS_BUILD:
|
||||||
rn_xplat_cxx_library(
|
rn_xplat_cxx_library(
|
||||||
name = "uimanager",
|
name = "uimanager",
|
||||||
srcs = glob(
|
srcs = glob(
|
||||||
[
|
["**/*.cpp"],
|
||||||
"**/*.cpp",
|
excludes = glob(["tests/**/*.cpp"]),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
headers = glob(
|
headers = glob(
|
||||||
[
|
["**/*.h"],
|
||||||
"**/*.h",
|
excludes = glob(["tests/**/*.h"]),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
header_namespace = "",
|
header_namespace = "",
|
||||||
exported_headers = subdir_glob(
|
exported_headers = subdir_glob(
|
||||||
|
@ -39,6 +37,9 @@ rn_xplat_cxx_library(
|
||||||
"-DLOG_TAG=\"ReactNative\"",
|
"-DLOG_TAG=\"ReactNative\"",
|
||||||
"-DWITH_FBSYSTRACE=1",
|
"-DWITH_FBSYSTRACE=1",
|
||||||
],
|
],
|
||||||
|
tests = [
|
||||||
|
":tests",
|
||||||
|
],
|
||||||
visibility = ["PUBLIC"],
|
visibility = ["PUBLIC"],
|
||||||
deps = [
|
deps = [
|
||||||
"xplat//fbsystrace:fbsystrace",
|
"xplat//fbsystrace:fbsystrace",
|
||||||
|
@ -51,3 +52,25 @@ rn_xplat_cxx_library(
|
||||||
react_native_xplat_target("fabric/view:view"),
|
react_native_xplat_target("fabric/view:view"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not IS_OSS_BUILD:
|
||||||
|
load("@xplat//configurations/buck:default_platform_defs.bzl", "APPLE")
|
||||||
|
|
||||||
|
cxx_test(
|
||||||
|
name = "tests",
|
||||||
|
srcs = glob(["tests/**/*.cpp"]),
|
||||||
|
headers = glob(["tests/**/*.h"]),
|
||||||
|
contacts = ["oncall+react_native@xmail.facebook.com"],
|
||||||
|
compiler_flags = [
|
||||||
|
"-fexceptions",
|
||||||
|
"-frtti",
|
||||||
|
"-std=c++14",
|
||||||
|
"-Wall",
|
||||||
|
],
|
||||||
|
platforms = APPLE,
|
||||||
|
deps = [
|
||||||
|
"xplat//folly:molly",
|
||||||
|
"xplat//third-party/gmock:gtest",
|
||||||
|
":uimanager",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include <fabric/uimanager/FabricUIManager.h>
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
using namespace facebook::react;
|
||||||
|
|
||||||
|
TEST(FabricUIManagerTest, testSomething) {
|
||||||
|
// TODO
|
||||||
|
}
|
|
@ -2,22 +2,21 @@ load("//configurations/buck/apple:flag_defs.bzl", "get_application_ios_flags", "
|
||||||
load("//ReactNative:DEFS.bzl", "IS_OSS_BUILD", "rn_xplat_cxx_library", "APPLE_INSPECTOR_FLAGS")
|
load("//ReactNative:DEFS.bzl", "IS_OSS_BUILD", "rn_xplat_cxx_library", "APPLE_INSPECTOR_FLAGS")
|
||||||
load("//ReactNative:DEFS.bzl", "react_native_xplat_target")
|
load("//ReactNative:DEFS.bzl", "react_native_xplat_target")
|
||||||
|
|
||||||
CXX_LIBRARY_COMPILER_FLAGS = [
|
APPLE_COMPILER_FLAGS = []
|
||||||
"-std=c++14",
|
|
||||||
"-Wall",
|
if not IS_OSS_BUILD:
|
||||||
]
|
load("@xplat//configurations/buck/apple:flag_defs.bzl", "get_static_library_ios_flags", "flags")
|
||||||
|
APPLE_COMPILER_FLAGS = flags.get_flag_value(get_static_library_ios_flags(), 'compiler_flags')
|
||||||
|
|
||||||
rn_xplat_cxx_library(
|
rn_xplat_cxx_library(
|
||||||
name = "view",
|
name = "view",
|
||||||
srcs = glob(
|
srcs = glob(
|
||||||
[
|
["**/*.cpp"],
|
||||||
"**/*.cpp",
|
excludes = glob(["tests/**/*.cpp"]),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
headers = glob(
|
headers = glob(
|
||||||
[
|
["**/*.h"],
|
||||||
"**/*.h",
|
excludes = glob(["tests/**/*.h"]),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
header_namespace = "",
|
header_namespace = "",
|
||||||
exported_headers = subdir_glob(
|
exported_headers = subdir_glob(
|
||||||
|
@ -28,15 +27,22 @@ rn_xplat_cxx_library(
|
||||||
],
|
],
|
||||||
prefix = "fabric/view",
|
prefix = "fabric/view",
|
||||||
),
|
),
|
||||||
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [
|
compiler_flags = [
|
||||||
"-fexceptions",
|
"-fexceptions",
|
||||||
"-frtti",
|
"-frtti",
|
||||||
|
"-std=c++14",
|
||||||
|
"-Wall",
|
||||||
],
|
],
|
||||||
|
fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
|
||||||
|
fbobjc_preprocessor_flags = get_debug_preprocessor_flags() + APPLE_INSPECTOR_FLAGS,
|
||||||
force_static = True,
|
force_static = True,
|
||||||
preprocessor_flags = [
|
preprocessor_flags = [
|
||||||
"-DLOG_TAG=\"ReactNative\"",
|
"-DLOG_TAG=\"ReactNative\"",
|
||||||
"-DWITH_FBSYSTRACE=1",
|
"-DWITH_FBSYSTRACE=1",
|
||||||
],
|
],
|
||||||
|
tests = [
|
||||||
|
":tests",
|
||||||
|
],
|
||||||
visibility = ["PUBLIC"],
|
visibility = ["PUBLIC"],
|
||||||
deps = [
|
deps = [
|
||||||
"xplat//fbsystrace:fbsystrace",
|
"xplat//fbsystrace:fbsystrace",
|
||||||
|
@ -50,3 +56,25 @@ rn_xplat_cxx_library(
|
||||||
react_native_xplat_target("fabric/graphics:graphics"),
|
react_native_xplat_target("fabric/graphics:graphics"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not IS_OSS_BUILD:
|
||||||
|
load("@xplat//configurations/buck:default_platform_defs.bzl", "APPLE")
|
||||||
|
|
||||||
|
cxx_test(
|
||||||
|
name = "tests",
|
||||||
|
srcs = glob(["tests/**/*.cpp"]),
|
||||||
|
headers = glob(["tests/**/*.h"]),
|
||||||
|
contacts = ["oncall+react_native@xmail.facebook.com"],
|
||||||
|
compiler_flags = [
|
||||||
|
"-fexceptions",
|
||||||
|
"-frtti",
|
||||||
|
"-std=c++14",
|
||||||
|
"-Wall",
|
||||||
|
],
|
||||||
|
platforms = APPLE,
|
||||||
|
deps = [
|
||||||
|
"xplat//folly:molly",
|
||||||
|
"xplat//third-party/gmock:gtest",
|
||||||
|
":view",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include <fabric/view/ViewComponentDescriptor.h>
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
using namespace facebook::react;
|
||||||
|
|
||||||
|
TEST(ViewTest, testSomething) {
|
||||||
|
// TODO
|
||||||
|
}
|
Загрузка…
Ссылка в новой задаче