Improve JS Travis testing
Summary: Build emscripten js file on travis Closes https://github.com/facebook/yoga/pull/397 Reviewed By: arcanis Differential Revision: D4579563 Pulled By: emilsjolander fbshipit-source-id: fa5f92fd26f758fb617e428c07aabf2dccd63b37
This commit is contained in:
committed by
Facebook Github Bot
parent
3f68b4f76b
commit
78ade6cfb5
64
.travis.yml
64
.travis.yml
@@ -19,49 +19,62 @@ env:
|
||||
- TARGET=android
|
||||
|
||||
before_install:
|
||||
- brew update
|
||||
- brew update > /dev/null
|
||||
- brew tap facebook/fb
|
||||
- brew install 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;
|
||||
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;
|
||||
brew install mono
|
||||
fi
|
||||
|
||||
# iOS
|
||||
- |
|
||||
if [[ $TARGET = "ios" ]]; then
|
||||
brew outdated xctool || brew upgrade xctool;
|
||||
brew outdated xctool || brew upgrade xctool
|
||||
fi
|
||||
|
||||
# JavaScript
|
||||
# Emscripten (used for js tests)
|
||||
# Note: cannot be ran on Linux (because it will compile Clang from its sources :|)
|
||||
- |
|
||||
if [[ $TARGET = "js" ]]; then
|
||||
cd javascript;
|
||||
npm install;
|
||||
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 >& /dev/null &&
|
||||
/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;
|
||||
brew install android-sdk;
|
||||
export ANDROID_SDK=/usr/local/opt/android-sdk
|
||||
brew cask install java &&
|
||||
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) &&
|
||||
export PATH=$JAVA_HOME/bin:$PATH &&
|
||||
brew install android-sdk &&
|
||||
export ANDROID_SDK=/usr/local/opt/android-sdk &&
|
||||
export ANDROID_HOME=/usr/local/opt/android-sdk
|
||||
$ANDROID_SDK/tools/android update sdk --filter android-19,addon-google_apis-google-19
|
||||
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
|
||||
|
||||
script:
|
||||
# C
|
||||
- |
|
||||
@@ -69,32 +82,25 @@ script:
|
||||
buck test --verbose 0 //:yoga &&
|
||||
buck run --verbose 0 //benchmark:benchmark &&
|
||||
git checkout HEAD^ &&
|
||||
buck run --verbose 0 //benchmark:benchmark;
|
||||
buck run --verbose 0 //benchmark:benchmark
|
||||
fi
|
||||
|
||||
# Java
|
||||
- |
|
||||
if [[ $TARGET = "java" ]]; then
|
||||
buck test --verbose 0 //java:java;
|
||||
buck test --verbose 0 //java:java
|
||||
fi
|
||||
|
||||
# .NET
|
||||
- |
|
||||
if [[ $TARGET = "net" ]]; then
|
||||
sh csharp/tests/Facebook.Yoga/test_macos.sh;
|
||||
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;
|
||||
fi
|
||||
|
||||
# JavaScript
|
||||
- |
|
||||
if [[ $TARGET = "js" ]]; then
|
||||
npm run test:all &&
|
||||
npm run bench;
|
||||
buck test --verbose 0 //YogaKit:YogaKitTests --config cxx.default_platform=iphonesimulator-x86_64
|
||||
fi
|
||||
|
||||
# Android
|
||||
@@ -102,3 +108,11 @@ script:
|
||||
if [[ $TARGET = "android" ]]; then
|
||||
buck build --verbose 0 //android/sample:sample
|
||||
fi
|
||||
|
||||
# JavaScript
|
||||
- |
|
||||
if [[ $TARGET = "js" ]]; then (
|
||||
cd javascript &&
|
||||
npm run test:all &&
|
||||
npm run bench
|
||||
) fi
|
||||
|
@@ -46,10 +46,13 @@ JavascriptEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
|
||||
if (experiments.length > 0) {
|
||||
for (var i in experiments) {
|
||||
this.push('Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_' + toJavascriptUpper(experiments[i]) + ', true);');
|
||||
this.push('Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_' + toJavascriptUpper(experiments[i]) + ', true);');
|
||||
}
|
||||
this.push('');
|
||||
}
|
||||
|
||||
this.push('try {');
|
||||
this.pushIndent();
|
||||
}},
|
||||
|
||||
emitTestTreePrologue:{value:function(nodeName) {
|
||||
@@ -57,23 +60,26 @@ JavascriptEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
}},
|
||||
|
||||
emitTestEpilogue:{value:function(experiments) {
|
||||
this.push('');
|
||||
this.push('if (typeof root !== "undefined")');
|
||||
this.popIndent();
|
||||
this.push('} finally {');
|
||||
this.pushIndent();
|
||||
|
||||
this.push('if (typeof root !== "undefined") {');
|
||||
this.pushIndent();
|
||||
this.push('root.freeRecursive();');
|
||||
this.popIndent();
|
||||
|
||||
this.push('');
|
||||
this.push('(typeof gc !== "undefined") && gc();');
|
||||
this.AssertEQ('0', 'Yoga.getInstanceCount()');
|
||||
this.push('}');
|
||||
|
||||
if (experiments.length > 0) {
|
||||
this.push('');
|
||||
for (var i in experiments) {
|
||||
this.push('Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_' + toJavascriptUpper(experiments[i]) + ', false);');
|
||||
this.push('Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_' + toJavascriptUpper(experiments[i]) + ', false);');
|
||||
}
|
||||
}
|
||||
|
||||
this.popIndent();
|
||||
this.push('}');
|
||||
|
||||
this.popIndent();
|
||||
this.push('});');
|
||||
}},
|
||||
|
3
javascript/.gitignore
vendored
3
javascript/.gitignore
vendored
@@ -5,9 +5,6 @@ node_modules
|
||||
|
||||
/dist
|
||||
/build/*
|
||||
!/build/Release
|
||||
/build/Release/*
|
||||
!/build/Release/nbind.js
|
||||
/sources/yoga
|
||||
|
||||
npm-debug.log*
|
||||
|
File diff suppressed because one or more lines are too long
@@ -17,6 +17,7 @@
|
||||
|
||||
"ldflags": [
|
||||
"--memory-init-file", "0",
|
||||
"-s", "PRECISE_F32=1",
|
||||
"-s", "TOTAL_MEMORY=134217728"
|
||||
],
|
||||
|
||||
|
@@ -129,20 +129,22 @@ module.exports = function (bind, lib) {
|
||||
|
||||
for (let fnName of [ `setPosition`, `setMargin`, `setFlexBasis`, `setWidth`, `setHeight`, `setMinWidth`, `setMinHeight`, `setMaxWidth`, `setMaxHeight`, `setPadding` ]) {
|
||||
|
||||
let methods = { [constants.UNIT_POINT]: lib.Node.prototype[fnName], [constants.UNIT_PERCENT]: lib.Node.prototype[`${fnName}Percent`] };
|
||||
|
||||
if (Object.keys(methods).some(method => methods[method] == null))
|
||||
throw new Error(`Assertion failed; some unit derivates of ${fnName} seem missing`);
|
||||
let methods = { [constants.UNIT_POINT]: lib.Node.prototype[fnName], [constants.UNIT_PERCENT]: lib.Node.prototype[`${fnName}Percent`], [constants.UNIT_AUTO]: lib.Node.prototype[`${fnName}Auto`] };
|
||||
|
||||
patch(lib.Node.prototype, fnName, function (original, ... args) {
|
||||
|
||||
// We patch all these functions to add support for the following calls:
|
||||
// .setWidth(100) / .setWidth("100%") / .setWidth(.getWidth())
|
||||
// .setWidth(100) / .setWidth("100%") / .setWidth(.getWidth()) / .setWidth("auto")
|
||||
|
||||
let value = args.pop();
|
||||
let unit, asNumber;
|
||||
|
||||
if (value instanceof Value) {
|
||||
if (value === `auto`) {
|
||||
|
||||
unit = constants.UNIT_AUTO;
|
||||
asNumber = undefined;
|
||||
|
||||
} else if (value instanceof Value) {
|
||||
|
||||
unit = value.unit;
|
||||
asNumber = value.valueOf();
|
||||
@@ -154,7 +156,14 @@ module.exports = function (bind, lib) {
|
||||
|
||||
}
|
||||
|
||||
if (!Object.prototype.hasOwnProperty.call(methods, unit))
|
||||
throw new Error(`Failed to execute "${fnName}": Unsupported unit.`);
|
||||
|
||||
if (asNumber !== undefined) {
|
||||
return methods[unit].call(this, ... args, asNumber);
|
||||
} else {
|
||||
return methods[unit].call(this, ... args);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("absolute_layout_width_height_start_top", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -46,14 +47,14 @@ it("absolute_layout_width_height_start_top", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_width_height_end_bottom", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -88,14 +89,14 @@ it("absolute_layout_width_height_end_bottom", function () {
|
||||
console.assert(80 === root_child0.getComputedTop(), "80 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_start_top_end_bottom", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -130,14 +131,14 @@ it("absolute_layout_start_top_end_bottom", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(80 === root_child0.getComputedWidth(), "80 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(80 === root_child0.getComputedHeight(), "80 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_width_height_start_top_end_bottom", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -174,14 +175,14 @@ it("absolute_layout_width_height_start_top_end_bottom", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setOverflow(Yoga.OVERFLOW_HIDDEN);
|
||||
@@ -231,14 +232,14 @@ it("do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent
|
||||
console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0_child0.getComputedWidth(), "100 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child0_child0.getComputedHeight(), "100 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_within_border", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setMargin(Yoga.EDGE_LEFT, 10);
|
||||
root.setMargin(Yoga.EDGE_TOP, 10);
|
||||
@@ -303,14 +304,14 @@ it("absolute_layout_within_border", function () {
|
||||
console.assert(40 === root_child1.getComputedTop(), "40 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_align_items_and_justify_content_center", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
@@ -346,14 +347,14 @@ it("absolute_layout_align_items_and_justify_content_center", function () {
|
||||
console.assert(30 === root_child0.getComputedTop(), "30 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child0.getComputedHeight(), "40 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_align_items_and_justify_content_flex_end", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
|
||||
root.setAlignItems(Yoga.ALIGN_FLEX_END);
|
||||
@@ -389,14 +390,14 @@ it("absolute_layout_align_items_and_justify_content_flex_end", function () {
|
||||
console.assert(60 === root_child0.getComputedTop(), "60 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child0.getComputedHeight(), "40 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_justify_content_center", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setFlexGrow(1);
|
||||
@@ -431,14 +432,14 @@ it("absolute_layout_justify_content_center", function () {
|
||||
console.assert(30 === root_child0.getComputedTop(), "30 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child0.getComputedHeight(), "40 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_align_items_center", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
root.setFlexGrow(1);
|
||||
@@ -473,14 +474,14 @@ it("absolute_layout_align_items_center", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child0.getComputedHeight(), "40 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_align_items_center_on_child_only", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexGrow(1);
|
||||
root.setWidth(110);
|
||||
@@ -515,14 +516,14 @@ it("absolute_layout_align_items_center_on_child_only", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child0.getComputedHeight(), "40 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_align_items_and_justify_content_center_and_top_position", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
@@ -559,14 +560,14 @@ it("absolute_layout_align_items_and_justify_content_center_and_top_position", fu
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child0.getComputedHeight(), "40 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_align_items_and_justify_content_center_and_bottom_position", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
@@ -603,14 +604,14 @@ it("absolute_layout_align_items_and_justify_content_center_and_bottom_position",
|
||||
console.assert(50 === root_child0.getComputedTop(), "50 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child0.getComputedHeight(), "40 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_align_items_and_justify_content_center_and_left_position", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
@@ -647,14 +648,14 @@ it("absolute_layout_align_items_and_justify_content_center_and_left_position", f
|
||||
console.assert(30 === root_child0.getComputedTop(), "30 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child0.getComputedHeight(), "40 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("absolute_layout_align_items_and_justify_content_center_and_right_position", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
@@ -691,10 +692,9 @@ it("absolute_layout_align_items_and_justify_content_center_and_right_position",
|
||||
console.assert(30 === root_child0.getComputedTop(), "30 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child0.getComputedHeight(), "40 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("align_content_flex_start", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
@@ -105,14 +106,14 @@ it("align_content_flex_start", function () {
|
||||
console.assert(20 === root_child4.getComputedTop(), "20 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child4.getComputedHeight(), "10 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_flex_start_without_height_on_children", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
root.setWidth(100);
|
||||
@@ -202,14 +203,14 @@ it("align_content_flex_start_without_height_on_children", function () {
|
||||
console.assert(20 === root_child4.getComputedTop(), "20 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(0 === root_child4.getComputedHeight(), "0 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_flex_start_with_flex", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
root.setWidth(100);
|
||||
@@ -305,14 +306,14 @@ it("align_content_flex_start_with_flex", function () {
|
||||
console.assert(120 === root_child4.getComputedTop(), "120 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(0 === root_child4.getComputedHeight(), "0 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_flex_end", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignContent(Yoga.ALIGN_FLEX_END);
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
@@ -406,14 +407,14 @@ it("align_content_flex_end", function () {
|
||||
console.assert(40 === root_child4.getComputedTop(), "40 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child4.getComputedHeight(), "10 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
@@ -502,14 +503,14 @@ it("align_content_stretch", function () {
|
||||
console.assert(0 === root_child4.getComputedTop(), "0 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(0 === root_child4.getComputedHeight(), "0 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_spacebetween", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_SPACE_BETWEEN);
|
||||
@@ -604,14 +605,14 @@ it("align_content_spacebetween", function () {
|
||||
console.assert(90 === root_child4.getComputedTop(), "90 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child4.getComputedHeight(), "10 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_spacearound", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_SPACE_AROUND);
|
||||
@@ -706,14 +707,14 @@ it("align_content_spacearound", function () {
|
||||
console.assert(95 === root_child4.getComputedTop(), "95 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child4.getComputedHeight(), "10 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
@@ -803,14 +804,14 @@ it("align_content_stretch_row", function () {
|
||||
console.assert(50 === root_child4.getComputedTop(), "50 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child4.getComputedHeight(), "50 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_row_with_children", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
@@ -916,14 +917,14 @@ it("align_content_stretch_row_with_children", function () {
|
||||
console.assert(50 === root_child4.getComputedTop(), "50 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child4.getComputedHeight(), "50 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_row_with_flex", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
@@ -1019,14 +1020,14 @@ it("align_content_stretch_row_with_flex", function () {
|
||||
console.assert(0 === root_child4.getComputedTop(), "0 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child4.getComputedHeight(), "100 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_row_with_flex_no_shrink", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
@@ -1121,14 +1122,14 @@ it("align_content_stretch_row_with_flex_no_shrink", function () {
|
||||
console.assert(0 === root_child4.getComputedTop(), "0 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child4.getComputedHeight(), "100 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_row_with_margin", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
@@ -1226,14 +1227,14 @@ it("align_content_stretch_row_with_margin", function () {
|
||||
console.assert(80 === root_child4.getComputedTop(), "80 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child4.getComputedHeight(), "20 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_row_with_padding", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
@@ -1331,14 +1332,14 @@ it("align_content_stretch_row_with_padding", function () {
|
||||
console.assert(50 === root_child4.getComputedTop(), "50 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child4.getComputedHeight(), "50 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_row_with_single_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
@@ -1386,14 +1387,14 @@ it("align_content_stretch_row_with_single_row", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_row_with_fixed_height", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
@@ -1484,14 +1485,14 @@ it("align_content_stretch_row_with_fixed_height", function () {
|
||||
console.assert(80 === root_child4.getComputedTop(), "80 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child4.getComputedHeight(), "20 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_row_with_max_height", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
@@ -1582,14 +1583,14 @@ it("align_content_stretch_row_with_max_height", function () {
|
||||
console.assert(50 === root_child4.getComputedTop(), "50 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child4.getComputedHeight(), "50 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_row_with_min_height", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
@@ -1680,14 +1681,14 @@ it("align_content_stretch_row_with_min_height", function () {
|
||||
console.assert(90 === root_child4.getComputedTop(), "90 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child4.getComputedHeight(), "10 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_content_stretch_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignContent(Yoga.ALIGN_STRETCH);
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
@@ -1795,10 +1796,9 @@ it("align_content_stretch_column", function () {
|
||||
console.assert(0 === root_child4.getComputedTop(), "0 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(50 === root_child4.getComputedWidth(), "50 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child4.getComputedHeight(), "50 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("align_items_stretch", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -42,14 +43,14 @@ it("align_items_stretch", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_items_center", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
root.setWidth(100);
|
||||
@@ -82,14 +83,14 @@ it("align_items_center", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_items_flex_start", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_FLEX_START);
|
||||
root.setWidth(100);
|
||||
@@ -122,14 +123,14 @@ it("align_items_flex_start", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_items_flex_end", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_FLEX_END);
|
||||
root.setWidth(100);
|
||||
@@ -162,14 +163,14 @@ it("align_items_flex_end", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -218,14 +219,14 @@ it("align_baseline", function () {
|
||||
console.assert(30 === root_child1.getComputedTop(), "30 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child1.getComputedHeight(), "20 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -289,14 +290,14 @@ it("align_baseline_child", function () {
|
||||
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1_child0.getComputedWidth(), "50 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child1_child0.getComputedHeight(), "10 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_child_multiline", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -407,14 +408,14 @@ it("align_baseline_child_multiline", function () {
|
||||
console.assert(20 === root_child1_child3.getComputedTop(), "20 === root_child1_child3.getComputedTop() (" + root_child1_child3.getComputedTop() + ")");
|
||||
console.assert(25 === root_child1_child3.getComputedWidth(), "25 === root_child1_child3.getComputedWidth() (" + root_child1_child3.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child1_child3.getComputedHeight(), "10 === root_child1_child3.getComputedHeight() (" + root_child1_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_child_multiline_override", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -527,14 +528,14 @@ it("align_baseline_child_multiline_override", function () {
|
||||
console.assert(20 === root_child1_child3.getComputedTop(), "20 === root_child1_child3.getComputedTop() (" + root_child1_child3.getComputedTop() + ")");
|
||||
console.assert(25 === root_child1_child3.getComputedWidth(), "25 === root_child1_child3.getComputedWidth() (" + root_child1_child3.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child1_child3.getComputedHeight(), "10 === root_child1_child3.getComputedHeight() (" + root_child1_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_child_multiline_no_override_on_secondline", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -646,14 +647,14 @@ it("align_baseline_child_multiline_no_override_on_secondline", function () {
|
||||
console.assert(20 === root_child1_child3.getComputedTop(), "20 === root_child1_child3.getComputedTop() (" + root_child1_child3.getComputedTop() + ")");
|
||||
console.assert(25 === root_child1_child3.getComputedWidth(), "25 === root_child1_child3.getComputedWidth() (" + root_child1_child3.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child1_child3.getComputedHeight(), "10 === root_child1_child3.getComputedHeight() (" + root_child1_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_child_top", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -718,14 +719,14 @@ it("align_baseline_child_top", function () {
|
||||
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1_child0.getComputedWidth(), "50 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child1_child0.getComputedHeight(), "10 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_child_top2", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -790,14 +791,14 @@ it("align_baseline_child_top2", function () {
|
||||
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1_child0.getComputedWidth(), "50 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child1_child0.getComputedHeight(), "10 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_double_nested_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -876,14 +877,14 @@ it("align_baseline_double_nested_child", function () {
|
||||
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1_child0.getComputedWidth(), "50 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
|
||||
console.assert(15 === root_child1_child0.getComputedHeight(), "15 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
root.setWidth(100);
|
||||
@@ -931,14 +932,14 @@ it("align_baseline_column", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child1.getComputedHeight(), "20 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_child_margin", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -1010,14 +1011,14 @@ it("align_baseline_child_margin", function () {
|
||||
console.assert(1 === root_child1_child0.getComputedTop(), "1 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1_child0.getComputedWidth(), "50 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child1_child0.getComputedHeight(), "10 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_child_padding", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -1089,14 +1090,14 @@ it("align_baseline_child_padding", function () {
|
||||
console.assert(5 === root_child1_child0.getComputedTop(), "5 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1_child0.getComputedWidth(), "50 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child1_child0.getComputedHeight(), "10 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_multiline", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -1206,14 +1207,14 @@ it("align_baseline_multiline", function () {
|
||||
console.assert(60 === root_child3.getComputedTop(), "60 === root_child3.getComputedTop() (" + root_child3.getComputedTop() + ")");
|
||||
console.assert(50 === root_child3.getComputedWidth(), "50 === root_child3.getComputedWidth() (" + root_child3.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child3.getComputedHeight(), "50 === root_child3.getComputedHeight() (" + root_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_multiline_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
@@ -1322,14 +1323,14 @@ it("align_baseline_multiline_column", function () {
|
||||
console.assert(70 === root_child3.getComputedTop(), "70 === root_child3.getComputedTop() (" + root_child3.getComputedTop() + ")");
|
||||
console.assert(50 === root_child3.getComputedWidth(), "50 === root_child3.getComputedWidth() (" + root_child3.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child3.getComputedHeight(), "20 === root_child3.getComputedHeight() (" + root_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_multiline_column2", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
@@ -1438,14 +1439,14 @@ it("align_baseline_multiline_column2", function () {
|
||||
console.assert(70 === root_child3.getComputedTop(), "70 === root_child3.getComputedTop() (" + root_child3.getComputedTop() + ")");
|
||||
console.assert(50 === root_child3.getComputedWidth(), "50 === root_child3.getComputedWidth() (" + root_child3.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child3.getComputedHeight(), "20 === root_child3.getComputedHeight() (" + root_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_baseline_multiline_row_and_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_BASELINE);
|
||||
@@ -1555,10 +1556,9 @@ it("align_baseline_multiline_row_and_column", function () {
|
||||
console.assert(90 === root_child3.getComputedTop(), "90 === root_child3.getComputedTop() (" + root_child3.getComputedTop() + ")");
|
||||
console.assert(50 === root_child3.getComputedWidth(), "50 === root_child3.getComputedWidth() (" + root_child3.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child3.getComputedHeight(), "20 === root_child3.getComputedHeight() (" + root_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("align_self_center", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -44,14 +45,14 @@ it("align_self_center", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_self_flex_end", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -84,14 +85,14 @@ it("align_self_flex_end", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_self_flex_start", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -124,14 +125,14 @@ it("align_self_flex_start", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_self_flex_end_override_flex_start", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_FLEX_START);
|
||||
root.setWidth(100);
|
||||
@@ -165,14 +166,14 @@ it("align_self_flex_end_override_flex_start", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_self_baseline", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -237,10 +238,9 @@ it("align_self_baseline", function () {
|
||||
console.assert(0 === root_child1_child0.getComputedTop(), "0 === root_child1_child0.getComputedTop() (" + root_child1_child0.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1_child0.getComputedWidth(), "50 === root_child1_child0.getComputedWidth() (" + root_child1_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child1_child0.getComputedHeight(), "10 === root_child1_child0.getComputedHeight() (" + root_child1_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("border_no_size", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setBorder(Yoga.EDGE_LEFT, 10);
|
||||
root.setBorder(Yoga.EDGE_TOP, 10);
|
||||
@@ -30,14 +31,14 @@ it("border_no_size", function () {
|
||||
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
|
||||
console.assert(20 === root.getComputedWidth(), "20 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
|
||||
console.assert(20 === root.getComputedHeight(), "20 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("border_container_match_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setBorder(Yoga.EDGE_LEFT, 10);
|
||||
root.setBorder(Yoga.EDGE_TOP, 10);
|
||||
@@ -71,14 +72,14 @@ it("border_container_match_child", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("border_flex_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setBorder(Yoga.EDGE_LEFT, 10);
|
||||
root.setBorder(Yoga.EDGE_TOP, 10);
|
||||
@@ -114,14 +115,14 @@ it("border_flex_child", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(80 === root_child0.getComputedHeight(), "80 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("border_stretch_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setBorder(Yoga.EDGE_LEFT, 10);
|
||||
root.setBorder(Yoga.EDGE_TOP, 10);
|
||||
@@ -156,14 +157,14 @@ it("border_stretch_child", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(80 === root_child0.getComputedWidth(), "80 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("border_center_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
@@ -200,10 +201,9 @@ it("border_center_child", function () {
|
||||
console.assert(35 === root_child0.getComputedTop(), "35 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("wrap_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
|
||||
var root_child0 = Yoga.Node.create();
|
||||
@@ -41,14 +42,14 @@ it("wrap_child", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("wrap_grandchild", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
|
||||
var root_child0 = Yoga.Node.create();
|
||||
@@ -91,10 +92,9 @@ it("wrap_grandchild", function () {
|
||||
console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0_child0.getComputedWidth(), "100 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child0_child0.getComputedHeight(), "100 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("display_none", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -58,14 +59,14 @@ it("display_none", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(0 === root_child1.getComputedWidth(), "0 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(0 === root_child1.getComputedHeight(), "0 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("display_none_fixed_size", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -113,14 +114,14 @@ it("display_none_fixed_size", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(0 === root_child1.getComputedWidth(), "0 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(0 === root_child1.getComputedHeight(), "0 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("display_none_with_margin", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -172,14 +173,14 @@ it("display_none_with_margin", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("display_none_with_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -265,14 +266,14 @@ it("display_none_with_child", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(50 === root_child2.getComputedWidth(), "50 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("display_none_with_position", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -320,10 +321,9 @@ it("display_none_with_position", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(0 === root_child1.getComputedWidth(), "0 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(0 === root_child1.getComputedHeight(), "0 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("flex_direction_column_no_height", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
|
||||
@@ -69,14 +70,14 @@ it("flex_direction_column_no_height", function () {
|
||||
console.assert(20 === root_child2.getComputedTop(), "20 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child2.getComputedHeight(), "10 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_direction_row_no_width", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setHeight(100);
|
||||
@@ -135,14 +136,14 @@ it("flex_direction_row_no_width", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(10 === root_child2.getComputedWidth(), "10 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_direction_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -201,14 +202,14 @@ it("flex_direction_column", function () {
|
||||
console.assert(20 === root_child2.getComputedTop(), "20 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child2.getComputedHeight(), "10 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_direction_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -268,14 +269,14 @@ it("flex_direction_row", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(10 === root_child2.getComputedWidth(), "10 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_direction_column_reverse", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_COLUMN_REVERSE);
|
||||
root.setWidth(100);
|
||||
@@ -335,14 +336,14 @@ it("flex_direction_column_reverse", function () {
|
||||
console.assert(70 === root_child2.getComputedTop(), "70 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child2.getComputedHeight(), "10 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_direction_row_reverse", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW_REVERSE);
|
||||
root.setWidth(100);
|
||||
@@ -402,10 +403,9 @@ it("flex_direction_row_reverse", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(10 === root_child2.getComputedWidth(), "10 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("flex_basis_flex_grow_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -57,14 +58,14 @@ it("flex_basis_flex_grow_column", function () {
|
||||
console.assert(75 === root_child1.getComputedTop(), "75 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(25 === root_child1.getComputedHeight(), "25 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_basis_flex_grow_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -111,14 +112,14 @@ it("flex_basis_flex_grow_row", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(25 === root_child1.getComputedWidth(), "25 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_basis_flex_shrink_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -164,14 +165,14 @@ it("flex_basis_flex_shrink_column", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_basis_flex_shrink_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -218,14 +219,14 @@ it("flex_basis_flex_shrink_row", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_shrink_to_zero", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setHeight(75);
|
||||
|
||||
@@ -287,14 +288,14 @@ it("flex_shrink_to_zero", function () {
|
||||
console.assert(50 === root_child2.getComputedTop(), "50 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(50 === root_child2.getComputedWidth(), "50 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child2.getComputedHeight(), "50 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_basis_overrides_main_size", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -357,14 +358,14 @@ it("flex_basis_overrides_main_size", function () {
|
||||
console.assert(80 === root_child2.getComputedTop(), "80 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child2.getComputedHeight(), "20 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_grow_shrink_at_most", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -409,10 +410,9 @@ it("flex_grow_shrink_at_most", function () {
|
||||
console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0_child0.getComputedWidth(), "100 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
|
||||
console.assert(0 === root_child0_child0.getComputedHeight(), "0 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("wrap_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
root.setHeight(100);
|
||||
@@ -88,14 +89,14 @@ it("wrap_column", function () {
|
||||
console.assert(0 === root_child3.getComputedTop(), "0 === root_child3.getComputedTop() (" + root_child3.getComputedTop() + ")");
|
||||
console.assert(30 === root_child3.getComputedWidth(), "30 === root_child3.getComputedWidth() (" + root_child3.getComputedWidth() + ")");
|
||||
console.assert(30 === root_child3.getComputedHeight(), "30 === root_child3.getComputedHeight() (" + root_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("wrap_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
@@ -173,14 +174,14 @@ it("wrap_row", function () {
|
||||
console.assert(30 === root_child3.getComputedTop(), "30 === root_child3.getComputedTop() (" + root_child3.getComputedTop() + ")");
|
||||
console.assert(30 === root_child3.getComputedWidth(), "30 === root_child3.getComputedWidth() (" + root_child3.getComputedWidth() + ")");
|
||||
console.assert(30 === root_child3.getComputedHeight(), "30 === root_child3.getComputedHeight() (" + root_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("wrap_row_align_items_flex_end", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_FLEX_END);
|
||||
@@ -259,14 +260,14 @@ it("wrap_row_align_items_flex_end", function () {
|
||||
console.assert(30 === root_child3.getComputedTop(), "30 === root_child3.getComputedTop() (" + root_child3.getComputedTop() + ")");
|
||||
console.assert(30 === root_child3.getComputedWidth(), "30 === root_child3.getComputedWidth() (" + root_child3.getComputedWidth() + ")");
|
||||
console.assert(30 === root_child3.getComputedHeight(), "30 === root_child3.getComputedHeight() (" + root_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("wrap_row_align_items_center", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
@@ -345,14 +346,14 @@ it("wrap_row_align_items_center", function () {
|
||||
console.assert(30 === root_child3.getComputedTop(), "30 === root_child3.getComputedTop() (" + root_child3.getComputedTop() + ")");
|
||||
console.assert(30 === root_child3.getComputedWidth(), "30 === root_child3.getComputedWidth() (" + root_child3.getComputedWidth() + ")");
|
||||
console.assert(30 === root_child3.getComputedHeight(), "30 === root_child3.getComputedHeight() (" + root_child3.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_wrap_children_with_min_main_overriding_flex_basis", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
@@ -402,14 +403,14 @@ it("flex_wrap_children_with_min_main_overriding_flex_basis", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(55 === root_child1.getComputedWidth(), "55 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_wrap_wrap_to_child_height", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
|
||||
var root_child0 = Yoga.Node.create();
|
||||
@@ -484,14 +485,14 @@ it("flex_wrap_wrap_to_child_height", function () {
|
||||
console.assert(100 === root_child1.getComputedTop(), "100 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_wrap_align_stretch_fits_one_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setFlexWrap(Yoga.WRAP_WRAP);
|
||||
@@ -538,12 +539,11 @@ it("flex_wrap_align_stretch_fits_one_row", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("wrap_reverse_row_align_content_flex_start", function () {
|
||||
var root = Yoga.Node.create();
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("justify_content_row_flex_start", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(102);
|
||||
@@ -71,14 +72,14 @@ it("justify_content_row_flex_start", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(10 === root_child2.getComputedWidth(), "10 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(102 === root_child2.getComputedHeight(), "102 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_row_flex_end", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
|
||||
@@ -139,14 +140,14 @@ it("justify_content_row_flex_end", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(10 === root_child2.getComputedWidth(), "10 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(102 === root_child2.getComputedHeight(), "102 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_row_center", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
@@ -207,14 +208,14 @@ it("justify_content_row_center", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(10 === root_child2.getComputedWidth(), "10 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(102 === root_child2.getComputedHeight(), "102 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_row_space_between", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setJustifyContent(Yoga.JUSTIFY_SPACE_BETWEEN);
|
||||
@@ -275,14 +276,14 @@ it("justify_content_row_space_between", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(10 === root_child2.getComputedWidth(), "10 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(102 === root_child2.getComputedHeight(), "102 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_row_space_around", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setJustifyContent(Yoga.JUSTIFY_SPACE_AROUND);
|
||||
@@ -343,14 +344,14 @@ it("justify_content_row_space_around", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(10 === root_child2.getComputedWidth(), "10 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(102 === root_child2.getComputedHeight(), "102 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_column_flex_start", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(102);
|
||||
root.setHeight(102);
|
||||
@@ -408,14 +409,14 @@ it("justify_content_column_flex_start", function () {
|
||||
console.assert(10 === root_child2.getComputedTop(), "10 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(102 === root_child2.getComputedWidth(), "102 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child2.getComputedHeight(), "10 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_column_flex_end", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
|
||||
root.setWidth(102);
|
||||
@@ -475,14 +476,14 @@ it("justify_content_column_flex_end", function () {
|
||||
console.assert(92 === root_child2.getComputedTop(), "92 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(102 === root_child2.getComputedWidth(), "102 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child2.getComputedHeight(), "10 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_column_center", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setWidth(102);
|
||||
@@ -542,14 +543,14 @@ it("justify_content_column_center", function () {
|
||||
console.assert(56 === root_child2.getComputedTop(), "56 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(102 === root_child2.getComputedWidth(), "102 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child2.getComputedHeight(), "10 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_column_space_between", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_SPACE_BETWEEN);
|
||||
root.setWidth(102);
|
||||
@@ -609,14 +610,14 @@ it("justify_content_column_space_between", function () {
|
||||
console.assert(92 === root_child2.getComputedTop(), "92 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(102 === root_child2.getComputedWidth(), "102 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child2.getComputedHeight(), "10 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_column_space_around", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_SPACE_AROUND);
|
||||
root.setWidth(102);
|
||||
@@ -676,10 +677,9 @@ it("justify_content_column_space_around", function () {
|
||||
console.assert(80 === root_child2.getComputedTop(), "80 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(102 === root_child2.getComputedWidth(), "102 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child2.getComputedHeight(), "10 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("margin_start", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -44,14 +45,14 @@ it("margin_start", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_top", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -83,14 +84,14 @@ it("margin_top", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_end", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
|
||||
@@ -124,14 +125,14 @@ it("margin_end", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_bottom", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
|
||||
root.setWidth(100);
|
||||
@@ -164,14 +165,14 @@ it("margin_bottom", function () {
|
||||
console.assert(80 === root_child0.getComputedTop(), "80 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_and_flex_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -205,14 +206,14 @@ it("margin_and_flex_row", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(80 === root_child0.getComputedWidth(), "80 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_and_flex_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -245,14 +246,14 @@ it("margin_and_flex_column", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(80 === root_child0.getComputedHeight(), "80 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_and_stretch_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -286,14 +287,14 @@ it("margin_and_stretch_row", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(80 === root_child0.getComputedHeight(), "80 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_and_stretch_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -326,14 +327,14 @@ it("margin_and_stretch_column", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(80 === root_child0.getComputedWidth(), "80 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_with_sibling_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -380,14 +381,14 @@ it("margin_with_sibling_row", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(45 === root_child1.getComputedWidth(), "45 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_with_sibling_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -433,14 +434,14 @@ it("margin_with_sibling_column", function () {
|
||||
console.assert(55 === root_child1.getComputedTop(), "55 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(45 === root_child1.getComputedHeight(), "45 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_bottom", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
root.setWidth(200);
|
||||
@@ -489,14 +490,14 @@ it("margin_auto_bottom", function () {
|
||||
console.assert(150 === root_child1.getComputedTop(), "150 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_top", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
root.setWidth(200);
|
||||
@@ -545,14 +546,14 @@ it("margin_auto_top", function () {
|
||||
console.assert(150 === root_child1.getComputedTop(), "150 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_bottom_and_top", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
root.setWidth(200);
|
||||
@@ -602,14 +603,14 @@ it("margin_auto_bottom_and_top", function () {
|
||||
console.assert(150 === root_child1.getComputedTop(), "150 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_bottom_and_top_justify_center", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setWidth(200);
|
||||
@@ -659,14 +660,14 @@ it("margin_auto_bottom_and_top_justify_center", function () {
|
||||
console.assert(150 === root_child1.getComputedTop(), "150 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_mutiple_children_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
root.setWidth(200);
|
||||
@@ -731,14 +732,14 @@ it("margin_auto_mutiple_children_column", function () {
|
||||
console.assert(150 === root_child2.getComputedTop(), "150 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(50 === root_child2.getComputedWidth(), "50 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child2.getComputedHeight(), "50 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_mutiple_children_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
@@ -804,14 +805,14 @@ it("margin_auto_mutiple_children_row", function () {
|
||||
console.assert(75 === root_child2.getComputedTop(), "75 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(50 === root_child2.getComputedWidth(), "50 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child2.getComputedHeight(), "50 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_left_and_right_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
@@ -862,14 +863,14 @@ it("margin_auto_left_and_right_column", function () {
|
||||
console.assert(75 === root_child1.getComputedTop(), "75 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_left_and_right", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(200);
|
||||
@@ -918,14 +919,14 @@ it("margin_auto_left_and_right", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_left_and_right_column_and_center", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
root.setWidth(200);
|
||||
@@ -975,14 +976,14 @@ it("margin_auto_left_and_right_column_and_center", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_left", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
root.setWidth(200);
|
||||
@@ -1031,14 +1032,14 @@ it("margin_auto_left", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_right", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
root.setWidth(200);
|
||||
@@ -1087,14 +1088,14 @@ it("margin_auto_right", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_left_and_right_strech", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(200);
|
||||
@@ -1144,14 +1145,14 @@ it("margin_auto_left_and_right_strech", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("margin_auto_top_and_bottom_strech", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(200);
|
||||
@@ -1200,10 +1201,9 @@ it("margin_auto_top_and_bottom_strech", function () {
|
||||
console.assert(150 === root_child1.getComputedTop(), "150 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("max_width", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -43,14 +44,14 @@ it("max_width", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(50 === root_child0.getComputedWidth(), "50 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("max_height", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -83,14 +84,14 @@ it("max_height", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child0.getComputedHeight(), "50 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("min_height", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -136,14 +137,14 @@ it("min_height", function () {
|
||||
console.assert(80 === root_child1.getComputedTop(), "80 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child1.getComputedHeight(), "20 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("min_width", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -190,14 +191,14 @@ it("min_width", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(20 === root_child1.getComputedWidth(), "20 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_min_max", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setWidth(100);
|
||||
@@ -231,14 +232,14 @@ it("justify_content_min_max", function () {
|
||||
console.assert(20 === root_child0.getComputedTop(), "20 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(60 === root_child0.getComputedHeight(), "60 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("align_items_min_max", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
root.setMinWidth(100);
|
||||
@@ -272,14 +273,14 @@ it("align_items_min_max", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(60 === root_child0.getComputedHeight(), "60 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("justify_content_overflow_min_max", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setMinHeight(100);
|
||||
@@ -342,14 +343,14 @@ it("justify_content_overflow_min_max", function () {
|
||||
console.assert(80 === root_child2.getComputedTop(), "80 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(50 === root_child2.getComputedWidth(), "50 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child2.getComputedHeight(), "50 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_grow_within_max_width", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(100);
|
||||
@@ -396,14 +397,14 @@ it("flex_grow_within_max_width", function () {
|
||||
console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0_child0.getComputedWidth(), "100 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child0_child0.getComputedHeight(), "20 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_grow_within_constrained_max_width", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(100);
|
||||
@@ -450,14 +451,14 @@ it("flex_grow_within_constrained_max_width", function () {
|
||||
console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
|
||||
console.assert(200 === root_child0_child0.getComputedWidth(), "200 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
|
||||
console.assert(20 === root_child0_child0.getComputedHeight(), "20 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_grow_within_constrained_min_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setMinWidth(100);
|
||||
@@ -503,14 +504,14 @@ it("flex_grow_within_constrained_min_row", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child1.getComputedWidth(), "50 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_grow_within_constrained_min_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setMinHeight(100);
|
||||
|
||||
@@ -554,14 +555,14 @@ it("flex_grow_within_constrained_min_column", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(0 === root_child1.getComputedWidth(), "0 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_grow_within_constrained_max_row", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
|
||||
@@ -622,14 +623,14 @@ it("flex_grow_within_constrained_max_row", function () {
|
||||
console.assert(0 === root_child0_child1.getComputedTop(), "0 === root_child0_child1.getComputedTop() (" + root_child0_child1.getComputedTop() + ")");
|
||||
console.assert(50 === root_child0_child1.getComputedWidth(), "50 === root_child0_child1.getComputedWidth() (" + root_child0_child1.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child0_child1.getComputedHeight(), "100 === root_child0_child1.getComputedHeight() (" + root_child0_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("flex_grow_within_constrained_max_column", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setMaxHeight(100);
|
||||
@@ -675,14 +676,14 @@ it("flex_grow_within_constrained_max_column", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(50 === root_child1.getComputedHeight(), "50 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("min_width_overrides_width", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(50);
|
||||
root.setMinWidth(100);
|
||||
@@ -699,14 +700,14 @@ it("min_width_overrides_width", function () {
|
||||
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
|
||||
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
|
||||
console.assert(0 === root.getComputedHeight(), "0 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("max_width_overrides_width", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setMaxWidth(100);
|
||||
@@ -723,14 +724,14 @@ it("max_width_overrides_width", function () {
|
||||
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
|
||||
console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
|
||||
console.assert(0 === root.getComputedHeight(), "0 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("min_height_overrides_height", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setHeight(50);
|
||||
root.setMinHeight(100);
|
||||
@@ -747,14 +748,14 @@ it("min_height_overrides_height", function () {
|
||||
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
|
||||
console.assert(0 === root.getComputedWidth(), "0 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
|
||||
console.assert(100 === root.getComputedHeight(), "100 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("max_height_overrides_height", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setHeight(200);
|
||||
root.setMaxHeight(100);
|
||||
@@ -771,14 +772,14 @@ it("max_height_overrides_height", function () {
|
||||
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
|
||||
console.assert(0 === root.getComputedWidth(), "0 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
|
||||
console.assert(100 === root.getComputedHeight(), "100 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("min_max_percent_no_width_height", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setAlignItems(Yoga.ALIGN_FLEX_START);
|
||||
root.setWidth(100);
|
||||
@@ -813,10 +814,9 @@ it("min_max_percent_no_width_height", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("padding_no_size", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setPadding(Yoga.EDGE_LEFT, 10);
|
||||
root.setPadding(Yoga.EDGE_TOP, 10);
|
||||
@@ -30,14 +31,14 @@ it("padding_no_size", function () {
|
||||
console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
|
||||
console.assert(20 === root.getComputedWidth(), "20 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
|
||||
console.assert(20 === root.getComputedHeight(), "20 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("padding_container_match_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setPadding(Yoga.EDGE_LEFT, 10);
|
||||
root.setPadding(Yoga.EDGE_TOP, 10);
|
||||
@@ -71,14 +72,14 @@ it("padding_container_match_child", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("padding_flex_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setPadding(Yoga.EDGE_LEFT, 10);
|
||||
root.setPadding(Yoga.EDGE_TOP, 10);
|
||||
@@ -114,14 +115,14 @@ it("padding_flex_child", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(80 === root_child0.getComputedHeight(), "80 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("padding_stretch_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setPadding(Yoga.EDGE_LEFT, 10);
|
||||
root.setPadding(Yoga.EDGE_TOP, 10);
|
||||
@@ -156,14 +157,14 @@ it("padding_stretch_child", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(80 === root_child0.getComputedWidth(), "80 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("padding_center_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
|
||||
root.setAlignItems(Yoga.ALIGN_CENTER);
|
||||
@@ -200,14 +201,14 @@ it("padding_center_child", function () {
|
||||
console.assert(35 === root_child0.getComputedTop(), "35 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("child_with_padding_align_end", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
|
||||
root.setAlignItems(Yoga.ALIGN_FLEX_END);
|
||||
@@ -245,10 +246,9 @@ it("child_with_padding_align_end", function () {
|
||||
console.assert(100 === root_child0.getComputedTop(), "100 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,8 +12,9 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("percentage_width_height", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(200);
|
||||
@@ -46,18 +47,18 @@ it("percentage_width_height", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(60 === root_child0.getComputedWidth(), "60 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(60 === root_child0.getComputedHeight(), "60 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_position_left_top", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(400);
|
||||
@@ -92,18 +93,18 @@ it("percentage_position_left_top", function () {
|
||||
console.assert(80 === root_child0.getComputedTop(), "80 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(180 === root_child0.getComputedWidth(), "180 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(220 === root_child0.getComputedHeight(), "220 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_position_bottom_right", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(500);
|
||||
@@ -138,18 +139,18 @@ it("percentage_position_bottom_right", function () {
|
||||
console.assert(-50 === root_child0.getComputedTop(), "-50 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(275 === root_child0.getComputedWidth(), "275 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(75 === root_child0.getComputedHeight(), "75 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_flex_basis", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(200);
|
||||
@@ -197,18 +198,18 @@ it("percentage_flex_basis", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(75 === root_child1.getComputedWidth(), "75 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(200 === root_child1.getComputedHeight(), "200 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_flex_basis_cross", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(200);
|
||||
@@ -255,18 +256,18 @@ it("percentage_flex_basis_cross", function () {
|
||||
console.assert(125 === root_child1.getComputedTop(), "125 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(200 === root_child1.getComputedWidth(), "200 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(75 === root_child1.getComputedHeight(), "75 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_flex_basis_cross_min_height", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(200);
|
||||
@@ -313,18 +314,18 @@ it("percentage_flex_basis_cross_min_height", function () {
|
||||
console.assert(140 === root_child1.getComputedTop(), "140 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(200 === root_child1.getComputedWidth(), "200 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(60 === root_child1.getComputedHeight(), "60 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_flex_basis_main_max_height", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(200);
|
||||
@@ -374,18 +375,18 @@ it("percentage_flex_basis_main_max_height", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(148 === root_child1.getComputedWidth(), "148 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child1.getComputedHeight(), "40 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_flex_basis_cross_max_height", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(200);
|
||||
@@ -434,18 +435,18 @@ it("percentage_flex_basis_cross_max_height", function () {
|
||||
console.assert(120 === root_child1.getComputedTop(), "120 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(200 === root_child1.getComputedWidth(), "200 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(40 === root_child1.getComputedHeight(), "40 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_flex_basis_main_max_width", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(200);
|
||||
@@ -495,18 +496,18 @@ it("percentage_flex_basis_main_max_width", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(40 === root_child1.getComputedWidth(), "40 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(200 === root_child1.getComputedHeight(), "200 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_flex_basis_cross_max_width", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(200);
|
||||
@@ -555,18 +556,18 @@ it("percentage_flex_basis_cross_max_width", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(40 === root_child1.getComputedWidth(), "40 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(150 === root_child1.getComputedHeight(), "150 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_flex_basis_main_min_width", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(200);
|
||||
@@ -616,18 +617,18 @@ it("percentage_flex_basis_main_min_width", function () {
|
||||
console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(80 === root_child1.getComputedWidth(), "80 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(200 === root_child1.getComputedHeight(), "200 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_flex_basis_cross_min_width", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(200);
|
||||
@@ -676,18 +677,18 @@ it("percentage_flex_basis_cross_min_width", function () {
|
||||
console.assert(50 === root_child1.getComputedTop(), "50 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(200 === root_child1.getComputedWidth(), "200 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(150 === root_child1.getComputedHeight(), "150 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_multiple_nested_with_padding_margin_and_percentage_values", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(200);
|
||||
@@ -788,18 +789,18 @@ it("percentage_multiple_nested_with_padding_margin_and_percentage_values", funct
|
||||
console.assert(58 === root_child1.getComputedTop(), "58 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")");
|
||||
console.assert(200 === root_child1.getComputedWidth(), "200 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")");
|
||||
console.assert(142 === root_child1.getComputedHeight(), "142 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_margin_should_calculate_based_only_on_width", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(100);
|
||||
@@ -849,18 +850,18 @@ it("percentage_margin_should_calculate_based_only_on_width", function () {
|
||||
console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0_child0.getComputedWidth(), "10 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0_child0.getComputedHeight(), "10 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_padding_should_calculate_based_only_on_width", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(100);
|
||||
@@ -910,18 +911,18 @@ it("percentage_padding_should_calculate_based_only_on_width", function () {
|
||||
console.assert(20 === root_child0_child0.getComputedTop(), "20 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0_child0.getComputedWidth(), "10 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0_child0.getComputedHeight(), "10 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_absolute_position", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(200);
|
||||
root.setHeight(100);
|
||||
@@ -956,16 +957,16 @@ it("percentage_absolute_position", function () {
|
||||
console.assert(10 === root_child0.getComputedTop(), "10 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("percentage_width_height_undefined_parent_size", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
|
||||
var root_child0 = Yoga.Node.create();
|
||||
@@ -995,10 +996,9 @@ it("percentage_width_height_undefined_parent_size", function () {
|
||||
console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
|
||||
console.assert(0 === root_child0.getComputedWidth(), "0 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
|
||||
console.assert(0 === root_child0.getComputedHeight(), "0 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -12,8 +12,9 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("rounding_flex_basis_flex_grow_row_width_of_100", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(100);
|
||||
@@ -73,18 +74,18 @@ it("rounding_flex_basis_flex_grow_row_width_of_100", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(33 === root_child2.getComputedWidth(), "33 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("rounding_flex_basis_flex_grow_row_prime_number_width", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(113);
|
||||
@@ -172,18 +173,18 @@ it("rounding_flex_basis_flex_grow_row_prime_number_width", function () {
|
||||
console.assert(0 === root_child4.getComputedTop(), "0 === root_child4.getComputedTop() (" + root_child4.getComputedTop() + ")");
|
||||
console.assert(23 === root_child4.getComputedWidth(), "23 === root_child4.getComputedWidth() (" + root_child4.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child4.getComputedHeight(), "100 === root_child4.getComputedHeight() (" + root_child4.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("rounding_flex_basis_flex_shrink_row", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
root.setWidth(101);
|
||||
@@ -244,18 +245,18 @@ it("rounding_flex_basis_flex_shrink_row", function () {
|
||||
console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(25 === root_child2.getComputedWidth(), "25 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("rounding_flex_basis_overrides_main_size", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(113);
|
||||
@@ -318,18 +319,18 @@ it("rounding_flex_basis_overrides_main_size", function () {
|
||||
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("rounding_total_fractial", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(87.4);
|
||||
root.setHeight(113.4);
|
||||
@@ -392,18 +393,18 @@ it("rounding_total_fractial", function () {
|
||||
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(87 === root_child2.getComputedWidth(), "87 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("rounding_total_fractial_nested", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(87.4);
|
||||
root.setHeight(113.4);
|
||||
@@ -500,18 +501,18 @@ it("rounding_total_fractial_nested", function () {
|
||||
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(87 === root_child2.getComputedWidth(), "87 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("rounding_fractial_input_1", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(113.4);
|
||||
@@ -574,18 +575,18 @@ it("rounding_fractial_input_1", function () {
|
||||
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("rounding_fractial_input_2", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(113.6);
|
||||
@@ -648,18 +649,18 @@ it("rounding_fractial_input_2", function () {
|
||||
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(25 === root_child2.getComputedHeight(), "25 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("rounding_fractial_input_3", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setPosition(Yoga.EDGE_TOP, 0.3);
|
||||
root.setWidth(100);
|
||||
@@ -723,18 +724,18 @@ it("rounding_fractial_input_3", function () {
|
||||
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
it("rounding_fractial_input_4", function () {
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, true);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setPosition(Yoga.EDGE_TOP, 0.7);
|
||||
root.setWidth(100);
|
||||
@@ -798,12 +799,11 @@ it("rounding_fractial_input_4", function () {
|
||||
console.assert(89 === root_child2.getComputedTop(), "89 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")");
|
||||
console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")");
|
||||
console.assert(24 === root_child2.getComputedHeight(), "24 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.FEATURE_ROUNDING, false);
|
||||
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, false);
|
||||
}
|
||||
});
|
||||
|
@@ -12,6 +12,7 @@
|
||||
var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
|
||||
it("nested_overflowing_child", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -56,14 +57,14 @@ it("nested_overflowing_child", function () {
|
||||
console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
|
||||
console.assert(200 === root_child0_child0.getComputedWidth(), "200 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
|
||||
console.assert(200 === root_child0_child0.getComputedHeight(), "200 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("nested_overflowing_child_in_constraint_parent", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -110,14 +111,14 @@ it("nested_overflowing_child_in_constraint_parent", function () {
|
||||
console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
|
||||
console.assert(200 === root_child0_child0.getComputedWidth(), "200 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
|
||||
console.assert(200 === root_child0_child0.getComputedHeight(), "200 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
it("parent_wrap_child_size_overflowing_parent", function () {
|
||||
try {
|
||||
var root = Yoga.Node.create();
|
||||
root.setWidth(100);
|
||||
root.setHeight(100);
|
||||
@@ -163,10 +164,9 @@ it("parent_wrap_child_size_overflowing_parent", function () {
|
||||
console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
|
||||
console.assert(100 === root_child0_child0.getComputedWidth(), "100 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
|
||||
console.assert(200 === root_child0_child0.getComputedHeight(), "200 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
|
||||
|
||||
if (typeof root !== "undefined")
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
root.freeRecursive();
|
||||
|
||||
(typeof gc !== "undefined") && gc();
|
||||
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user