Overpass API regression suite coverage (Nova Scotia) / overpass_api/statements/set_list_operators.cc
overpass_api/statements/set_list_operators.cc
159 of 163 instrumented lines run by the suite (97.5%) at 8edf11b0419c (this file on GitHub).
runnever runcolumns: line, executions, queries (click for the queries that run the line)
1/** Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Roland Olbricht et al.2 *3 * This file is part of Overpass_API.4 *5 * Overpass_API is free software: you can redistribute it and/or modify6 * it under the terms of the GNU Affero General Public License as7 * published by the Free Software Foundation, either version 3 of the8 * License, or (at your option) any later version.9 *10 * Overpass_API is distributed in the hope that it will be useful,11 * but WITHOUT ANY WARRANTY; without even the implied warranty of12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * GNU General Public License for more details.14 *15 * You should have received a copy of the GNU Affero General Public License16 * along with Overpass_API. If not, see <http://www.gnu.org/licenses/>.17 */19#include "../data/tag_store.h"20#include "../data/utils.h"21#include "set_list_operators.h"24std::string trim(const std::string& input)41std::vector< std::string > members(const std::string& lrs)67//-----------------------------------------------------------------------------70Binary_Set_List_Operator_Statement_Maker< Evaluator_Lrs_In > Evaluator_Lrs_In::statement_maker;71Binary_Set_List_Operator_Evaluator_Maker< Evaluator_Lrs_In > Evaluator_Lrs_In::evaluator_maker;74std::string Evaluator_Lrs_In::process(const std::string& first_s, const std::string& second_s) const101//-----------------------------------------------------------------------------104Binary_Set_List_Operator_Statement_Maker< Evaluator_Lrs_Isect > Evaluator_Lrs_Isect::statement_maker;105Binary_Set_List_Operator_Evaluator_Maker< Evaluator_Lrs_Isect > Evaluator_Lrs_Isect::evaluator_maker;108std::string Evaluator_Lrs_Isect::process(const std::string& first_s, const std::string& second_s) const11675544823 q result.erase(std::set_intersection(first.begin(), first.end(), second.begin(), second.end(), result.begin()),129//-----------------------------------------------------------------------------132Binary_Set_List_Operator_Statement_Maker< Evaluator_Lrs_Union > Evaluator_Lrs_Union::statement_maker;133Binary_Set_List_Operator_Evaluator_Maker< Evaluator_Lrs_Union > Evaluator_Lrs_Union::evaluator_maker;136std::string Evaluator_Lrs_Union::process(const std::string& first_s, const std::string& second_s) const144208130842 q result.erase(std::set_union(first.begin(), first.end(), second.begin(), second.end(), result.begin()),157//-----------------------------------------------------------------------------160enum Type_Indicator { type_void = 0, type_int64 = 1, type_double = 2, type_string = 3 };163Unary_Set_List_Operator_Statement_Maker< Evaluator_Lrs_Max > Evaluator_Lrs_Max::statement_maker;164Unary_Set_List_Operator_Evaluator_Maker< Evaluator_Lrs_Max > Evaluator_Lrs_Max::evaluator_maker;167void update_maximum(const std::string& elem, Type_Indicator& relevant_type,168 int64& result_l, double& result_d, std::string& result_s)193std::string Evaluator_Lrs_Max::process(const std::string& rhs_s) const210165756 q update_maximum(trim(rhs_s.substr(from, to - from)), relevant_type, result_l, result_d, result_s);226//-----------------------------------------------------------------------------229Unary_Set_List_Operator_Statement_Maker< Evaluator_Lrs_Min > Evaluator_Lrs_Min::statement_maker;230Unary_Set_List_Operator_Evaluator_Maker< Evaluator_Lrs_Min > Evaluator_Lrs_Min::evaluator_maker;233void update_minimum(const std::string& elem, Type_Indicator& relevant_type,234 int64& result_l, double& result_d, std::string& result_s)259std::string Evaluator_Lrs_Min::process(const std::string& rhs_s) const