Use TestParametrization for testing both fbjni and vanillaJNI version

Summary: Use TestParametrization to test both fbjni and vanilla jni versions

Reviewed By: amir-shalem

Differential Revision: D17788718

fbshipit-source-id: 0f3317b7403cadca7b7ccd9140f1933d746bf433
This commit is contained in:
Sidharth Guglani
2019-10-09 09:26:47 -07:00
committed by Facebook Github Bot
parent d6591439d1
commit 293b657aef
3 changed files with 26 additions and 1 deletions

View File

@@ -27,7 +27,25 @@ public class TestParametrization {
return "JNI";
}
};
return Arrays.asList(nodeFactory);
NodeFactory nodeFactoryUsingVanillaJNI = new NodeFactory() {
@Override
public YogaNode create() {
return YogaNodeFactory.create(true);
}
@Override
public YogaNode create(YogaConfig config) {
config.setUseVanillaJNI(true);
return YogaNodeFactory.create(config);
}
@Override
public String toString() {
return "VanillaJNI";
}
};
return Arrays.asList(nodeFactory, nodeFactoryUsingVanillaJNI);
}