2019-10-15 10:30:08 -07:00
|
|
|
/*
|
2022-10-04 13:59:32 -07:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2018-07-30 09:30:51 -07:00
|
|
|
*
|
2019-10-15 10:30:08 -07:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2018-07-30 09:30:51 -07:00
|
|
|
*/
|
2019-10-15 10:30:08 -07:00
|
|
|
|
2018-07-30 09:30:51 -07:00
|
|
|
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-09-17 06:52:49 -07:00
|
|
|
return YogaNodeFactory.create();
|
2018-08-06 02:10:43 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public YogaNode create(YogaConfig config) {
|
2019-09-17 06:52:49 -07:00
|
|
|
return YogaNodeFactory.create(config);
|
2018-08-06 02:10:43 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "JNI";
|
|
|
|
}
|
|
|
|
};
|
2019-11-13 15:13:02 -08:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|