Rename directories

Reviewed By: gkassabli

Differential Revision: D4284681

Summary: Rename csslayout directories to yoga

fbshipit-source-id: f0c6855c2c6e4389b7867f48f72cbb697830fc5a
This commit is contained in:
Emil Sjolander
2016-12-07 05:12:11 -08:00
committed by Facebook Github Bot
parent 40371cbf2d
commit b11155423c
89 changed files with 82 additions and 83 deletions

View File

@@ -21,7 +21,7 @@ before_install:
- export PATH=$JAVA_HOME/bin:$PATH - export PATH=$JAVA_HOME/bin:$PATH
script: script:
- buck test //:CSSLayout - buck test //:yoga
- buck test //java:java - buck test //java:java
- buck test //YogaKit:YogaKit --config cxx.default_platform=iphonesimulator-x86_64 --config cxx.cflags=-DTRAVIS_CI - buck test //YogaKit:YogaKit --config cxx.default_platform=iphonesimulator-x86_64 --config cxx.cflags=-DTRAVIS_CI
- sh csharp/tests/Facebook.Yoga/test_macos.sh - sh csharp/tests/Facebook.Yoga/test_macos.sh

10
BUCK
View File

@@ -24,14 +24,14 @@ COMPILER_FLAGS = BASE_COMPILER_FLAGS + ['-std=c11', '-fPIC']
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + ['-std=c++11'] TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + ['-std=c++11']
cxx_library( cxx_library(
name = 'CSSLayout', name = 'yoga',
srcs = glob(['CSSLayout/*.c']), srcs = glob(['yoga/*.c']),
tests=[':tests'], tests=[':tests'],
exported_headers = subdir_glob([('', 'CSSLayout/*.h')]), exported_headers = subdir_glob([('', 'yoga/*.h')]),
header_namespace = '', header_namespace = '',
compiler_flags = COMPILER_FLAGS, compiler_flags = COMPILER_FLAGS,
deps = [] if THIS_IS_FBOBJC else [ deps = [] if THIS_IS_FBOBJC else [
csslayout_dep('lib/fb:ndklog'), yoga_dep('lib/fb:ndklog'),
], ],
visibility = ['PUBLIC'], visibility = ['PUBLIC'],
) )
@@ -42,7 +42,7 @@ cxx_test(
srcs = glob(['tests/*.cpp']), srcs = glob(['tests/*.cpp']),
compiler_flags = TEST_COMPILER_FLAGS, compiler_flags = TEST_COMPILER_FLAGS,
deps = [ deps = [
':CSSLayout', ':yoga',
GTEST_TARGET, GTEST_TARGET,
], ],
visibility = ['PUBLIC'], visibility = ['PUBLIC'],

View File

@@ -1,5 +1,5 @@
CSSLAYOUT_ROOT = '//...' YOGA_ROOT = '//...'
INFER_ANNOTATIONS_TARGET = '//lib/infer-annotations:infer-annotations' INFER_ANNOTATIONS_TARGET = '//lib/infer-annotations:infer-annotations'
JSR_305_TARGET = '//lib/jsr-305:jsr-305' JSR_305_TARGET = '//lib/jsr-305:jsr-305'
JUNIT_TARGET = '//lib/junit:junit' JUNIT_TARGET = '//lib/junit:junit'
@@ -12,12 +12,12 @@ FBJNI_TARGET = '//lib/fb:fbjni'
THIS_IS_FBOBJC = False THIS_IS_FBOBJC = False
CXX_LIBRARY_WHITELIST = [ CXX_LIBRARY_WHITELIST = [
'//:CSSLayout', '//:yoga',
'//lib/fb:fbjni', '//lib/fb:fbjni',
'//java:jni', '//java:jni',
] ]
def csslayout_dep(dep): def yoga_dep(dep):
return '//' + dep return '//' + dep
class allow_unsafe_import: class allow_unsafe_import:

View File

@@ -7,7 +7,7 @@
include_defs('//YOGA_DEFS') include_defs('//YOGA_DEFS')
UIKIT_CSSLAYOUT_COMPILER_FLAGS = [ COMPILER_FLAGS = [
'-fobjc-arc', '-fobjc-arc',
'-Wconditional-uninitialized', '-Wconditional-uninitialized',
'-Wdangling-else', '-Wdangling-else',
@@ -29,7 +29,7 @@ UIKIT_CSSLAYOUT_COMPILER_FLAGS = [
apple_library( apple_library(
name = 'YogaKit', name = 'YogaKit',
compiler_flags = UIKIT_CSSLAYOUT_COMPILER_FLAGS, compiler_flags = COMPILER_FLAGS,
tests = [':YogaKitTests'], tests = [':YogaKitTests'],
srcs = glob(['*.m']), srcs = glob(['*.m']),
exported_headers = glob(['*.h']), exported_headers = glob(['*.h']),
@@ -38,14 +38,14 @@ apple_library(
'$SDKROOT/System/Library/Frameworks/UIKit.framework', '$SDKROOT/System/Library/Frameworks/UIKit.framework',
], ],
deps = [ deps = [
csslayout_dep(':CSSLayout'), yoga_dep(':yoga'),
], ],
visibility = ['PUBLIC'], visibility = ['PUBLIC'],
) )
apple_test( apple_test(
name = 'YogaKitTests', name = 'YogaKitTests',
compiler_flags = UIKIT_CSSLAYOUT_COMPILER_FLAGS, compiler_flags = COMPILER_FLAGS,
info_plist = 'Tests/Info.plist', info_plist = 'Tests/Info.plist',
srcs = glob(['Tests/**/*.m']), srcs = glob(['Tests/**/*.m']),
frameworks = [ frameworks = [

View File

@@ -8,7 +8,7 @@
*/ */
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import <CSSLayout/Yoga.h> #import <yoga/Yoga.h>
@interface UIView (Yoga) @interface UIView (Yoga)

View File

@@ -21,7 +21,7 @@ cxx_binary(
'-std=c11', '-std=c11',
], ],
deps = [ deps = [
csslayout_dep(':CSSLayout'), yoga_dep(':yoga'),
], ],
visibility = ['PUBLIC'], visibility = ['PUBLIC'],
) )

View File

@@ -9,7 +9,7 @@
#include "YGBenchmark.h" #include "YGBenchmark.h"
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
static YGSize _measure(YGNodeRef node, static YGSize _measure(YGNodeRef node,
float width, float width,

View File

@@ -6,14 +6,14 @@
# of patent rights can be found in the PATENTS file in the same directory. # of patent rights can be found in the PATENTS file in the same directory.
csharp_library( csharp_library(
name = 'csslibnet46', name = 'yogalibnet46',
dll_name = 'Facebook.Yoga.dll', dll_name = 'Facebook.Yoga.dll',
framework_ver = 'net46', framework_ver = 'net46',
srcs = glob(['**/*.cs']), srcs = glob(['**/*.cs']),
) )
csharp_library( csharp_library(
name = 'csslibnet45', name = 'yogalibnet45',
dll_name = 'Facebook.Yoga.dll', dll_name = 'Facebook.Yoga.dll',
framework_ver = 'net45', framework_ver = 'net45',
srcs = glob(['**/*.cs']), srcs = glob(['**/*.cs']),

View File

@@ -28,13 +28,13 @@ namespace Facebook.Yoga
public static extern IntPtr YGNodeNew(); public static extern IntPtr YGNodeNew();
[DllImport(DllName)] [DllImport(DllName)]
public static extern void YGNodeInit(IntPtr cssNode); public static extern void YGNodeInit(IntPtr node);
[DllImport(DllName)] [DllImport(DllName)]
public static extern void YGNodeFree(IntPtr cssNode); public static extern void YGNodeFree(IntPtr node);
[DllImport(DllName)] [DllImport(DllName)]
public static extern void YGNodeReset(IntPtr cssNode); public static extern void YGNodeReset(IntPtr node);
[DllImport(DllName)] [DllImport(DllName)]
public static extern int YGNodeGetInstanceCount(); public static extern int YGNodeGetInstanceCount();

View File

@@ -9,7 +9,7 @@
#pragma once #pragma once
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
YG_EXTERN_C_BEGIN YG_EXTERN_C_BEGIN

View File

@@ -150,16 +150,16 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\CSSLayout\Yoga.h" /> <ClInclude Include="..\..\yoga\Yoga.h" />
<ClInclude Include="..\..\CSSLayout\YGMacros.h" /> <ClInclude Include="..\..\yoga\YGMacros.h" />
<ClInclude Include="..\..\CSSLayout\YGNodeList.h" /> <ClInclude Include="..\..\yoga\YGNodeList.h" />
<ClInclude Include="YGInterop.h" /> <ClInclude Include="YGInterop.h" />
<ClInclude Include="stdafx.h" /> <ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" /> <ClInclude Include="targetver.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\CSSLayout\Yoga.c" /> <ClCompile Include="..\..\yoga\Yoga.c" />
<ClCompile Include="..\..\CSSLayout\YGNodeList.c" /> <ClCompile Include="..\..\yoga\YGNodeList.c" />
<ClCompile Include="YGInterop.cpp" /> <ClCompile Include="YGInterop.cpp" />
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged> <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>

View File

@@ -21,13 +21,13 @@
<ClInclude Include="targetver.h"> <ClInclude Include="targetver.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\CSSLayout\Yoga.h"> <ClInclude Include="..\..\yoga\Yoga.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\CSSLayout\YGMacros.h"> <ClInclude Include="..\..\yoga\YGMacros.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\CSSLayout\YGNodeList.h"> <ClInclude Include="..\..\yoga\YGNodeList.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="YGInterop.h"> <ClInclude Include="YGInterop.h">
@@ -41,10 +41,10 @@
<ClCompile Include="dllmain.cpp"> <ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\CSSLayout\Yoga.c"> <ClCompile Include="..\..\yoga\Yoga.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\CSSLayout\YGNodeList.c"> <ClCompile Include="..\..\yoga\YGNodeList.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="YGInterop.cpp"> <ClCompile Include="YGInterop.cpp">

View File

@@ -28,6 +28,6 @@ if [ -d $NUNIT \
rm NUnit-2.6.4.zip rm NUnit-2.6.4.zip
fi fi
clang -g -Wall -Wextra -dynamiclib -o libyoga.dylib -I../../.. ../../../CSSLayout/*.c ../../Yoga/YGInterop.cpp clang -g -Wall -Wextra -dynamiclib -o libyoga.dylib -I../../.. ../../../yoga/*.c ../../Yoga/YGInterop.cpp
mcs -debug -t:library -r:$NUNIT/nunit.framework.dll -out:YogaTest.dll *.cs ../../../csharp/Facebook.Yoga/*cs mcs -debug -t:library -r:$NUNIT/nunit.framework.dll -out:YogaTest.dll *.cs ../../../csharp/Facebook.Yoga/*cs
MONO_PATH=$NUNIT mono --arch=64 --debug $NUNIT/nunit-console.exe YogaTest.dll MONO_PATH=$NUNIT mono --arch=64 --debug $NUNIT/nunit-console.exe YogaTest.dll

View File

@@ -114,7 +114,7 @@ def to_java_upper(symbol):
root = os.path.dirname(__file__) root = os.path.dirname(__file__)
# write out C header # write out C header
with open(root + '/CSSLayout/YGEnums.h', 'w') as f: with open(root + '/yoga/YGEnums.h', 'w') as f:
f.write(LICENSE) f.write(LICENSE)
f.write('#pragma once\n\n') f.write('#pragma once\n\n')
f.write('#include "YGMacros.h"\n\n') f.write('#include "YGMacros.h"\n\n')
@@ -133,7 +133,7 @@ with open(root + '/CSSLayout/YGEnums.h', 'w') as f:
# write out java files # write out java files
for name, values in ENUMS.items(): for name, values in ENUMS.items():
with open(root + '/java/com/facebook/csslayout/Yoga%s.java' % name, 'w') as f: with open(root + '/java/com/facebook/yoga/Yoga%s.java' % name, 'w') as f:
f.write(LICENSE) f.write(LICENSE)
f.write('package com.facebook.yoga;\n\n') f.write('package com.facebook.yoga;\n\n')
f.write('import com.facebook.proguard.annotations.DoNotStrip;\n\n') f.write('import com.facebook.proguard.annotations.DoNotStrip;\n\n')

View File

@@ -29,7 +29,6 @@ clang-format \
SpaceAfterCStyleCast: true, \ SpaceAfterCStyleCast: true, \
UseTab: Never, \ UseTab: Never, \
}" "$@" \ }" "$@" \
-i $(dirname $0)/CSSLayout/*.{h,c,cpp} \ -i $(dirname $0)/yoga/*.{h,c,cpp} \
$(dirname $0)/tests/CSSLayoutTestUtils/*.{h,c,cpp} \
$(dirname $0)/benchmarks/*.{h,c,cpp} \ $(dirname $0)/benchmarks/*.{h,c,cpp} \
$(dirname $0)/java/jni/*.{h,c,cpp} $(dirname $0)/java/jni/*.{h,c,cpp}

View File

@@ -20,7 +20,7 @@ CPPEmitter.prototype = Object.create(Emitter.prototype, {
emitPrologue:{value:function() { emitPrologue:{value:function() {
this.push([ this.push([
'#include <CSSLayout/Yoga.h>', '#include <yoga/Yoga.h>',
'#include <gtest/gtest.h>', '#include <gtest/gtest.h>',
'', '',
]); ]);

View File

@@ -40,7 +40,7 @@ Dir['fixtures/*.html'].each do |file|
f.write eval(logs[0].message.sub(/^[^"]*/, '')) f.write eval(logs[0].message.sub(/^[^"]*/, ''))
f.close f.close
f = File.open("../java/tests/com/facebook/csslayout/#{name}.java", 'w') f = File.open("../java/tests/com/facebook/yoga/#{name}.java", 'w')
f.write eval(logs[1].message.sub(/^[^"]*/, '')).sub('YogaTest', name) f.write eval(logs[1].message.sub(/^[^"]*/, '')).sub('YogaTest', name)
f.close f.close

View File

@@ -24,16 +24,16 @@ cxx_library(
deps = [ deps = [
FBJNI_TARGET, FBJNI_TARGET,
JNI_TARGET, JNI_TARGET,
csslayout_dep(':CSSLayout'), yoga_dep(':yoga'),
], ],
visibility = ['PUBLIC'], visibility = ['PUBLIC'],
) )
java_library( java_library(
name = 'java', name = 'java',
srcs = glob(['com/facebook/csslayout/*.java']), srcs = glob(['com/facebook/yoga/*.java']),
tests=[ tests=[
csslayout_dep('java:tests'), yoga_dep('java:tests'),
], ],
source = '1.7', source = '1.7',
target = '1.7', target = '1.7',

View File

@@ -13,5 +13,5 @@ java_library(
source = '1.7', source = '1.7',
target = '1.7', target = '1.7',
deps = [], deps = [],
visibility = [CSSLAYOUT_ROOT], visibility = [YOGA_ROOT],
) )

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <fb/fbjni.h> #include <fb/fbjni.h>
#include <iostream> #include <iostream>

View File

@@ -13,7 +13,7 @@ prebuilt_cxx_library(
exported_platform_linker_flags = [ exported_platform_linker_flags = [
('android.*', ['-llog']), ('android.*', ['-llog']),
], ],
visibility = [CSSLAYOUT_ROOT], visibility = [YOGA_ROOT],
) )
cxx_library( cxx_library(

View File

@@ -23,5 +23,5 @@ cxx_library(
header_namespace = '', header_namespace = '',
compiler_flags = COMPILER_FLAGS, compiler_flags = COMPILER_FLAGS,
deps = [], deps = [],
visibility = [CSSLAYOUT_ROOT], visibility = [YOGA_ROOT],
) )

View File

@@ -17,5 +17,5 @@ java_library(
exported_deps = [ exported_deps = [
':infer-annotations-jar', ':infer-annotations-jar',
], ],
visibility = [CSSLAYOUT_ROOT], visibility = [YOGA_ROOT],
) )

View File

@@ -17,5 +17,5 @@ java_library(
exported_deps = [ exported_deps = [
':jsr305-jar', ':jsr305-jar',
], ],
visibility = [CSSLAYOUT_ROOT], visibility = [YOGA_ROOT],
) )

View File

@@ -17,5 +17,5 @@ java_library(
exported_deps = [ exported_deps = [
':junit-jar', ':junit-jar',
], ],
visibility = [CSSLAYOUT_ROOT], visibility = [YOGA_ROOT],
) )

View File

@@ -10,5 +10,5 @@ include_defs('//YOGA_DEFS')
android_prebuilt_aar( android_prebuilt_aar(
name = 'soloader', name = 'soloader',
aar = 'soloader-0.1.0.aar', aar = 'soloader-0.1.0.aar',
visibility = [CSSLAYOUT_ROOT], visibility = [YOGA_ROOT],
) )

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAbsolutePositionTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGAbsolutePositionTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, absolute_layout_width_height_start_top) { TEST(YogaTest, absolute_layout_width_height_start_top) {

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignContentTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignContentTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, align_content_flex_start) { TEST(YogaTest, align_content_flex_start) {

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignItemsTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignItemsTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, align_items_stretch) { TEST(YogaTest, align_items_stretch) {

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignSelfTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignSelfTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, align_self_center) { TEST(YogaTest, align_self_center) {

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGBorderTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGBorderTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, border_no_size) { TEST(YogaTest, border_no_size) {

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, dirty_propagation) { TEST(YogaTest, dirty_propagation) {

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, start_overrides) { TEST(YogaTest, start_overrides) {

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexDirectionTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexDirectionTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, flex_direction_column_no_height) { TEST(YogaTest, flex_direction_column_no_height) {

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, flex_basis_flex_grow_column) { TEST(YogaTest, flex_basis_flex_grow_column) {

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexWrapTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexWrapTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, wrap_column) { TEST(YogaTest, wrap_column) {

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGJustifyContentTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGJustifyContentTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, justify_content_row_flex_start) { TEST(YogaTest, justify_content_row_flex_start) {

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
static YGSize _measure(YGNodeRef node, static YGSize _measure(YGNodeRef node,

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, assert_default_values) { TEST(YogaTest, assert_default_values) {

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGMarginTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGMarginTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, margin_start) { TEST(YogaTest, margin_start) {

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
static YGSize _measureMax(YGNodeRef node, static YGSize _measureMax(YGNodeRef node,

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
struct _MeasureConstraint { struct _MeasureConstraint {

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
static YGSize _measure(YGNodeRef node, static YGSize _measure(YGNodeRef node,

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
extern int32_t gNodeInstanceCount; extern int32_t gNodeInstanceCount;

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGMinMaxDimensionTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGMinMaxDimensionTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, max_width) { TEST(YogaTest, max_width) {

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGPaddingTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGPaddingTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, padding_no_size) { TEST(YogaTest, padding_no_size) {

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, dont_cache_computed_flex_basis_between_layouts) { TEST(YogaTest, dont_cache_computed_flex_basis_between_layouts) {

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
static YGSize _measureFloor(YGNodeRef node, static YGSize _measureFloor(YGNodeRef node,

View File

@@ -9,7 +9,7 @@
// @Generated by gentest/gentest.rb from gentest/fixtures/YGRoundingTest.html // @Generated by gentest/gentest.rb from gentest/fixtures/YGRoundingTest.html
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, rounding_flex_basis_flex_grow_row_width_of_100) { TEST(YogaTest, rounding_flex_basis_flex_grow_row_width_of_100) {

View File

@@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory. * of patent rights can be found in the PATENTS file in the same directory.
*/ */
#include <CSSLayout/Yoga.h> #include <yoga/Yoga.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(YogaTest, copy_style_same) { TEST(YogaTest, copy_style_same) {

View File

@@ -2653,21 +2653,21 @@ inline bool YGIsExperimentalFeatureEnabled(YGExperimentalFeature feature) {
return experimentalFeatures[feature]; return experimentalFeatures[feature];
} }
void YGSetMemoryFuncs(YGMalloc YGMalloc, YGCalloc YGCalloc, YGRealloc YGRealloc, YGFree YGFree) { void YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree) {
YG_ASSERT(gNodeInstanceCount == 0, "Cannot set memory functions: all node must be freed first"); YG_ASSERT(gNodeInstanceCount == 0, "Cannot set memory functions: all node must be freed first");
YG_ASSERT((YGMalloc == NULL && YGCalloc == NULL && YGRealloc == NULL && YGFree == NULL) || YG_ASSERT((ygmalloc == NULL && yccalloc == NULL && ygrealloc == NULL && ygfree == NULL) ||
(YGMalloc != NULL && YGCalloc != NULL && YGRealloc != NULL && YGFree != NULL), (ygmalloc != NULL && yccalloc != NULL && ygrealloc != NULL && ygfree != NULL),
"Cannot set memory functions: functions must be all NULL or Non-NULL"); "Cannot set memory functions: functions must be all NULL or Non-NULL");
if (YGMalloc == NULL || YGCalloc == NULL || YGRealloc == NULL || YGFree == NULL) { if (ygmalloc == NULL || yccalloc == NULL || ygrealloc == NULL || ygfree == NULL) {
gYGMalloc = &malloc; gYGMalloc = &malloc;
gYGCalloc = &calloc; gYGCalloc = &calloc;
gYGRealloc = &realloc; gYGRealloc = &realloc;
gYGFree = &free; gYGFree = &free;
} else { } else {
gYGMalloc = YGMalloc; gYGMalloc = ygmalloc;
gYGCalloc = YGCalloc; gYGCalloc = yccalloc;
gYGRealloc = YGRealloc; gYGRealloc = ygrealloc;
gYGFree = YGFree; gYGFree = ygfree;
} }
} }

View File

@@ -175,6 +175,6 @@ WIN_EXPORT void YGSetExperimentalFeatureEnabled(YGExperimentalFeature feature, b
WIN_EXPORT bool YGIsExperimentalFeatureEnabled(YGExperimentalFeature feature); WIN_EXPORT bool YGIsExperimentalFeatureEnabled(YGExperimentalFeature feature);
WIN_EXPORT void WIN_EXPORT void
YGSetMemoryFuncs(YGMalloc cssMalloc, YGCalloc cssCalloc, YGRealloc cssRealloc, YGFree cssFree); YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree);
YG_EXTERN_C_END YG_EXTERN_C_END