From f1ed7eec77f843de689c3f3540db73bb235b2164 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sat, 14 May 2022 20:09:39 +0200 Subject: Quotest: test checkResource() --- quotest/quotest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'quotest/quotest.cpp') diff --git a/quotest/quotest.cpp b/quotest/quotest.cpp index b14442b9..1eed865f 100644 --- a/quotest/quotest.cpp +++ b/quotest/quotest.cpp @@ -764,6 +764,14 @@ TEST_IMPL(visitResources) clog << "Incorrect matrix.to representation:" << matrixToUrl.toStdString() << endl; } + const auto checkResult = checkResource(connection(), uriString); + if ((checkResult != UriResolved && uri.type() != Uri::NonMatrix) + || (uri.type() == Uri::NonMatrix + && checkResult != CouldNotResolve)) { + clog << "checkResource() returned incorrect result:" + << checkResult; + FAIL_TEST(); + } ud.visitResource(connection(), uriString); if (spy.count() != 1) { clog << "Wrong number of signal emissions (" << spy.count() -- cgit v1.2.3