Compare commits
191 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a874992e7c | ||
|
31fc287d35 | ||
|
892913a69d | ||
|
99026e42a9 | ||
|
3a82d2b1a8 | ||
|
b28292e454 | ||
|
2ff18bc948 | ||
|
d0bee487e0 | ||
|
419e29c5a6 | ||
|
295d111f0e | ||
|
da5eb2db67 | ||
|
3408e4d4fa | ||
|
6d7eca8e42 | ||
|
5726a71b62 | ||
|
f73b5057ac | ||
|
51051aad7f | ||
|
91d3c08248 | ||
|
52f2cf319a | ||
|
bbdb62e654 | ||
|
e024943c4b | ||
|
7f44ec512e | ||
|
a2b6ddb7b1 | ||
|
bdc37b0797 | ||
|
82aaebfea2 | ||
|
48d82224ee | ||
|
100afcfdb0 | ||
|
b3436d5eba | ||
|
c5371aca64 | ||
|
269619a419 | ||
|
9b3104577c | ||
|
a1697d2307 | ||
|
056b75858c | ||
|
c84ed90272 | ||
|
b21dd9891a | ||
|
bba81781af | ||
|
0c74a72fac | ||
|
1822bc5eaf | ||
|
01ffe10c2f | ||
|
7f99a547f5 | ||
|
0e5651fb80 | ||
|
0ca44f3001 | ||
|
3f85763797 | ||
|
b318c4c5c9 | ||
|
ae9703712a | ||
|
d617ab6662 | ||
|
4c3eebd3e5 | ||
|
10061af491 | ||
|
91621641e6 | ||
|
35c6931ade | ||
|
44622912a2 | ||
|
aac40cf89b | ||
|
d4b20f5793 | ||
|
89df2d9475 | ||
|
79fa6f8d58 | ||
|
69242938f7 | ||
|
1b66b5d941 | ||
|
fb30f7ddcb | ||
|
747c2a4208 | ||
|
43fda26275 | ||
|
b1222bf83e | ||
|
3ec41b656f | ||
|
740ef6cd9e | ||
|
8c5cbf698b | ||
|
5f2cf6623f | ||
|
4b7efb73d7 | ||
|
a6b7e34187 | ||
|
e50308e823 | ||
|
b6a13ce43a | ||
|
96a87a811d | ||
|
025ee03cb1 | ||
|
c06ee92251 | ||
|
3aca5965dc | ||
|
cac77e5ffa | ||
|
49f1d7b5f6 | ||
|
82e44dbf04 | ||
|
9b501dd9eb | ||
|
8ba663f6f4 | ||
|
8f35484262 | ||
|
1e3143656d | ||
|
699b1f5012 | ||
|
9c877a621e | ||
|
a3144150e0 | ||
|
c830083df3 | ||
|
9eb03b1bcd | ||
|
7e3136c347 | ||
|
c3de8016c0 | ||
|
af45863f8e | ||
|
08d7d1673e | ||
|
e7c56ccd1e | ||
|
de8cab8e60 | ||
|
9e0f751464 | ||
|
951a429ac5 | ||
|
e43bb9da19 | ||
|
b08bd572ef | ||
|
402ee11273 | ||
|
6e38a26f32 | ||
|
d66239bea8 | ||
|
7eb8df2777 | ||
|
75473fd924 | ||
|
c94ade8ffd | ||
|
61afbd43c9 | ||
|
64f6ea37bd | ||
|
dc0609d153 | ||
|
bd46344a4e | ||
|
7199902316 | ||
|
250873abf2 | ||
|
1e775ecb83 | ||
|
9718c517d9 | ||
|
afc215aa66 | ||
|
5df8157863 | ||
|
802fe6bb29 | ||
|
27d2ad198e | ||
|
63be3ff84c | ||
|
66045bd13d | ||
|
f5f8105b57 | ||
|
4f92ae46ef | ||
|
80f8aa3c7e | ||
|
42778f687b | ||
|
7b27a58b97 | ||
|
a40ba9d350 | ||
|
9ecdff14fa | ||
|
288adc49c9 | ||
|
b8c2428b31 | ||
|
92bfcbafc0 | ||
|
130b5beca2 | ||
|
adb2e0fdd6 | ||
|
0a04bd7f2f | ||
|
9d6af5b314 | ||
|
6efb4b90d4 | ||
|
5806f1728c | ||
|
a9dd527748 | ||
|
db3d20b7b7 | ||
|
acd4e01aaf | ||
|
b217f23ba5 | ||
|
76875af207 | ||
|
f2ba14c309 | ||
|
a65b79a944 | ||
|
681b580fd8 | ||
|
b985b6c377 | ||
|
92eda21e78 | ||
|
0cfdb50477 | ||
|
1eb9a5edd9 | ||
|
383b881748 | ||
|
47543c8fba | ||
|
dc6ed89bfa | ||
|
348dd368b5 | ||
|
40eeefd4f7 | ||
|
47892c17ce | ||
|
f2a369fb73 | ||
|
61dc10ef66 | ||
|
7d01f4d8b1 | ||
|
c7a5e1e290 | ||
|
fbd332dee8 | ||
|
dbf6a12134 | ||
|
dbc47ae383 | ||
|
f22cfd52e0 | ||
|
2a10337344 | ||
|
836eaa62df | ||
|
a01c7adcfb | ||
|
5133faa1ad | ||
|
6a8c2960ad | ||
|
0c98e89fdb | ||
|
5f78181911 | ||
|
03dd1d23fa | ||
|
91683be798 | ||
|
109cb1a562 | ||
|
ad1240e276 | ||
|
2e468d9c8c | ||
|
6caa94b779 | ||
|
429a7eeee3 | ||
|
dec1172f38 | ||
|
afaafb4126 | ||
|
e566fcca08 | ||
|
c7f7ba250c | ||
|
7e3be21811 | ||
|
5e39f1a57c | ||
|
5aa0f44a9b | ||
|
55c767ba7f | ||
|
5502a97f7f | ||
|
8ab1d81917 | ||
|
942543f6a5 | ||
|
a69545a6ae | ||
|
0b13a0c168 | ||
|
d8341ca3b0 | ||
|
34ac314101 | ||
|
02c00f2711 | ||
|
15231c3304 | ||
|
d98e5aef97 | ||
|
5b0dfa471f | ||
|
26481a6553 | ||
|
64e08aa98b |
146
.travis.yml
146
.travis.yml
@@ -5,132 +5,28 @@
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
os: osx
|
||||
osx_image: xcode8.2
|
||||
language: cpp
|
||||
compiler: clang
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/Library/Caches/Homebrew
|
||||
- $HOME/android-sdk
|
||||
- $HOME/android-ndk
|
||||
language: node_js
|
||||
node_js:
|
||||
- "8"
|
||||
|
||||
env:
|
||||
- TARGET=c
|
||||
- TARGET=java
|
||||
- TARGET=net
|
||||
- TARGET=ios
|
||||
- TARGET=js
|
||||
- TARGET=android
|
||||
|
||||
before_install:
|
||||
- |
|
||||
if [[ -n "$encrypted_d27e803291ff_iv" ]]; then
|
||||
openssl aes-256-cbc -K $encrypted_d27e803291ff_key -iv $encrypted_d27e803291ff_iv -in scripts/setup-keys.enc -d >> gradle.properties;
|
||||
fi
|
||||
|
||||
- brew update > /dev/null
|
||||
- brew install --HEAD facebook/fb/buck
|
||||
|
||||
# Java
|
||||
- |
|
||||
if [[ $TARGET = "java" ]]; then
|
||||
brew cask install java &&
|
||||
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) &&
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
fi
|
||||
|
||||
# .NET
|
||||
- |
|
||||
if [[ $TARGET = "net" ]]; then
|
||||
brew install mono
|
||||
fi
|
||||
|
||||
# iOS
|
||||
- |
|
||||
if [[ $TARGET = "ios" ]]; then
|
||||
brew outdated xctool || brew upgrade xctool;
|
||||
gem install xcpretty --no-document --quiet;
|
||||
gem install cocoapods --pre --no-document --quiet;
|
||||
pod repo update --silent;
|
||||
pod install --project-directory=YogaKit/YogaKitSample/;
|
||||
fi
|
||||
|
||||
# Emscripten (used for js tests)
|
||||
# Note: cannot be ran on Linux (because it will compile Clang from its sources :|)
|
||||
- |
|
||||
if [[ $TARGET = "js" ]]; then
|
||||
wget -O /tmp/emsdk-portable.tar.gz https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz &&
|
||||
tar xf /tmp/emsdk-portable.tar.gz -C /tmp/ &&
|
||||
/tmp/emsdk-portable/emsdk install latest 2>&1 | grep -v '^x ' &&
|
||||
/tmp/emsdk-portable/emsdk activate latest
|
||||
fi
|
||||
|
||||
# Android
|
||||
- |
|
||||
if [[ $TARGET = "android" ]]; then
|
||||
brew cask install java;
|
||||
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8);
|
||||
export PATH=$JAVA_HOME/bin:$PATH;
|
||||
export TERMINAL=dumb;
|
||||
source scripts/android-setup.sh && installAndroidSDK
|
||||
export ANDROID_SDK=$ANDROID_HOME
|
||||
export ANDROID_NDK_REPOSITORY=$HOME/android-ndk
|
||||
export ANDROID_NDK_HOME=$ANDROID_NDK_REPOSITORY/android-ndk-r15c
|
||||
fi
|
||||
|
||||
# JavaScript
|
||||
- |
|
||||
if [[ $TARGET = "js" ]]; then (
|
||||
cd javascript &&
|
||||
npm install &&
|
||||
unset CC && unset CXX && unset LINK &&
|
||||
source /tmp/emsdk-portable/emsdk_env.sh &&
|
||||
npm run build:browser
|
||||
) fi
|
||||
install:
|
||||
- cd website
|
||||
- yarn --ignore-scripts
|
||||
- cd ..
|
||||
|
||||
script:
|
||||
# C
|
||||
- |
|
||||
if [[ $TARGET = "c" ]]; then
|
||||
buck test --verbose 0 //:yoga &&
|
||||
buck run --verbose 0 //benchmark:benchmark &&
|
||||
git checkout HEAD^ &&
|
||||
buck run --verbose 0 //benchmark:benchmark
|
||||
fi
|
||||
- cd website
|
||||
- yarn build
|
||||
- cd ..
|
||||
|
||||
# Java
|
||||
- |
|
||||
if [[ $TARGET = "java" ]]; then
|
||||
buck test --verbose 0 //java:java
|
||||
fi
|
||||
|
||||
# .NET
|
||||
- |
|
||||
if [[ $TARGET = "net" ]]; then
|
||||
sh csharp/tests/Facebook.Yoga/test_macos.sh
|
||||
fi
|
||||
|
||||
# iOS
|
||||
- |
|
||||
if [[ $TARGET = "ios" ]]; then
|
||||
buck test --verbose 0 //YogaKit:YogaKitTests --config cxx.default_platform=iphonesimulator-x86_64 &&
|
||||
set -o pipefail &&
|
||||
xcodebuild build -workspace YogaKit/YogaKitSample/YogaKitSample.xcworkspace -scheme YogaKitSample -sdk iphonesimulator | xcpretty -c
|
||||
fi
|
||||
|
||||
# Android
|
||||
- |
|
||||
if [[ $TARGET = "android" ]]; then
|
||||
buck build --verbose 0 //android/sample:sample &&
|
||||
./gradlew testDebugUnit &&
|
||||
scripts/publish-snapshot.sh
|
||||
fi
|
||||
|
||||
# JavaScript
|
||||
- |
|
||||
if [[ $TARGET = "js" ]]; then (
|
||||
cd javascript &&
|
||||
npm run test:all &&
|
||||
npm run bench
|
||||
) fi
|
||||
deploy:
|
||||
provider: pages
|
||||
skip-cleanup: true
|
||||
github-token: $GITHUB_TOKEN
|
||||
fqdn: yogalayout.com
|
||||
local-dir: website/public
|
||||
email: yogabot@fb.com
|
||||
name: Yoga-bot
|
||||
keep-history: true
|
||||
on:
|
||||
branch: master
|
||||
|
32
BUCK
32
BUCK
@@ -1,11 +1,9 @@
|
||||
# Copyright (c) 2014-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
include_defs("//YOGA_DEFS")
|
||||
load("//:yoga_defs.bzl", "LIBRARY_COMPILER_FLAGS", "BASE_COMPILER_FLAGS", "GTEST_TARGET", "yoga_dep", "cxx_library", "cxx_test")
|
||||
|
||||
GMOCK_OVERRIDE_FLAGS = [
|
||||
# gmock does not mark mocked methods as override, ignore the warnings in tests
|
||||
@@ -13,21 +11,37 @@ GMOCK_OVERRIDE_FLAGS = [
|
||||
]
|
||||
|
||||
COMPILER_FLAGS = LIBRARY_COMPILER_FLAGS + [
|
||||
"-std=c11",
|
||||
"-std=c++1y",
|
||||
]
|
||||
|
||||
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + ["-std=c++11"]
|
||||
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + [
|
||||
"-std=c++1y",
|
||||
]
|
||||
|
||||
cxx_library(
|
||||
name = "yoga",
|
||||
srcs = glob(["yoga/*.c"]),
|
||||
srcs = glob(["yoga/*.cpp"]),
|
||||
header_namespace = "",
|
||||
exported_headers = subdir_glob([("", "yoga/*.h")]),
|
||||
compiler_flags = COMPILER_FLAGS,
|
||||
soname = "libyogacore.$(ext)",
|
||||
tests = [":YogaTests"],
|
||||
visibility = ["PUBLIC"],
|
||||
deps = [] if THIS_IS_FBOBJC else [
|
||||
deps = [
|
||||
yoga_dep("lib/fb:ndklog"),
|
||||
],
|
||||
)
|
||||
|
||||
cxx_library(
|
||||
name = "yogafastmath",
|
||||
srcs = glob(["yoga/*.cpp"]),
|
||||
header_namespace = "",
|
||||
exported_headers = subdir_glob([("", "yoga/*.h")]),
|
||||
compiler_flags = COMPILER_FLAGS + ["-ffast-math"],
|
||||
soname = "libyogafastmathcore.$(ext)",
|
||||
tests = [":YogaTests"],
|
||||
visibility = ["PUBLIC"],
|
||||
deps = [
|
||||
yoga_dep("lib/fb:ndklog"),
|
||||
],
|
||||
)
|
||||
|
@@ -1,17 +1,15 @@
|
||||
#
|
||||
# Copyright (c) 2014-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.4.1)
|
||||
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
file(GLOB yogacore_SRC yoga/*.c)
|
||||
file(GLOB yogacore_SRC yoga/*.cpp)
|
||||
add_library(yogacore STATIC ${yogacore_SRC})
|
||||
|
||||
target_link_libraries(yogacore android log)
|
||||
|
3
CODE_OF_CONDUCT.md
Normal file
3
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Code of Conduct
|
||||
|
||||
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated.
|
@@ -2,6 +2,10 @@
|
||||
We want to make contributing to this project as easy and transparent as
|
||||
possible.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated.
|
||||
|
||||
## Pull Requests
|
||||
We actively welcome your pull requests.
|
||||
1. Fork the repo and create your branch from `master`.
|
||||
@@ -25,9 +29,6 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
|
||||
disclosure of security bugs. In those cases, please go through the process
|
||||
outlined on that page and do not file a public issue.
|
||||
|
||||
## Coding Style
|
||||
* format.sh
|
||||
|
||||
## License
|
||||
By contributing to yoga, you agree that your contributions will be licensed
|
||||
under its BSD license.
|
||||
under its MIT license.
|
||||
|
43
LICENSE
43
LICENSE
@@ -1,30 +1,21 @@
|
||||
BSD License
|
||||
MIT License
|
||||
|
||||
For yoga software
|
||||
Copyright (c) 2014-present, Facebook, Inc.
|
||||
|
||||
Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name Facebook nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
33
PATENTS
33
PATENTS
@@ -1,33 +0,0 @@
|
||||
Additional Grant of Patent Rights Version 2
|
||||
|
||||
"Software" means the yoga software distributed by Facebook, Inc.
|
||||
|
||||
Facebook, Inc. (“Facebook”) hereby grants to each recipient of the Software
|
||||
(“you”) a perpetual, worldwide, royalty-free, non-exclusive, irrevocable
|
||||
(subject to the termination provision below) license under any Necessary
|
||||
Claims, to make, have made, use, sell, offer to sell, import, and otherwise
|
||||
transfer the Software. For avoidance of doubt, no license is granted under
|
||||
Facebook's rights in any patent claims that are infringed by (i) modifications
|
||||
to the Software made by you or any third party or (ii) the Software in
|
||||
combination with any software or other technology.
|
||||
|
||||
The license granted hereunder will terminate, automatically and without notice,
|
||||
if you (or any of your subsidiaries, corporate affiliates or agents) initiate
|
||||
directly or indirectly, or take a direct financial interest in, any Patent
|
||||
Assertion: (i) against Facebook or any of its subsidiaries or corporate
|
||||
affiliates, (ii) against any party if such Patent Assertion arises in whole or
|
||||
in part from any software, technology, product or service of Facebook or any of
|
||||
its subsidiaries or corporate affiliates, or (iii) against any party relating
|
||||
to the Software. Notwithstanding the foregoing, if Facebook or any of its
|
||||
subsidiaries or corporate affiliates files a lawsuit alleging patent
|
||||
infringement against you in the first instance, and you respond by filing a
|
||||
patent infringement counterclaim in that lawsuit against that party that is
|
||||
unrelated to the Software, the license granted hereunder will not terminate
|
||||
under section (i) of this paragraph due to such counterclaim.
|
||||
|
||||
A "Necessary Claim" is a claim of a patent owned by Facebook that is
|
||||
necessarily infringed by the Software standing alone.
|
||||
|
||||
A "Patent Assertion" is any lawsuit or other action alleging direct, indirect,
|
||||
or contributory infringement or inducement to infringe any patent, including a
|
||||
cross-claim or counterclaim.
|
15
README.md
15
README.md
@@ -1,15 +1,5 @@
|
||||
# Yoga [](http://cocoapods.org/pods/YogaKit) [](https://www.npmjs.com/package/yoga-layout) [](https://bintray.com/facebook/maven/com.facebook.yoga%3Ayoga/_latestVersion) [](https://www.nuget.org/packages/Facebook.Yoga)
|
||||
|
||||
[](https://travis-ci.org/facebook/yoga)
|
||||
[](https://travis-ci.org/facebook/yoga)
|
||||
[](https://travis-ci.org/facebook/yoga)
|
||||
[](https://travis-ci.org/facebook/yoga)
|
||||
[](https://travis-ci.org/facebook/yoga)
|
||||
[](https://travis-ci.org/facebook/yoga)
|
||||
|
||||
[]()
|
||||
[]()
|
||||
|
||||
## Building
|
||||
Yoga builds with [buck](https://buckbuild.com). Make sure you install buck before contributing to Yoga. Yoga's main implementation is in C, with bindings to supported languages and frameworks. When making changes to Yoga please ensure the changes are also propagated to these bindings when applicable.
|
||||
|
||||
@@ -33,9 +23,6 @@ You may need to install the latest watir-webdriver gem (`gem install watir-webdr
|
||||
### .NET
|
||||
.NET testing is not integrated in buck yet, you might need to set up .NET testing environment. We have a script which to launch C# test on macOS, `csharp/tests/Facebook.Yoga/test_macos.sh`.
|
||||
|
||||
## Code style
|
||||
For the main C implementation of Yoga clang-format is used to ensure a consistent code style. Please run `bash format.sh` before submitting a pull request. For other languages just try to follow the current code style.
|
||||
|
||||
## Benchmarks
|
||||
Benchmarks are located in `benchmark/YGBenchmark.c` and can be run with `buck run //benchmark:benchmark`. If you think your change has affected performance please run this before and after your change to validate that nothing has regressed. Benchmarks are run on every commit in CI.
|
||||
|
||||
@@ -59,5 +46,3 @@ This will now only run the standalone webpack build upon install.
|
||||
| node | Builds node js version. |
|
||||
| standalone | Runs webpack. |
|
||||
| none | Does nothing. You can use the prepackaged libs. |
|
||||
|
||||
|
||||
|
47
YOGA_DEFS
47
YOGA_DEFS
@@ -1,47 +0,0 @@
|
||||
|
||||
YOGA_ROOTS = ['//...']
|
||||
JAVA_TARGET = '//java:java'
|
||||
INFER_ANNOTATIONS_TARGET = '//lib/infer-annotations:infer-annotations'
|
||||
JSR_305_TARGET = '//lib/jsr-305:jsr-305'
|
||||
JUNIT_TARGET = '//lib/junit:junit'
|
||||
PROGRUARD_ANNOTATIONS_TARGET = '//java/proguard-annotations/src/main/java/com/facebook/proguard/annotations:annotations'
|
||||
SOLOADER_TARGET = '//lib/soloader:soloader'
|
||||
GTEST_TARGET = '//lib/gtest:gtest'
|
||||
JNI_TARGET = '//lib/jni:jni'
|
||||
FBJNI_TARGET = '//lib/fb:fbjni'
|
||||
FBJNI_JAVA_TARGET = '//lib/fb/src/main/java/com/facebook/jni:jni'
|
||||
APPCOMPAT_TARGET = '//lib/appcompat:appcompat'
|
||||
ANDROID_SUPPORT_TARGET = '//lib/android-support:android-support'
|
||||
ANDROID_TARGET = '//android:android'
|
||||
ANDROID_JAVA_TARGET = '//android/src/main/java/com/facebook/yoga/android:android'
|
||||
ANDROID_RES_TARGET = '//android:res'
|
||||
ANDROID_SAMPLE_JAVA_TARGET = '//android/sample/java/com/facebook/samples/yoga:yoga'
|
||||
ANDROID_SAMPLE_RES_TARGET = '//android/sample:res'
|
||||
|
||||
THIS_IS_FBOBJC = False
|
||||
|
||||
CXX_LIBRARY_WHITELIST = [
|
||||
'//:yoga',
|
||||
'//lib/fb:fbjni',
|
||||
'//java:jni',
|
||||
]
|
||||
|
||||
BASE_COMPILER_FLAGS = [
|
||||
'-fno-omit-frame-pointer',
|
||||
'-fexceptions',
|
||||
'-Wall',
|
||||
'-Werror',
|
||||
'-O3',
|
||||
]
|
||||
|
||||
LIBRARY_COMPILER_FLAGS = BASE_COMPILER_FLAGS + [
|
||||
'-fPIC',
|
||||
]
|
||||
|
||||
def yoga_dep(dep):
|
||||
return '//' + dep
|
||||
|
||||
with allow_unsafe_import():
|
||||
import os.path
|
||||
def isdir(filename):
|
||||
return os.path.isdir(filename)
|
@@ -1,7 +1,7 @@
|
||||
Pod::Spec.new do |spec|
|
||||
spec.name = 'Yoga'
|
||||
spec.version = '1.7.0'
|
||||
spec.license = { :type => 'BSD', :file => "LICENSE" }
|
||||
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
||||
spec.homepage = 'https://facebook.github.io/yoga/'
|
||||
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/c/'
|
||||
|
||||
@@ -21,8 +21,8 @@ Pod::Spec.new do |spec|
|
||||
'-fexceptions',
|
||||
'-Wall',
|
||||
'-Werror',
|
||||
'-std=c11',
|
||||
'-std=c++1y',
|
||||
'-fPIC'
|
||||
]
|
||||
spec.source_files = 'yoga/**/*.{c,h}'
|
||||
spec.source_files = 'yoga/**/*.{c,h,cpp}'
|
||||
end
|
||||
|
@@ -1,7 +1,7 @@
|
||||
podspec = Pod::Spec.new do |spec|
|
||||
spec.name = 'YogaKit'
|
||||
spec.version = '1.7.0'
|
||||
spec.license = { :type => 'BSD', :file => "LICENSE" }
|
||||
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
||||
spec.homepage = 'https://facebook.github.io/yoga/'
|
||||
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/yogakit/'
|
||||
|
||||
|
18
YogaKit/BUCK
18
YogaKit/BUCK
@@ -1,11 +1,9 @@
|
||||
# Copyright (c) 2014-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
include_defs("//YOGA_DEFS")
|
||||
load("//:yoga_defs.bzl", "yoga_dep", "apple_library", "apple_test")
|
||||
|
||||
COMPILER_FLAGS = [
|
||||
"-fobjc-arc",
|
||||
@@ -30,12 +28,20 @@ COMPILER_FLAGS = [
|
||||
apple_library(
|
||||
name = "YogaKit",
|
||||
srcs = glob(["Source/**/*.m"]),
|
||||
exported_headers = glob(["Source/**/*.h"]),
|
||||
header_namespace = "",
|
||||
exported_headers = subdir_glob(
|
||||
[
|
||||
("", "Source/**/*.h"),
|
||||
("Source", "**/*.h"),
|
||||
],
|
||||
prefix = "YogaKit",
|
||||
),
|
||||
compiler_flags = COMPILER_FLAGS,
|
||||
frameworks = [
|
||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||
],
|
||||
header_path_prefix = "",
|
||||
link_whole = True,
|
||||
visibility = ["PUBLIC"],
|
||||
deps = [
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "YGLayout.h"
|
||||
@@ -12,7 +10,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^YGLayoutConfigurationBlock)(YGLayout *);
|
||||
typedef void (^YGLayoutConfigurationBlock)(YGLayout *layout);
|
||||
|
||||
@interface UIView (Yoga)
|
||||
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "UIView+Yoga.h"
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "YGLayout.h"
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@@ -23,13 +21,21 @@ YG_EXTERN_C_END
|
||||
|
||||
typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) {
|
||||
YGDimensionFlexibilityFlexibleWidth = 1 << 0,
|
||||
YGDimensionFlexibilityFlexibleHeigth = 1 << 1,
|
||||
YGDimensionFlexibilityFlexibleHeight = 1 << 1,
|
||||
};
|
||||
|
||||
@interface YGLayout : NSObject
|
||||
|
||||
/**
|
||||
The property that decides if we should include this view when calculating layout. Defaults to YES.
|
||||
Make default init unavailable, as it will not initialise YGNode which is
|
||||
required for the setters and getters of YGLayout's properties to work properly.
|
||||
*/
|
||||
- (instancetype)init
|
||||
__attribute__((unavailable("you are not meant to initialise YGLayout")));
|
||||
|
||||
/**
|
||||
The property that decides if we should include this view when calculating
|
||||
layout. Defaults to YES.
|
||||
*/
|
||||
@property (nonatomic, readwrite, assign, setter=setIncludedInLayout:) BOOL isIncludedInLayout;
|
||||
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "YGLayout+Private.h"
|
||||
@@ -30,6 +28,9 @@
|
||||
- (void)set##capitalized_name:(YGValue)lowercased_name \
|
||||
{ \
|
||||
switch (lowercased_name.unit) { \
|
||||
case YGUnitUndefined: \
|
||||
YGNodeStyleSet##capitalized_name(self.node, lowercased_name.value); \
|
||||
break; \
|
||||
case YGUnitPoint: \
|
||||
YGNodeStyleSet##capitalized_name(self.node, lowercased_name.value); \
|
||||
break; \
|
||||
@@ -41,6 +42,29 @@
|
||||
} \
|
||||
}
|
||||
|
||||
#define YG_AUTO_VALUE_PROPERTY(lowercased_name, capitalized_name) \
|
||||
- (YGValue)lowercased_name \
|
||||
{ \
|
||||
return YGNodeStyleGet##capitalized_name(self.node); \
|
||||
} \
|
||||
\
|
||||
- (void)set##capitalized_name:(YGValue)lowercased_name \
|
||||
{ \
|
||||
switch (lowercased_name.unit) { \
|
||||
case YGUnitPoint: \
|
||||
YGNodeStyleSet##capitalized_name(self.node, lowercased_name.value); \
|
||||
break; \
|
||||
case YGUnitPercent: \
|
||||
YGNodeStyleSet##capitalized_name##Percent(self.node, lowercased_name.value); \
|
||||
break; \
|
||||
case YGUnitAuto: \
|
||||
YGNodeStyleSet##capitalized_name##Auto(self.node); \
|
||||
break; \
|
||||
default: \
|
||||
NSAssert(NO, @"Not implemented"); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define YG_EDGE_PROPERTY_GETTER(type, lowercased_name, capitalized_name, property, edge) \
|
||||
- (type)lowercased_name \
|
||||
{ \
|
||||
@@ -61,6 +85,9 @@ YG_EDGE_PROPERTY_SETTER(lowercased_name, capitalized_name, property, edge)
|
||||
- (void)set##objc_capitalized_name:(YGValue)objc_lowercased_name \
|
||||
{ \
|
||||
switch (objc_lowercased_name.unit) { \
|
||||
case YGUnitUndefined: \
|
||||
YGNodeStyleSet##c_name(self.node, edge, objc_lowercased_name.value); \
|
||||
break; \
|
||||
case YGUnitPoint: \
|
||||
YGNodeStyleSet##c_name(self.node, edge, objc_lowercased_name.value); \
|
||||
break; \
|
||||
@@ -202,7 +229,7 @@ YG_PROPERTY(YGDisplay, display, Display)
|
||||
|
||||
YG_PROPERTY(CGFloat, flexGrow, FlexGrow)
|
||||
YG_PROPERTY(CGFloat, flexShrink, FlexShrink)
|
||||
YG_VALUE_PROPERTY(flexBasis, FlexBasis)
|
||||
YG_AUTO_VALUE_PROPERTY(flexBasis, FlexBasis)
|
||||
|
||||
YG_VALUE_EDGE_PROPERTY(left, Left, Position, YGEdgeLeft)
|
||||
YG_VALUE_EDGE_PROPERTY(top, Top, Position, YGEdgeTop)
|
||||
@@ -221,8 +248,8 @@ YG_EDGE_PROPERTY(borderStartWidth, BorderStartWidth, Border, YGEdgeStart)
|
||||
YG_EDGE_PROPERTY(borderEndWidth, BorderEndWidth, Border, YGEdgeEnd)
|
||||
YG_EDGE_PROPERTY(borderWidth, BorderWidth, Border, YGEdgeAll)
|
||||
|
||||
YG_VALUE_PROPERTY(width, Width)
|
||||
YG_VALUE_PROPERTY(height, Height)
|
||||
YG_AUTO_VALUE_PROPERTY(width, Width)
|
||||
YG_AUTO_VALUE_PROPERTY(height, Height)
|
||||
YG_VALUE_PROPERTY(minWidth, MinWidth)
|
||||
YG_VALUE_PROPERTY(minHeight, MinHeight)
|
||||
YG_VALUE_PROPERTY(maxWidth, MaxWidth)
|
||||
@@ -254,7 +281,7 @@ YG_PROPERTY(CGFloat, aspectRatio, AspectRatio)
|
||||
if (dimensionFlexibility & YGDimensionFlexibilityFlexibleWidth) {
|
||||
size.width = YGUndefined;
|
||||
}
|
||||
if (dimensionFlexibility & YGDimensionFlexibilityFlexibleHeigth) {
|
||||
if (dimensionFlexibility & YGDimensionFlexibilityFlexibleHeight) {
|
||||
size.height = YGUndefined;
|
||||
}
|
||||
[self calculateLayoutWithSize:size];
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
postfix operator %
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
@@ -181,7 +179,9 @@
|
||||
view.yoga.height = YGPointValue(100);
|
||||
[container addSubview:view];
|
||||
|
||||
[container.yoga applyLayoutPreservingOrigin:YES dimensionFlexibility:YGDimensionFlexibilityFlexibleHeigth];
|
||||
[container.yoga
|
||||
applyLayoutPreservingOrigin:YES
|
||||
dimensionFlexibility:YGDimensionFlexibilityFlexibleHeight];
|
||||
XCTAssertEqual(200, container.frame.size.width);
|
||||
XCTAssertEqual(100, container.frame.size.height);
|
||||
}
|
||||
@@ -197,7 +197,10 @@
|
||||
view.yoga.height = YGPointValue(100);
|
||||
[container addSubview:view];
|
||||
|
||||
[container.yoga applyLayoutPreservingOrigin:YES dimensionFlexibility:YGDimensionFlexibilityFlexibleWidth | YGDimensionFlexibilityFlexibleHeigth];
|
||||
[container.yoga
|
||||
applyLayoutPreservingOrigin:YES
|
||||
dimensionFlexibility:YGDimensionFlexibilityFlexibleWidth |
|
||||
YGDimensionFlexibilityFlexibleHeight];
|
||||
XCTAssertEqual(100, container.frame.size.width);
|
||||
XCTAssertEqual(100, container.frame.size.height);
|
||||
}
|
||||
|
@@ -1,11 +1,9 @@
|
||||
# Copyright (c) 2014-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
include_defs("//YOGA_DEFS")
|
||||
load("//:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "PROGRUARD_ANNOTATIONS_TARGET", "android_aar", "android_resource")
|
||||
|
||||
android_aar(
|
||||
name = "android",
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# This source code is licensed under the license found in the
|
||||
# LICENSE-examples file in the root directory of this source tree.
|
||||
|
||||
include_defs("//YOGA_DEFS")
|
||||
load("//:yoga_defs.bzl", "ANDROID_SAMPLE_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "ANDROID_RES_TARGET", "android_binary", "android_resource")
|
||||
|
||||
android_binary(
|
||||
name = "sample",
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
include_defs("//YOGA_DEFS")
|
||||
load("//:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "ANDROID_SUPPORT_TARGET", "APPCOMPAT_TARGET", "SOLOADER_TARGET", "android_library")
|
||||
|
||||
android_library(
|
||||
name = "yoga",
|
||||
|
@@ -2,11 +2,9 @@
|
||||
|
||||
<!--
|
||||
Copyright (c) 2014-present, Facebook, Inc.
|
||||
All rights reserved.
|
||||
|
||||
This source code is licensed under the BSD-style license found in the
|
||||
LICENSE file in the root directory of this source tree. An additional grant
|
||||
of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
This source code is licensed under the MIT license found in the
|
||||
LICENSE file in the root directory of this source tree.
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
@@ -1,11 +1,9 @@
|
||||
# Copyright (c) 2014-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
include_defs("//YOGA_DEFS")
|
||||
load("//:yoga_defs.bzl", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "JSR_305_TARGET", "SOLOADER_TARGET", "android_library")
|
||||
|
||||
android_library(
|
||||
name = "android",
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.yoga.android;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.yoga.android;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.yoga.android;
|
||||
|
@@ -2,11 +2,9 @@
|
||||
|
||||
<!--
|
||||
Copyright (c) 2014-present, Facebook, Inc.
|
||||
All rights reserved.
|
||||
|
||||
This source code is licensed under the BSD-style license found in the
|
||||
LICENSE file in the root directory of this source tree. An additional grant
|
||||
of patent rights can be found in the PATENTS file in the same directory.
|
||||
|
||||
This source code is licensed under the MIT license found in the
|
||||
LICENSE file in the root directory of this source tree.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
@@ -1,11 +1,9 @@
|
||||
# Copyright (c) 2014-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
include_defs("//YOGA_DEFS")
|
||||
load("//:yoga_defs.bzl", "yoga_dep")
|
||||
|
||||
cxx_binary(
|
||||
name = "benchmark",
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#include "YGBenchmark.h"
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@@ -1,9 +1,8 @@
|
||||
/**
|
||||
* Copyright 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE-examples file in the root directory of this source tree.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System.Reflection;
|
||||
|
15
csharp/BUCK
15
csharp/BUCK
@@ -1,11 +1,9 @@
|
||||
# Copyright (c) 2014-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
include_defs("//YOGA_DEFS")
|
||||
load("//:yoga_defs.bzl", "BASE_COMPILER_FLAGS", "yoga_dep", "cxx_library", "is_apple_platform")
|
||||
|
||||
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ["-std=c++11"]
|
||||
|
||||
@@ -34,10 +32,10 @@ cxx_library(
|
||||
deps = [yoga_dep(":yoga")],
|
||||
)
|
||||
|
||||
if isdir('/Applications/Xcode.app'):
|
||||
if is_apple_platform():
|
||||
yoganet_ios_srcs = []
|
||||
for arch in [
|
||||
'iphonesimulator-x86_64', 'iphonesimulator-i386', 'iphoneos-arm64', 'iphoneos-armv7'
|
||||
'iphonesimulator-x86_64', 'iphoneos-arm64'
|
||||
]:
|
||||
name = 'yoganet-' + arch
|
||||
yoganet_ios_srcs.append(':' + name)
|
||||
@@ -65,8 +63,7 @@ if isdir('/Applications/Xcode.app'):
|
||||
genrule(
|
||||
name = 'yoganet-macosx',
|
||||
srcs = [
|
||||
yoga_dep(yoganet_macosx_target % 'x86_64'),
|
||||
yoga_dep(yoganet_macosx_target % 'i386'),
|
||||
yoga_dep(yoganet_macosx_target % 'x86_64')
|
||||
],
|
||||
out = 'libyoga.dylib',
|
||||
cmd = 'lipo $SRCS -create -output $OUT',
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
@@ -16,5 +14,6 @@ namespace Facebook.Yoga
|
||||
FlexEnd,
|
||||
SpaceBetween,
|
||||
SpaceAround,
|
||||
SpaceEvenly,
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
namespace Facebook.Yoga
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,9 +1,8 @@
|
||||
/**
|
||||
* Copyright 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE-examples file in the root directory of this source tree.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
#!/bin/sh
|
||||
# Copyright (c) 2014-present, Facebook, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This source code is licensed under the BSD-style license found in the
|
||||
# LICENSE file in the root directory of this source tree. An additional grant
|
||||
# of patent rights can be found in the PATENTS file in the same directory.
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
set -e
|
||||
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System.Reflection;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System.Reflection;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#include "YGInterop.h"
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// stdafx.h : include file for standard system include files,
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd `dirname "$0"`
|
||||
echo $ANDROID_SDK
|
||||
BUCK_RELEASE=2017.05.09.01
|
||||
BUCK_RELEASE=2018.02.16.01
|
||||
echo "buck $BUCK_RELEASE"
|
||||
BUCK=lib/buck-$BUCK_RELEASE/bin/buck
|
||||
if $BUCK --version >/dev/null 2>&1; then true; else
|
||||
|
@@ -1,9 +1,8 @@
|
||||
/**
|
||||
* Copyright 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE-examples file in the root directory of this source tree.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,9 +1,8 @@
|
||||
/**
|
||||
* Copyright 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the license found in the
|
||||
* LICENSE-examples file in the root directory of this source tree.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAbsolutePositionTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignContentTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignItemsTest.html
|
||||
@@ -1958,5 +1956,211 @@ namespace Facebook.Yoga
|
||||
Assert.AreEqual(20f, root_child0_child0_child0.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_align_flex_start_with_shrinking_children()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.Width = 500;
|
||||
root.Height = 500;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.AlignItems = YogaAlign.FlexStart;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0.FlexGrow = 1;
|
||||
root_child0_child0.FlexShrink = 1;
|
||||
root_child0.Insert(0, root_child0_child0);
|
||||
|
||||
YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0_child0.FlexGrow = 1;
|
||||
root_child0_child0_child0.FlexShrink = 1;
|
||||
root_child0_child0.Insert(0, root_child0_child0_child0);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(500f, root.LayoutWidth);
|
||||
Assert.AreEqual(500f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(500f, root.LayoutWidth);
|
||||
Assert.AreEqual(500f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(500f, root_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_align_flex_start_with_stretching_children()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.Width = 500;
|
||||
root.Height = 500;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0.FlexGrow = 1;
|
||||
root_child0_child0.FlexShrink = 1;
|
||||
root_child0.Insert(0, root_child0_child0);
|
||||
|
||||
YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0_child0.FlexGrow = 1;
|
||||
root_child0_child0_child0.FlexShrink = 1;
|
||||
root_child0_child0.Insert(0, root_child0_child0_child0);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(500f, root.LayoutWidth);
|
||||
Assert.AreEqual(500f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||
Assert.AreEqual(500f, root_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(500f, root_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(500f, root.LayoutWidth);
|
||||
Assert.AreEqual(500f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||
Assert.AreEqual(500f, root_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(500f, root_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_align_flex_start_with_shrinking_children_with_stretch()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.Width = 500;
|
||||
root.Height = 500;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.AlignItems = YogaAlign.FlexStart;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0.FlexGrow = 1;
|
||||
root_child0_child0.FlexShrink = 1;
|
||||
root_child0.Insert(0, root_child0_child0);
|
||||
|
||||
YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0_child0.FlexGrow = 1;
|
||||
root_child0_child0_child0.FlexShrink = 1;
|
||||
root_child0_child0.Insert(0, root_child0_child0_child0);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(500f, root.LayoutWidth);
|
||||
Assert.AreEqual(500f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(500f, root.LayoutWidth);
|
||||
Assert.AreEqual(500f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(500f, root_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignSelfTest.html
|
||||
|
299
csharp/tests/Facebook.Yoga/YGAndroidNewsFeed.cs
Normal file
299
csharp/tests/Facebook.Yoga/YGAndroidNewsFeed.cs
Normal file
@@ -0,0 +1,299 @@
|
||||
/**
|
||||
* Copyright (c) 2014-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.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAndroidNewsFeed.html
|
||||
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Facebook.Yoga
|
||||
{
|
||||
[TestFixture]
|
||||
public class YGAndroidNewsFeed
|
||||
{
|
||||
[Test]
|
||||
public void Test_android_news_feed()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.AlignContent = YogaAlign.Stretch;
|
||||
root.Width = 1080;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||
root_child0.Insert(0, root_child0_child0);
|
||||
|
||||
YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0.Insert(0, root_child0_child0_child0);
|
||||
|
||||
YogaNode root_child0_child0_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0_child0_child0.FlexDirection = YogaFlexDirection.Row;
|
||||
root_child0_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child0_child0.AlignItems = YogaAlign.FlexStart;
|
||||
root_child0_child0_child0_child0.MarginStart = 36;
|
||||
root_child0_child0_child0_child0.MarginTop = 24;
|
||||
root_child0_child0_child0.Insert(0, root_child0_child0_child0_child0);
|
||||
|
||||
YogaNode root_child0_child0_child0_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0_child0_child0_child0.FlexDirection = YogaFlexDirection.Row;
|
||||
root_child0_child0_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child0_child0.Insert(0, root_child0_child0_child0_child0_child0);
|
||||
|
||||
YogaNode root_child0_child0_child0_child0_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0_child0_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child0_child0_child0_child0.Width = 120;
|
||||
root_child0_child0_child0_child0_child0_child0.Height = 120;
|
||||
root_child0_child0_child0_child0_child0.Insert(0, root_child0_child0_child0_child0_child0_child0);
|
||||
|
||||
YogaNode root_child0_child0_child0_child0_child1 = new YogaNode(config);
|
||||
root_child0_child0_child0_child0_child1.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child0_child0_child1.FlexShrink = 1;
|
||||
root_child0_child0_child0_child0_child1.MarginRight = 36;
|
||||
root_child0_child0_child0_child0_child1.PaddingLeft = 36;
|
||||
root_child0_child0_child0_child0_child1.PaddingTop = 21;
|
||||
root_child0_child0_child0_child0_child1.PaddingRight = 36;
|
||||
root_child0_child0_child0_child0_child1.PaddingBottom = 18;
|
||||
root_child0_child0_child0_child0.Insert(1, root_child0_child0_child0_child0_child1);
|
||||
|
||||
YogaNode root_child0_child0_child0_child0_child1_child0 = new YogaNode(config);
|
||||
root_child0_child0_child0_child0_child1_child0.FlexDirection = YogaFlexDirection.Row;
|
||||
root_child0_child0_child0_child0_child1_child0.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child0_child0_child1_child0.FlexShrink = 1;
|
||||
root_child0_child0_child0_child0_child1.Insert(0, root_child0_child0_child0_child0_child1_child0);
|
||||
|
||||
YogaNode root_child0_child0_child0_child0_child1_child1 = new YogaNode(config);
|
||||
root_child0_child0_child0_child0_child1_child1.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child0_child0_child1_child1.FlexShrink = 1;
|
||||
root_child0_child0_child0_child0_child1.Insert(1, root_child0_child0_child0_child0_child1_child1);
|
||||
|
||||
YogaNode root_child0_child0_child1 = new YogaNode(config);
|
||||
root_child0_child0_child1.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0.Insert(1, root_child0_child0_child1);
|
||||
|
||||
YogaNode root_child0_child0_child1_child0 = new YogaNode(config);
|
||||
root_child0_child0_child1_child0.FlexDirection = YogaFlexDirection.Row;
|
||||
root_child0_child0_child1_child0.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child1_child0.AlignItems = YogaAlign.FlexStart;
|
||||
root_child0_child0_child1_child0.MarginStart = 174;
|
||||
root_child0_child0_child1_child0.MarginTop = 24;
|
||||
root_child0_child0_child1.Insert(0, root_child0_child0_child1_child0);
|
||||
|
||||
YogaNode root_child0_child0_child1_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0_child1_child0_child0.FlexDirection = YogaFlexDirection.Row;
|
||||
root_child0_child0_child1_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child1_child0.Insert(0, root_child0_child0_child1_child0_child0);
|
||||
|
||||
YogaNode root_child0_child0_child1_child0_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0_child1_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child1_child0_child0_child0.Width = 72;
|
||||
root_child0_child0_child1_child0_child0_child0.Height = 72;
|
||||
root_child0_child0_child1_child0_child0.Insert(0, root_child0_child0_child1_child0_child0_child0);
|
||||
|
||||
YogaNode root_child0_child0_child1_child0_child1 = new YogaNode(config);
|
||||
root_child0_child0_child1_child0_child1.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child1_child0_child1.FlexShrink = 1;
|
||||
root_child0_child0_child1_child0_child1.MarginRight = 36;
|
||||
root_child0_child0_child1_child0_child1.PaddingLeft = 36;
|
||||
root_child0_child0_child1_child0_child1.PaddingTop = 21;
|
||||
root_child0_child0_child1_child0_child1.PaddingRight = 36;
|
||||
root_child0_child0_child1_child0_child1.PaddingBottom = 18;
|
||||
root_child0_child0_child1_child0.Insert(1, root_child0_child0_child1_child0_child1);
|
||||
|
||||
YogaNode root_child0_child0_child1_child0_child1_child0 = new YogaNode(config);
|
||||
root_child0_child0_child1_child0_child1_child0.FlexDirection = YogaFlexDirection.Row;
|
||||
root_child0_child0_child1_child0_child1_child0.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child1_child0_child1_child0.FlexShrink = 1;
|
||||
root_child0_child0_child1_child0_child1.Insert(0, root_child0_child0_child1_child0_child1_child0);
|
||||
|
||||
YogaNode root_child0_child0_child1_child0_child1_child1 = new YogaNode(config);
|
||||
root_child0_child0_child1_child0_child1_child1.AlignContent = YogaAlign.Stretch;
|
||||
root_child0_child0_child1_child0_child1_child1.FlexShrink = 1;
|
||||
root_child0_child0_child1_child0_child1.Insert(1, root_child0_child0_child1_child0_child1_child1);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(1080f, root.LayoutWidth);
|
||||
Assert.AreEqual(240f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(1080f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(240f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||
Assert.AreEqual(1080f, root_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(240f, root_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(1080f, root_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(144f, root_child0_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(36f, root_child0_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(24f, root_child0_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(1044f, root_child0_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0_child1.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1.LayoutY);
|
||||
Assert.AreEqual(72f, root_child0_child0_child0_child0_child1.LayoutWidth);
|
||||
Assert.AreEqual(39f, root_child0_child0_child0_child0_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(36f, root_child0_child0_child0_child0_child1_child0.LayoutX);
|
||||
Assert.AreEqual(21f, root_child0_child0_child0_child0_child1_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(36f, root_child0_child0_child0_child0_child1_child1.LayoutX);
|
||||
Assert.AreEqual(21f, root_child0_child0_child0_child0_child1_child1.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child1.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child1.LayoutX);
|
||||
Assert.AreEqual(144f, root_child0_child0_child1.LayoutY);
|
||||
Assert.AreEqual(1080f, root_child0_child0_child1.LayoutWidth);
|
||||
Assert.AreEqual(96f, root_child0_child0_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(174f, root_child0_child0_child1_child0.LayoutX);
|
||||
Assert.AreEqual(24f, root_child0_child0_child1_child0.LayoutY);
|
||||
Assert.AreEqual(906f, root_child0_child0_child1_child0.LayoutWidth);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0.LayoutY);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child1.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1.LayoutY);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child1.LayoutWidth);
|
||||
Assert.AreEqual(39f, root_child0_child0_child1_child0_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(36f, root_child0_child0_child1_child0_child1_child0.LayoutX);
|
||||
Assert.AreEqual(21f, root_child0_child0_child1_child0_child1_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(36f, root_child0_child0_child1_child0_child1_child1.LayoutX);
|
||||
Assert.AreEqual(21f, root_child0_child0_child1_child0_child1_child1.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child1.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child1.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(1080f, root.LayoutWidth);
|
||||
Assert.AreEqual(240f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(1080f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(240f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||
Assert.AreEqual(1080f, root_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(240f, root_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(1080f, root_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(144f, root_child0_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(24f, root_child0_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(1044f, root_child0_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(924f, root_child0_child0_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(816f, root_child0_child0_child0_child0_child1.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1.LayoutY);
|
||||
Assert.AreEqual(72f, root_child0_child0_child0_child0_child1.LayoutWidth);
|
||||
Assert.AreEqual(39f, root_child0_child0_child0_child0_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(36f, root_child0_child0_child0_child0_child1_child0.LayoutX);
|
||||
Assert.AreEqual(21f, root_child0_child0_child0_child0_child1_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(36f, root_child0_child0_child0_child0_child1_child1.LayoutX);
|
||||
Assert.AreEqual(21f, root_child0_child0_child0_child0_child1_child1.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child1.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child1.LayoutX);
|
||||
Assert.AreEqual(144f, root_child0_child0_child1.LayoutY);
|
||||
Assert.AreEqual(1080f, root_child0_child0_child1.LayoutWidth);
|
||||
Assert.AreEqual(96f, root_child0_child0_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0.LayoutX);
|
||||
Assert.AreEqual(24f, root_child0_child0_child1_child0.LayoutY);
|
||||
Assert.AreEqual(906f, root_child0_child0_child1_child0.LayoutWidth);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(834f, root_child0_child0_child1_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0.LayoutY);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0_child0.LayoutY);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0_child0.LayoutWidth);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(726f, root_child0_child0_child1_child0_child1.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1.LayoutY);
|
||||
Assert.AreEqual(72f, root_child0_child0_child1_child0_child1.LayoutWidth);
|
||||
Assert.AreEqual(39f, root_child0_child0_child1_child0_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(36f, root_child0_child0_child1_child0_child1_child0.LayoutX);
|
||||
Assert.AreEqual(21f, root_child0_child0_child1_child0_child1_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child0.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(36f, root_child0_child0_child1_child0_child1_child1.LayoutX);
|
||||
Assert.AreEqual(21f, root_child0_child0_child1_child0_child1_child1.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child1.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child1.LayoutHeight);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGBorderTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGDimensionTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGDisplayTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexDirectionTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexWrapTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGJustifyContentTest.html
|
||||
@@ -375,6 +373,7 @@ namespace Facebook.Yoga
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode(config);
|
||||
root_child1.Height = 10;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
YogaNode root_child2 = new YogaNode(config);
|
||||
@@ -396,10 +395,10 @@ namespace Facebook.Yoga
|
||||
Assert.AreEqual(0f, root_child1.LayoutX);
|
||||
Assert.AreEqual(10f, root_child1.LayoutY);
|
||||
Assert.AreEqual(102f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child1.LayoutHeight);
|
||||
Assert.AreEqual(10f, root_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child2.LayoutX);
|
||||
Assert.AreEqual(10f, root_child2.LayoutY);
|
||||
Assert.AreEqual(20f, root_child2.LayoutY);
|
||||
Assert.AreEqual(102f, root_child2.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
||||
|
||||
@@ -419,10 +418,10 @@ namespace Facebook.Yoga
|
||||
Assert.AreEqual(0f, root_child1.LayoutX);
|
||||
Assert.AreEqual(10f, root_child1.LayoutY);
|
||||
Assert.AreEqual(102f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(0f, root_child1.LayoutHeight);
|
||||
Assert.AreEqual(10f, root_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child2.LayoutX);
|
||||
Assert.AreEqual(10f, root_child2.LayoutY);
|
||||
Assert.AreEqual(20f, root_child2.LayoutY);
|
||||
Assert.AreEqual(102f, root_child2.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
||||
}
|
||||
@@ -699,5 +698,310 @@ namespace Facebook.Yoga
|
||||
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_justify_content_row_min_width_and_margin()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
root.JustifyContent = YogaJustify.Center;
|
||||
root.MarginLeft = 100;
|
||||
root.MinWidth = 50;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.Width = 20;
|
||||
root_child0.Height = 20;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(100f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(50f, root.LayoutWidth);
|
||||
Assert.AreEqual(20f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(15f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(20f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(20f, root_child0.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(100f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(50f, root.LayoutWidth);
|
||||
Assert.AreEqual(20f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(15f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(20f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(20f, root_child0.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_justify_content_row_max_width_and_margin()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
root.JustifyContent = YogaJustify.Center;
|
||||
root.MarginLeft = 100;
|
||||
root.Width = 100;
|
||||
root.MaxWidth = 80;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.Width = 20;
|
||||
root_child0.Height = 20;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(100f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(80f, root.LayoutWidth);
|
||||
Assert.AreEqual(20f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(30f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(20f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(20f, root_child0.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(100f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(80f, root.LayoutWidth);
|
||||
Assert.AreEqual(20f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(30f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(20f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(20f, root_child0.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_justify_content_column_min_height_and_margin()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.JustifyContent = YogaJustify.Center;
|
||||
root.MarginTop = 100;
|
||||
root.MinHeight = 50;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.Width = 20;
|
||||
root_child0.Height = 20;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(100f, root.LayoutY);
|
||||
Assert.AreEqual(20f, root.LayoutWidth);
|
||||
Assert.AreEqual(50f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(15f, root_child0.LayoutY);
|
||||
Assert.AreEqual(20f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(20f, root_child0.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(100f, root.LayoutY);
|
||||
Assert.AreEqual(20f, root.LayoutWidth);
|
||||
Assert.AreEqual(50f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(15f, root_child0.LayoutY);
|
||||
Assert.AreEqual(20f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(20f, root_child0.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_justify_content_colunn_max_height_and_margin()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.JustifyContent = YogaJustify.Center;
|
||||
root.MarginTop = 100;
|
||||
root.Height = 100;
|
||||
root.MaxHeight = 80;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.Width = 20;
|
||||
root_child0.Height = 20;
|
||||
root.Insert(0, root_child0);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(100f, root.LayoutY);
|
||||
Assert.AreEqual(20f, root.LayoutWidth);
|
||||
Assert.AreEqual(80f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(30f, root_child0.LayoutY);
|
||||
Assert.AreEqual(20f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(20f, root_child0.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(100f, root.LayoutY);
|
||||
Assert.AreEqual(20f, root.LayoutWidth);
|
||||
Assert.AreEqual(80f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(30f, root_child0.LayoutY);
|
||||
Assert.AreEqual(20f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(20f, root_child0.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_justify_content_column_space_evenly()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.JustifyContent = YogaJustify.SpaceEvenly;
|
||||
root.Width = 102;
|
||||
root.Height = 102;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.Height = 10;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode(config);
|
||||
root_child1.Height = 10;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
YogaNode root_child2 = new YogaNode(config);
|
||||
root_child2.Height = 10;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(102f, root.LayoutWidth);
|
||||
Assert.AreEqual(102f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(18f, root_child0.LayoutY);
|
||||
Assert.AreEqual(102f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child1.LayoutX);
|
||||
Assert.AreEqual(46f, root_child1.LayoutY);
|
||||
Assert.AreEqual(102f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child2.LayoutX);
|
||||
Assert.AreEqual(74f, root_child2.LayoutY);
|
||||
Assert.AreEqual(102f, root_child2.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(102f, root.LayoutWidth);
|
||||
Assert.AreEqual(102f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(18f, root_child0.LayoutY);
|
||||
Assert.AreEqual(102f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child1.LayoutX);
|
||||
Assert.AreEqual(46f, root_child1.LayoutY);
|
||||
Assert.AreEqual(102f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(0f, root_child2.LayoutX);
|
||||
Assert.AreEqual(74f, root_child2.LayoutY);
|
||||
Assert.AreEqual(102f, root_child2.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_justify_content_row_space_evenly()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
root.JustifyContent = YogaJustify.SpaceEvenly;
|
||||
root.Width = 102;
|
||||
root.Height = 102;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.Height = 10;
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode(config);
|
||||
root_child1.Height = 10;
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
YogaNode root_child2 = new YogaNode(config);
|
||||
root_child2.Height = 10;
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(102f, root.LayoutWidth);
|
||||
Assert.AreEqual(102f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(26f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(51f, root_child1.LayoutX);
|
||||
Assert.AreEqual(0f, root_child1.LayoutY);
|
||||
Assert.AreEqual(0f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(77f, root_child2.LayoutX);
|
||||
Assert.AreEqual(0f, root_child2.LayoutY);
|
||||
Assert.AreEqual(0f, root_child2.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(102f, root.LayoutWidth);
|
||||
Assert.AreEqual(102f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(77f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(51f, root_child1.LayoutX);
|
||||
Assert.AreEqual(0f, root_child1.LayoutY);
|
||||
Assert.AreEqual(0f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child1.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(26f, root_child2.LayoutX);
|
||||
Assert.AreEqual(0f, root_child2.LayoutY);
|
||||
Assert.AreEqual(0f, root_child2.LayoutWidth);
|
||||
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGMarginTest.html
|
||||
@@ -1607,5 +1605,121 @@ namespace Facebook.Yoga
|
||||
Assert.AreEqual(72f, root_child0.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_margin_auto_top_stretching_child()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.AlignItems = YogaAlign.Center;
|
||||
root.Width = 200;
|
||||
root.Height = 200;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.FlexGrow = 1;
|
||||
root_child0.FlexShrink = 1;
|
||||
root_child0.FlexBasis = 0.Percent();
|
||||
root_child0.MarginTop = YogaValue.Auto();
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode(config);
|
||||
root_child1.Width = 50;
|
||||
root_child1.Height = 50;
|
||||
root.Insert(1, root_child1);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(200f, root.LayoutWidth);
|
||||
Assert.AreEqual(200f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(100f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(150f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(75f, root_child1.LayoutX);
|
||||
Assert.AreEqual(150f, root_child1.LayoutY);
|
||||
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(50f, root_child1.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(200f, root.LayoutWidth);
|
||||
Assert.AreEqual(200f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(100f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(150f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(75f, root_child1.LayoutX);
|
||||
Assert.AreEqual(150f, root_child1.LayoutY);
|
||||
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(50f, root_child1.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test_margin_auto_left_stretching_child()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.AlignItems = YogaAlign.Center;
|
||||
root.Width = 200;
|
||||
root.Height = 200;
|
||||
|
||||
YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.FlexGrow = 1;
|
||||
root_child0.FlexShrink = 1;
|
||||
root_child0.FlexBasis = 0.Percent();
|
||||
root_child0.MarginLeft = YogaValue.Auto();
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode(config);
|
||||
root_child1.Width = 50;
|
||||
root_child1.Height = 50;
|
||||
root.Insert(1, root_child1);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(200f, root.LayoutWidth);
|
||||
Assert.AreEqual(200f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(200f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(150f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(75f, root_child1.LayoutX);
|
||||
Assert.AreEqual(150f, root_child1.LayoutY);
|
||||
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(50f, root_child1.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
|
||||
Assert.AreEqual(0f, root.LayoutX);
|
||||
Assert.AreEqual(0f, root.LayoutY);
|
||||
Assert.AreEqual(200f, root.LayoutWidth);
|
||||
Assert.AreEqual(200f, root.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(200f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(0f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(150f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(75f, root_child1.LayoutX);
|
||||
Assert.AreEqual(150f, root_child1.LayoutY);
|
||||
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(50f, root_child1.LayoutHeight);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGMinMaxDimensionTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGPaddingTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGPercentageTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGRoundingTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGSizeOverflowTest.html
|
||||
|
@@ -1,10 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
using NUnit.Framework;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user