From 2d56c6e1f08090ce4b91810d96bb75494de3c206 Mon Sep 17 00:00:00 2001 From: Dominik Durner Date: Thu, 25 May 2023 10:50:14 +0200 Subject: [PATCH] More integration assertions --- test/integration/minio.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/integration/minio.cpp b/test/integration/minio.cpp index 4a51746..ccc9d88 100644 --- a/test/integration/minio.cpp +++ b/test/integration/minio.cpp @@ -88,13 +88,18 @@ TEST_CASE("MinIO Integration") { REQUIRE(it.success()); // Simple string_view interface REQUIRE(!content[i].compare(it.getResult())); + // Check from the other side too + REQUIRE(!it.getResult().compare(content[i])); + // Check the size + REQUIRE(it.getSize() == content[i].size()); // Advanced raw interface // Note that the data lies in the data buffer but after the offset to skip the HTTP header // Note that the size is already without the header, so the full request has size + offset length string_view rawDataString(reinterpret_cast(it.getData()) + it.getOffset(), it.getSize()); - REQUIRE(!content[i++].compare(rawDataString)); + REQUIRE(!content[i].compare(rawDataString)); REQUIRE(!rawDataString.compare(it.getResult())); + REQUIRE(!rawDataString.compare(content[i++])); } } }