1
0
Fork 0

Fix memory leak in KShortestPaths testing code (#8777)

This commit is contained in:
Markus Pfeiffer 2019-04-17 14:11:37 +01:00 committed by Michael Hackstein
parent 304e8f861d
commit 8ab9ae96cd
1 changed files with 2 additions and 0 deletions

View File

@ -317,6 +317,7 @@ TEST_CASE("KShortestPathsFinder", "[graph]") {
for (size_t i = 0; i < result.length(); i++) {
auto vert = result.vertexToAqlValue(spo->cache(), i);
AqlValueGuard guard(vert, true);
if (!vert.slice().get(StaticStrings::KeyString).isEqualString(vertices.at(i))) {
LOG_DEVEL << "expected vertex " << vertices.at(i) << " but found "
<< vert.slice().get(StaticStrings::KeyString).toString();
@ -328,6 +329,7 @@ TEST_CASE("KShortestPathsFinder", "[graph]") {
CHECK((result.edgeToAqlValue(spo->cache(), 0).isNull(true)));
for (size_t i = 1; i < result.length(); i++) {
auto edge = result.edgeToAqlValue(spo->cache(), i);
AqlValueGuard guard(edge, true);
if (!edge.slice().get(StaticStrings::FromString).isEqualString(edges.at(i).first) ||
!edge.slice().get(StaticStrings::ToString).isEqualString(edges.at(i).second)) {
LOG_DEVEL << "expected edge " << edges.at(i).first << " -> "