Skip to content

Commit 1894d12

Browse files
committed
(binaryBFS/pgtap) Fix update test, there was a spelling error
1 parent 6532eb9 commit 1894d12

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

pgtap/traversal/binaryBreadthFirstSearch/edge_cases/edge_cases.pg

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,18 @@ FROM pgr_binaryBreadthFirstSearch(
8080
);
8181

8282

83-
SELECT throws_ok('errorTestManyWeights',
83+
SELECT
84+
CASE WHEN min_lib_version('4.0.0') THEN
85+
throws_ok('errorTestManyWeights',
8486
'XX000',
8587
'Graph Condition Failed: Graph should have at most two distinct non-negative edge costs! If there are exactly two distinct edge costs, one of them must equal zero!',
86-
'17: Graph has more than 2 distinct weights');
88+
'17: Graph has more than 2 distinct weights')
89+
ELSE
90+
throws_ok('errorTestManyWeights',
91+
'XX000',
92+
'Graph Condition Failed: Graph should have atmost two distinct non-negative edge costs! If there are exactly two distinct edge costs, one of them must equal zero!',
93+
'17: Graph has more than 2 distinct weights')
94+
END;
8795

8896
SELECT * INTO edges_invalid_2 FROM edges;
8997
UPDATE edges_invalid_2 SET cost = 2 WHERE cost = 0;
@@ -98,10 +106,18 @@ FROM pgr_binaryBreadthFirstSearch(
98106
);
99107

100108

101-
SELECT throws_ok('errorTestNoZeroWeight',
109+
SELECT
110+
CASE WHEN min_lib_version('4.0.0') THEN
111+
throws_ok('errorTestNoZeroWeight',
102112
'XX000',
103113
'Graph Condition Failed: Graph should have at most two distinct non-negative edge costs! If there are exactly two distinct edge costs, one of them must equal zero!',
104-
'17: If graph has 2 distinct weights, one must be zero');
114+
'17: If graph has 2 distinct weights, one must be zero')
115+
ELSE
116+
throws_ok('errorTestNoZeroWeight',
117+
'XX000',
118+
'Graph Condition Failed: Graph should have atmost two distinct non-negative edge costs! If there are exactly two distinct edge costs, one of them must equal zero!',
119+
'17: If graph has 2 distinct weights, one must be zero')
120+
END;
105121

106122

107123
SELECT * FROM finish();

0 commit comments

Comments
 (0)