Compare commits

..

1 commit

Author SHA1 Message Date
604b423d1c Fixed errors and improve roster tests
Some checks failed
PR Check / on-push-commit-check (push) Has been cancelled
2024-11-21 23:15:35 +00:00
2 changed files with 7 additions and 2 deletions

2
.vscode/launch.json vendored
View file

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

View file

@ -5,6 +5,9 @@
#include <larra/serialization/auto.hpp>
#include <larra/serialization/error.hpp>
#include <larra/stream_error.hpp>
#include <variant>
#include "utempl/utils.hpp"
using namespace std::literals;
@ -31,7 +34,9 @@ TEST(Serialize, Variant) {
}
TEST(CheckFinalErrorPlace, Variant) {
ASSERT_EQ(std::variant_size<StreamError>::value, utempl::kTupleSize<StreamError>);
StreamError stream_error = error::stream::UnknownXmppError{};
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 {