From 9ad006390dbd97cbd7d3bde27234ab0e3c37b13c Mon Sep 17 00:00:00 2001 From: Arun Thakur Date: Mon, 22 Jul 2024 22:45:34 +0530 Subject: [PATCH] [centrality] added types_check.pg --- pgtap/metrics/types_check.pg | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pgtap/metrics/types_check.pg 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;