Skip to content

Commit

Permalink
test: internal changes
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Nov 11, 2024
1 parent ec9153f commit e64c66f
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions test/entt/core/any.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ TEST(Any, SBOInPlaceTypeConstruction) {
auto other = any.as_ref();

ASSERT_TRUE(other);
ASSERT_TRUE(any.owner());
ASSERT_FALSE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::ref);
ASSERT_EQ(other.type(), entt::type_id<int>());
ASSERT_EQ(entt::any_cast<int>(other), 2);
Expand Down Expand Up @@ -132,7 +132,7 @@ TEST(Any, SBOAsRefConstruction) {
auto other = any.as_ref();

ASSERT_TRUE(other);
ASSERT_FALSE(any.owner());
ASSERT_FALSE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::ref);
ASSERT_EQ(other.type(), entt::type_id<int>());
ASSERT_EQ(entt::any_cast<int>(other), 2);
Expand Down Expand Up @@ -171,7 +171,7 @@ TEST(Any, SBOAsConstRefConstruction) {
auto other = any.as_ref();

ASSERT_TRUE(other);
ASSERT_FALSE(any.owner());
ASSERT_FALSE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::cref);
ASSERT_EQ(other.type(), entt::type_id<int>());
ASSERT_EQ(entt::any_cast<int>(other), 2);
Expand All @@ -184,7 +184,7 @@ TEST(Any, SBOCopyConstruction) {

ASSERT_TRUE(any);
ASSERT_TRUE(other);
ASSERT_TRUE(any.owner());
ASSERT_TRUE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::embedded);
ASSERT_EQ(other.type(), entt::type_id<int>());
ASSERT_EQ(entt::any_cast<double>(&other), nullptr);
Expand All @@ -199,7 +199,7 @@ TEST(Any, SBOCopyAssignment) {

ASSERT_TRUE(any);
ASSERT_TRUE(other);
ASSERT_TRUE(any.owner());
ASSERT_TRUE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::embedded);
ASSERT_EQ(other.type(), entt::type_id<int>());
ASSERT_EQ(entt::any_cast<double>(&other), nullptr);
Expand Down Expand Up @@ -228,7 +228,7 @@ TEST(Any, SBOMoveConstruction) {

ASSERT_TRUE(any);
ASSERT_TRUE(other);
ASSERT_TRUE(any.owner());
ASSERT_TRUE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::embedded);
ASSERT_EQ(other.type(), entt::type_id<int>());
ASSERT_EQ(entt::any_cast<double>(&other), nullptr);
Expand All @@ -244,7 +244,7 @@ TEST(Any, SBOMoveAssignment) {

ASSERT_TRUE(any);
ASSERT_TRUE(other);
ASSERT_TRUE(any.owner());
ASSERT_TRUE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::embedded);
ASSERT_EQ(other.type(), entt::type_id<int>());
ASSERT_EQ(entt::any_cast<double>(&other), nullptr);
Expand Down Expand Up @@ -414,7 +414,7 @@ TEST(Any, NoSBOAsRefConstruction) {
auto other = any.as_ref();

ASSERT_TRUE(other);
ASSERT_FALSE(any.owner());
ASSERT_FALSE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::ref);
ASSERT_EQ(other.type(), entt::type_id<fat>());
ASSERT_EQ(entt::any_cast<fat>(other), (fat{.1, .2, .3, .4}));
Expand Down Expand Up @@ -453,7 +453,7 @@ TEST(Any, NoSBOAsConstRefConstruction) {
auto other = any.as_ref();

ASSERT_TRUE(other);
ASSERT_FALSE(any.owner());
ASSERT_FALSE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::cref);
ASSERT_EQ(other.type(), entt::type_id<fat>());
ASSERT_EQ(entt::any_cast<fat>(other), (fat{.1, .2, .3, .4}));
Expand All @@ -467,7 +467,7 @@ TEST(Any, NoSBOCopyConstruction) {

ASSERT_TRUE(any);
ASSERT_TRUE(other);
ASSERT_TRUE(any.owner());
ASSERT_TRUE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::dynamic);
ASSERT_EQ(other.type(), entt::type_id<fat>());
ASSERT_EQ(entt::any_cast<double>(&other), nullptr);
Expand All @@ -483,7 +483,7 @@ TEST(Any, NoSBOCopyAssignment) {

ASSERT_TRUE(any);
ASSERT_TRUE(other);
ASSERT_TRUE(any.owner());
ASSERT_TRUE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::dynamic);
ASSERT_EQ(other.type(), entt::type_id<fat>());
ASSERT_EQ(entt::any_cast<double>(&other), nullptr);
Expand Down Expand Up @@ -514,7 +514,7 @@ TEST(Any, NoSBOMoveConstruction) {

ASSERT_TRUE(any);
ASSERT_TRUE(other);
ASSERT_TRUE(any.owner());
ASSERT_TRUE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::dynamic);
ASSERT_EQ(other.type(), entt::type_id<fat>());
ASSERT_EQ(entt::any_cast<double>(&other), nullptr);
Expand All @@ -531,7 +531,7 @@ TEST(Any, NoSBOMoveAssignment) {

ASSERT_TRUE(any);
ASSERT_TRUE(other);
ASSERT_TRUE(any.owner());
ASSERT_TRUE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::dynamic);
ASSERT_EQ(other.type(), entt::type_id<fat>());
ASSERT_EQ(entt::any_cast<double>(&other), nullptr);
Expand Down Expand Up @@ -681,7 +681,7 @@ TEST(Any, VoidCopyConstruction) {

ASSERT_FALSE(any);
ASSERT_FALSE(other);
ASSERT_FALSE(any.owner());
ASSERT_FALSE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::empty);
ASSERT_EQ(other.type(), entt::type_id<void>());
ASSERT_EQ(entt::any_cast<int>(&any), nullptr);
Expand All @@ -696,7 +696,7 @@ TEST(Any, VoidCopyAssignment) {

ASSERT_FALSE(any);
ASSERT_FALSE(other);
ASSERT_FALSE(any.owner());
ASSERT_FALSE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::empty);
ASSERT_EQ(other.type(), entt::type_id<void>());
ASSERT_EQ(entt::any_cast<int>(&any), nullptr);
Expand Down Expand Up @@ -725,7 +725,7 @@ TEST(Any, VoidMoveConstruction) {

ASSERT_FALSE(any);
ASSERT_FALSE(other);
ASSERT_FALSE(any.owner());
ASSERT_FALSE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::empty);
ASSERT_EQ(other.type(), entt::type_id<void>());
ASSERT_EQ(entt::any_cast<double>(&other), nullptr);
Expand All @@ -740,7 +740,7 @@ TEST(Any, VoidMoveAssignment) {

ASSERT_FALSE(any);
ASSERT_FALSE(other);
ASSERT_FALSE(any.owner());
ASSERT_FALSE(other.owner());
ASSERT_EQ(other.policy(), entt::any_policy::empty);
ASSERT_EQ(other.type(), entt::type_id<void>());
ASSERT_EQ(entt::any_cast<double>(&other), nullptr);
Expand Down Expand Up @@ -1017,7 +1017,7 @@ TEST(Any, SBOWithEmptySwap) {
std::swap(lhs, rhs);

ASSERT_FALSE(rhs);
ASSERT_FALSE(rhs.owner());
ASSERT_TRUE(lhs.owner());
ASSERT_EQ(lhs.policy(), entt::any_policy::embedded);
ASSERT_EQ(lhs.type(), entt::type_id<char>());
ASSERT_EQ(entt::any_cast<double>(&lhs), nullptr);
Expand All @@ -1042,7 +1042,7 @@ TEST(Any, SBOWithVoidSwap) {
std::swap(lhs, rhs);

ASSERT_FALSE(rhs);
ASSERT_FALSE(rhs.owner());
ASSERT_TRUE(lhs.owner());
ASSERT_EQ(lhs.policy(), entt::any_policy::embedded);
ASSERT_EQ(lhs.type(), entt::type_id<char>());
ASSERT_EQ(entt::any_cast<double>(&lhs), nullptr);
Expand Down Expand Up @@ -1112,7 +1112,7 @@ TEST(Any, NoSBOWithEmptySwap) {
std::swap(lhs, rhs);

ASSERT_FALSE(rhs);
ASSERT_FALSE(rhs.owner());
ASSERT_TRUE(lhs.owner());
ASSERT_EQ(lhs.policy(), entt::any_policy::dynamic);
ASSERT_EQ(lhs.type(), entt::type_id<fat>());
ASSERT_EQ(entt::any_cast<double>(&lhs), nullptr);
Expand All @@ -1137,7 +1137,7 @@ TEST(Any, NoSBOWithVoidSwap) {
std::swap(lhs, rhs);

ASSERT_FALSE(rhs);
ASSERT_FALSE(rhs.owner());
ASSERT_TRUE(lhs.owner());
ASSERT_EQ(lhs.policy(), entt::any_policy::dynamic);
ASSERT_EQ(lhs.type(), entt::type_id<fat>());
ASSERT_EQ(entt::any_cast<double>(&lhs), nullptr);
Expand Down

0 comments on commit e64c66f

Please sign in to comment.