Teach test generator gap/row-gap/column-gap

Summary:
This adds mappings to the test generator to create the right language specific calls when an HTML fixture has gap properties.

Changelog:
[Internal][Added] - Teach yoga test generator gap/row-gap/column-gap

Reviewed By: javache

Differential Revision: D39922409

fbshipit-source-id: 5b905ed95ae64373d2c7d3bb1a03e94270bf209a
This commit is contained in:
Nick Gerleman
2022-10-13 08:18:49 -07:00
committed by Facebook GitHub Bot
parent f992e63ac5
commit 8e29e7c1e1
5 changed files with 45 additions and 0 deletions

View File

@@ -128,6 +128,10 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, {
YGEdgeStart:{value:'YogaEdge.START'},
YGEdgeTop:{value:'YogaEdge.TOP'},
YGGutterAll:{value:'YogaGutter.ALL'},
YGGutterColumn:{value:'YogaGutter.COLUMN'},
YGGutterRow:{value:'YogaGutter.ROW'},
YGFlexDirectionColumn:{value:'YogaFlexDirection.COLUMN'},
YGFlexDirectionColumnReverse:{value:'YogaFlexDirection.COLUMN_REVERSE'},
YGFlexDirectionRow:{value:'YogaFlexDirection.ROW'},
@@ -280,4 +284,8 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, {
YGNodeStyleSetWidth:{value:function(nodeName, value) {
this.push(nodeName + '.setWidth' + toMethodName(value) + '(' + toValueJava(value) + 'f);');
}},
YGNodeStyleSetGap:{value:function(nodeName, gap, value) {
this.push(nodeName + '.setGap' + toMethodName(value) + '(' + gap + ', ' + toValueJava(value) + 'f);');
}},
});