Skip to content

Commit 9e51ba2

Browse files
ezbrcopybara-github
authored andcommitted
Enable CompressedTupleTest.NestedEbo test case.
PiperOrigin-RevId: 766707922 Change-Id: Ibb10a5e992665673e2bd918439429b79dbe78fbf
1 parent ccefe1e commit 9e51ba2

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

absl/container/internal/compressed_tuple_test.cc

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,6 @@ TEST(CompressedTupleTest, PointerToEmpty) {
107107
}
108108
}
109109

110-
TEST(CompressedTupleTest, NestedCompressedTuplePreservesEmptiness) {
111-
using TupleType = CompressedTuple<Empty<0>, CompressedTuple<Empty<0>>>;
112-
TupleType x;
113-
EXPECT_EQ(x.get<0>().value(), CallType::kMutableRef);
114-
EXPECT_EQ(x.get<1>().get<0>().value(), CallType::kMutableRef);
115-
EXPECT_TRUE(std::is_empty_v<TupleType>);
116-
}
117-
118110
TEST(CompressedTupleTest, OneMoveOnRValueConstructionTemp) {
119111
InstanceTracker tracker;
120112
CompressedTuple<CopyableMovableInstance> x1(CopyableMovableInstance(1));
@@ -460,14 +452,15 @@ TEST(CompressedTupleTest, EmptyFinalClass) {
460452
}
461453
#endif
462454

463-
// TODO(b/214288561): enable this test.
464-
TEST(CompressedTupleTest, DISABLED_NestedEbo) {
455+
TEST(CompressedTupleTest, NestedEbo) {
465456
struct Empty1 {};
466457
struct Empty2 {};
467458
CompressedTuple<Empty1, CompressedTuple<Empty2>, int> x;
468459
CompressedTuple<Empty1, Empty2, int> y;
469-
// Currently fails with sizeof(x) == 8, sizeof(y) == 4.
470460
EXPECT_EQ(sizeof(x), sizeof(y));
461+
462+
using NestedEmpty = CompressedTuple<Empty1, CompressedTuple<Empty2>>;
463+
EXPECT_TRUE(std::is_empty_v<NestedEmpty>);
471464
}
472465

473466
} // namespace

0 commit comments

Comments
 (0)