diff --git a/pgtap/metrics/types_check.pg b/pgtap/metrics/types_check.pg new file mode 100644 index 0000000000..3b180fd146 --- /dev/null +++ b/pgtap/metrics/types_check.pg @@ -0,0 +1,41 @@ + +/*PGR-GNU***************************************************************** + +Copyright (c) 2018 pgRouting developers +Mail: project@pgrouting.org + +------ +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + ********************************************************************PGR-GNU*/ +BEGIN; + +SELECT plan(5); + +SELECT has_function('pgr_floydwarshall'); +SELECT has_function('pgr_floydwarshall', ARRAY['text','boolean']); +SELECT function_returns('pgr_floydwarshall', ARRAY['text','boolean'],'setof record'); + +SELECT set_eq( + $$SELECT proargnames from pg_proc where proname = 'pgr_floydwarshall'$$, + $$VALUES + ('{"","directed","start_vid","end_vid","agg_cost"}'::TEXT[]) + $$); + +SELECT set_eq( + $$SELECT proallargtypes from pg_proc where proname = 'pgr_floydwarshall'$$, + $$VALUES + ('{25,16,20,20,701}'::OID[]) + $$); + +SELECT finish(); +ROLLBACK;