Add support for expression test
Fix polygon within algorithm Add Unit tests Fix incorrect metrics folder for ios-render-test-runner job
This commit is contained in:
@@ -104,8 +104,14 @@ TestRunOutput runExpressionTest(TestData& data, const std::string& rootPath, con
|
||||
std::vector<Value> outputs;
|
||||
if (!data.inputs.empty()) {
|
||||
for (const auto& input : data.inputs) {
|
||||
auto evaluationResult =
|
||||
expression->evaluate(input.zoom, input.feature, input.heatmapDensity, input.availableImages);
|
||||
mbgl::style::expression::EvaluationResult evaluationResult;
|
||||
if (input.canonical) {
|
||||
evaluationResult = expression->evaluate(
|
||||
input.zoom, input.feature, input.heatmapDensity, input.availableImages, *input.canonical);
|
||||
} else {
|
||||
evaluationResult =
|
||||
expression->evaluate(input.zoom, input.feature, input.heatmapDensity, input.availableImages);
|
||||
}
|
||||
if (!evaluationResult) {
|
||||
std::unordered_map<std::string, Value> error{{"error", Value{evaluationResult.error().message}}};
|
||||
outputs.emplace_back(Value{std::move(error)});
|
||||
|
||||
Reference in New Issue
Block a user