diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-14 20:09:39 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-16 06:39:33 +0200 |
commit | f1ed7eec77f843de689c3f3540db73bb235b2164 (patch) | |
tree | 15e88d3acd2bbfba3ab87bdc65b86c05aecd26d1 /quotest/quotest.cpp | |
parent | 42bdfa1d7a2cb7d8e6af58f7b91689c31c64f276 (diff) | |
download | libquotient-f1ed7eec77f843de689c3f3540db73bb235b2164.tar.gz libquotient-f1ed7eec77f843de689c3f3540db73bb235b2164.zip |
Quotest: test checkResource()
Diffstat (limited to 'quotest/quotest.cpp')
-rw-r--r-- | quotest/quotest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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() |