Optimize log print by using html format

Summary:
See facebook/yoga#453. Optimizes the node log print by generating some enum text via ```enum.py``` and moving printing to new functions to reduce boilerplate code.

Changes the log output to format the nodes in html to be able to copy paste it  into browsers for quick debugging.

Hides all default values.
Closes https://github.com/facebook/yoga/pull/479

Reviewed By: gkassabli

Differential Revision: D4802184

Pulled By: emilsjolander

fbshipit-source-id: 143bd63cbc31fb0755d711062cb4e6a448049ba3
This commit is contained in:
Lukas Wöhrl
2017-04-03 09:34:42 -07:00
committed by Facebook Github Bot
parent 5112564f08
commit 586b57009a
8 changed files with 443 additions and 153 deletions

View File

@@ -180,7 +180,7 @@ TEST(YogaTest, dont_measure_when_min_equals_max_mixed_height_percent) {
}
#if GTEST_HAS_DEATH_TEST
TEST(YogaTest, cannot_add_child_to_node_with_measure_func) {
TEST(YogaDeathTest, cannot_add_child_to_node_with_measure_func) {
const YGNodeRef root = YGNodeNew();
YGNodeSetMeasureFunc(root, _measure);
@@ -190,7 +190,7 @@ TEST(YogaTest, cannot_add_child_to_node_with_measure_func) {
YGNodeFreeRecursive(root);
}
TEST(YogaTest, cannot_add_nonnull_measure_func_to_non_leaf_node) {
TEST(YogaDeathTest, cannot_add_nonnull_measure_func_to_non_leaf_node) {
const YGNodeRef root = YGNodeNew();
const YGNodeRef root_child0 = YGNodeNew();
YGNodeInsertChild(root, root_child0, 0);
@@ -199,6 +199,8 @@ TEST(YogaTest, cannot_add_nonnull_measure_func_to_non_leaf_node) {
YGNodeFreeRecursive(root);
}
#endif
TEST(YogaTest, can_nullify_measure_func_on_any_node) {
const YGNodeRef root = YGNodeNew();
YGNodeInsertChild(root, YGNodeNew(), 0);
@@ -208,4 +210,3 @@ TEST(YogaTest, can_nullify_measure_func_on_any_node) {
YGNodeFreeRecursive(root);
}
#endif