use of com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures.Variables.SequenceBuilder in project bazel by bazelbuild.
the class CcToolchainFeaturesTest method createNestedSequence.
private VariableValueBuilder createNestedSequence(int depth, int count, String prefix) {
if (depth == 0) {
StringSequenceBuilder builder = new StringSequenceBuilder();
for (int i = 0; i < count; ++i) {
String value = prefix + i;
builder.addValue(value);
}
return builder;
} else {
SequenceBuilder builder = new SequenceBuilder();
for (int i = 0; i < count; ++i) {
String value = prefix + i;
builder.addValue(createNestedSequence(depth - 1, count, value));
}
return builder;
}
}
Aggregations