aboutsummaryrefslogtreecommitdiff
path: root/autotests/testolmutility.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-16 17:38:34 +0200
committerGitHub <noreply@github.com>2022-05-16 17:38:34 +0200
commit77b190d822c1e980b98b84999f0cfb609ed05a49 (patch)
tree049fc3936343a7af957c0bca20dd1531ae2e5f81 /autotests/testolmutility.cpp
parent0599ef6e603dce219b2ba000d7322e8d937753b9 (diff)
parentdecc676f1e469dc26c80c33da64fad15805de8f2 (diff)
downloadlibquotient-77b190d822c1e980b98b84999f0cfb609ed05a49.tar.gz
libquotient-77b190d822c1e980b98b84999f0cfb609ed05a49.zip
Merge #550: Quotient::Expected and QOlmExpected
Diffstat (limited to 'autotests/testolmutility.cpp')
-rw-r--r--autotests/testolmutility.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/autotests/testolmutility.cpp b/autotests/testolmutility.cpp
index b4532c8d..5b67c805 100644
--- a/autotests/testolmutility.cpp
+++ b/autotests/testolmutility.cpp
@@ -6,6 +6,8 @@
#include "e2ee/qolmaccount.h"
#include "e2ee/qolmutility.h"
+#include <olm/olm.h>
+
using namespace Quotient;
void TestOlmUtility::canonicalJSON()
@@ -79,10 +81,13 @@ void TestOlmUtility::verifySignedOneTimeKey()
delete[](reinterpret_cast<uint8_t *>(utility));
QOlmUtility utility2;
- auto res2 = std::get<bool>(utility2.ed25519Verify(aliceOlm.identityKeys().ed25519, msg, signatureBuf1));
+ auto res2 =
+ utility2
+ .ed25519Verify(aliceOlm.identityKeys().ed25519, msg, signatureBuf1)
+ .value_or(false);
//QCOMPARE(std::string(olm_utility_last_error(utility)), "SUCCESS");
- QCOMPARE(res2, true);
+ QVERIFY(res2);
}
void TestOlmUtility::validUploadKeysRequest()