Specify format folders more granularly

Summary: We don't want to format files in lib/ for example. For some reason java/jni and tests/CSSLayoutTestUtils folders were previously ignored. This change formats those folders as well.

Reviewed By: lucasr

Differential Revision: D3715203

fbshipit-source-id: 37bcbd36bcf8535cfca73d6a806ab0f1d097dde7
This commit is contained in:
Emil Sjolander
2016-08-15 09:15:09 -07:00
committed by Facebook Github Bot 6
parent 53ff4f59ca
commit 48e5304276
4 changed files with 79 additions and 42 deletions

View File

@@ -46,8 +46,12 @@ static bool are_layout_equal(CSSNode *a, CSSNode *b) {
return true;
}
CSSSize measure(void *context, float width, CSSMeasureMode widthMode, float height, CSSMeasureMode heightMode) {
const char *text = (const char *)context;
CSSSize measure(void *context,
float width,
CSSMeasureMode widthMode,
float height,
CSSMeasureMode heightMode) {
const char *text = (const char *) context;
CSSSize result;
if (strcmp(text, SMALL_TEXT) == 0) {
if (widthMode == CSSMeasureModeUndefined) {
@@ -105,7 +109,7 @@ CSSSize measure(void *context, float width, CSSMeasureMode widthMode, float heig
}
bool test(CSSNode *style, CSSNode *expected_layout) {
CSSNodeCalculateLayout(style, CSSUndefined, CSSUndefined, (CSSDirection)-1);
CSSNodeCalculateLayout(style, CSSUndefined, CSSUndefined, (CSSDirection) -1);
return are_layout_equal(style, expected_layout);
}