Compare commits

..

1 commit

Author SHA1 Message Date
1a9b293dee Fixed errors and improve roster tests
All checks were successful
PR Check / on-push-commit-check (push) Successful in 12m32s
2024-11-21 22:46:21 +00:00
2 changed files with 2 additions and 7 deletions

2
.vscode/launch.json vendored
View file

@ -20,7 +20,7 @@
"program": "${workspaceFolder}/build/larra_xmpp_tests", "program": "${workspaceFolder}/build/larra_xmpp_tests",
"args": [ "args": [
// --gtest_filter=POSTIVE_PATTERNS[-NEGATIVE_PATTERNS] // --gtest_filter=POSTIVE_PATTERNS[-NEGATIVE_PATTERNS]
// "--gtest_filter=Roster*" "--gtest_filter=Roster*"
], ],
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"preLaunchTask": "GCC: Build" "preLaunchTask": "GCC: Build"

View file

@ -5,9 +5,6 @@
#include <larra/serialization/auto.hpp> #include <larra/serialization/auto.hpp>
#include <larra/serialization/error.hpp> #include <larra/serialization/error.hpp>
#include <larra/stream_error.hpp> #include <larra/stream_error.hpp>
#include <variant>
#include "utempl/utils.hpp"
using namespace std::literals; using namespace std::literals;
@ -34,9 +31,7 @@ TEST(Serialize, Variant) {
} }
TEST(CheckFinalErrorPlace, Variant) { TEST(CheckFinalErrorPlace, Variant) {
StreamError stream_error = error::stream::UnknownXmppError{}; ASSERT_EQ(std::variant_size<StreamError>::value, utempl::kTupleSize<StreamError>);
EXPECT_NO_THROW(std::get<std::variant_size_v<StreamError> - 1>(stream_error))
<< "'UnknownXmppError' must be at the end of 'StreamError' variant";
} }
namespace tests::serialization { namespace tests::serialization {