Skip to content

Commit

Permalink
test: minor changes (code coverage purposes)
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Dec 23, 2023
1 parent 24aac47 commit 433fca9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/entt/meta/meta_any.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <algorithm>
#include <cstddef>
#include <iterator>
#include <memory>
#include <utility>
#include <gtest/gtest.h>
#include <entt/core/hashed_string.hpp>
Expand Down Expand Up @@ -70,12 +71,18 @@ enum class enum_class : unsigned short int {
};

struct unmanageable_t {
unmanageable_t() = default;
unmanageable_t()
: value{std::make_unique<int>(42)} {}

~unmanageable_t() = default;

unmanageable_t(const unmanageable_t &) = delete;
unmanageable_t(unmanageable_t &&) = delete;

unmanageable_t &operator=(const unmanageable_t &) = delete;
unmanageable_t &operator=(unmanageable_t &&) = delete;

std::unique_ptr<int> value;
};

struct MetaAny: ::testing::Test {
Expand Down Expand Up @@ -1303,7 +1310,7 @@ TEST_F(MetaAny, EnumConversion) {
}

TEST_F(MetaAny, UnmanageableType) {
unmanageable_t instance;
unmanageable_t instance{};
auto any = entt::forward_as_meta(instance);
entt::meta_any other = any.as_ref();

Expand Down

0 comments on commit 433fca9

Please sign in to comment.