remove getInstanceCount usages

Summary:
This diffs removes the usages of getInstanceCount as it has been removed from yoga.
We will add event support in js later to handle these test cases

Reviewed By: davidaurelio

Differential Revision: D16560269

fbshipit-source-id: 52590c426faf87209f8635602b401fd5760af8ab
This commit is contained in:
Sidharth Guglani
2019-07-31 06:38:30 -07:00
committed by Facebook Github Bot
parent 8c270e68cc
commit adff8d96dd
10 changed files with 9 additions and 27 deletions

View File

@@ -10,7 +10,6 @@
"<!@(ls -1 sources/yoga/*/*.cpp)", "<!@(ls -1 sources/yoga/*/*.cpp)",
"sources/Config.cc", "sources/Config.cc",
"sources/Node.cc", "sources/Node.cc",
"sources/global.cc",
"sources/nbind.cc" "sources/nbind.cc"
], ],

View File

@@ -350,9 +350,6 @@ module.exports = (bind: any, lib: any): Yoga => {
Layout: bind('Layout', Layout), Layout: bind('Layout', Layout),
Size: bind('Size', Size), Size: bind('Size', Size),
Value: bind('Value', Value), Value: bind('Value', Value),
getInstanceCount(...args) {
return lib.getInstanceCount(...args);
},
...CONSTANTS, ...CONSTANTS,
}; };
}; };

View File

@@ -1,9 +0,0 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
#pragma once
unsigned getInstanceCount(void);

View File

@@ -11,14 +11,9 @@
#include "./Size.hh" #include "./Size.hh"
#include "./Value.hh" #include "./Value.hh"
#include "./Config.hh" #include "./Config.hh"
#include "./global.hh"
#include <nbind/nbind.h> #include <nbind/nbind.h>
NBIND_GLOBAL() {
function(getInstanceCount);
}
NBIND_CLASS(Size) { NBIND_CLASS(Size) {
construct<>(); construct<>();
construct<double, double>(); construct<double, double>();

View File

@@ -27,5 +27,5 @@ it("border_start", function () {
root.freeRecursive(); root.freeRecursive();
(typeof gc !== "undefined") && gc(); (typeof gc !== "undefined") && gc();
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")"); // TODO Add event support in js and check instace allocation and de allocation using that
}); });

View File

@@ -27,5 +27,5 @@ it("margin_start", function () {
root.freeRecursive(); root.freeRecursive();
(typeof gc !== "undefined") && gc(); (typeof gc !== "undefined") && gc();
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")"); // TODO Add event support in js and check instace allocation and de allocation using that
}); });

View File

@@ -27,5 +27,5 @@ it("padding_start", function () {
root.freeRecursive(); root.freeRecursive();
(typeof gc !== "undefined") && gc(); (typeof gc !== "undefined") && gc();
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")"); // TODO Add event support in js and check instace allocation and de allocation using that
}); });

View File

@@ -34,7 +34,7 @@ it("dirtied", function() {
root.freeRecursive(); root.freeRecursive();
typeof gc !== "undefined" && gc(); typeof gc !== "undefined" && gc();
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")"); // TODO Add event support in js and check instace allocation and de allocation using that
}); });
it("dirtied_propagation", function() { it("dirtied_propagation", function() {
@@ -75,7 +75,7 @@ it("dirtied_propagation", function() {
root.freeRecursive(); root.freeRecursive();
typeof gc !== "undefined" && gc(); typeof gc !== "undefined" && gc();
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")"); // TODO Add event support in js and check instace allocation and de allocation using that
}); });
it("dirtied_hierarchy", function() { it("dirtied_hierarchy", function() {
@@ -122,7 +122,7 @@ it("dirtied_hierarchy", function() {
root.freeRecursive(); root.freeRecursive();
typeof gc !== "undefined" && gc(); typeof gc !== "undefined" && gc();
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")"); // TODO Add event support in js and check instace allocation and de allocation using that
}); });
it("dirtied_reset", function() { it("dirtied_reset", function() {
@@ -164,5 +164,5 @@ it("dirtied_reset", function() {
root.freeRecursive(); root.freeRecursive();
typeof gc !== "undefined" && gc(); typeof gc !== "undefined" && gc();
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")"); // TODO Add event support in js and check instace allocation and de allocation using that
}); });

View File

@@ -29,5 +29,5 @@ it("measure_once_single_flexible_child", function () {
root.freeRecursive(); root.freeRecursive();
(typeof gc !== "undefined") && gc(); (typeof gc !== "undefined") && gc();
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")"); // TODO Add event support in js and check instace allocation and de allocation using that
}); });

View File

@@ -27,5 +27,5 @@ it("dont_measure_single_grow_shrink_child", function () {
root.freeRecursive(); root.freeRecursive();
(typeof gc !== "undefined") && gc(); (typeof gc !== "undefined") && gc();
console.assert(0 === Yoga.getInstanceCount(), "0 === Yoga.getInstanceCount() (" + Yoga.getInstanceCount() + ")"); // TODO Add event support in js and check instace allocation and de allocation using that
}); });