2018-07-30 09:30:51 -07:00
|
|
|
/*
|
2018-09-11 15:27:47 -07:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2018-07-30 09:30:51 -07:00
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the LICENSE
|
|
|
|
* file in the root directory of this source tree.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
package com.facebook.yoga;
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
2018-08-06 02:10:43 -07:00
|
|
|
import java.util.List;
|
2018-07-30 09:30:51 -07:00
|
|
|
|
|
|
|
public class TestParametrization {
|
|
|
|
public static Iterable<NodeFactory> nodeFactories() {
|
2018-08-06 02:10:43 -07:00
|
|
|
NodeFactory nodeFactory = new NodeFactory() {
|
|
|
|
@Override
|
|
|
|
public YogaNode create() {
|
2019-02-19 11:15:10 -08:00
|
|
|
return YogaNode.create();
|
2018-08-06 02:10:43 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public YogaNode create(YogaConfig config) {
|
2019-02-19 11:15:10 -08:00
|
|
|
return YogaNode.create(config);
|
2018-08-06 02:10:43 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "JNI";
|
|
|
|
}
|
|
|
|
};
|
|
|
|
return Arrays.asList(nodeFactory);
|
2018-07-30 09:30:51 -07:00
|
|
|
}
|
|
|
|
|
2018-07-30 09:30:54 -07:00
|
|
|
|
2018-07-30 09:30:51 -07:00
|
|
|
public interface NodeFactory {
|
|
|
|
YogaNode create();
|
|
|
|
YogaNode create(YogaConfig config);
|
|
|
|
}
|
|
|
|
}
|