aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/VMCore/DerivedTypesTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/VMCore/DerivedTypesTest.cpp')
-rw-r--r--unittests/VMCore/DerivedTypesTest.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/unittests/VMCore/DerivedTypesTest.cpp b/unittests/VMCore/DerivedTypesTest.cpp
index 11b4dff..2e0450d 100644
--- a/unittests/VMCore/DerivedTypesTest.cpp
+++ b/unittests/VMCore/DerivedTypesTest.cpp
@@ -18,14 +18,16 @@ namespace {
TEST(OpaqueTypeTest, RegisterWithContext) {
LLVMContext C;
- LLVMContextImpl *pImpl = C.pImpl;
+ LLVMContextImpl *pImpl = C.pImpl;
- EXPECT_EQ(0u, pImpl->OpaqueTypes.size());
+ // 1 refers to the AlwaysOpaqueTy allocated in the Context's constructor and
+ // destroyed in the destructor.
+ EXPECT_EQ(1u, pImpl->OpaqueTypes.size());
{
PATypeHolder Type = OpaqueType::get(C);
- EXPECT_EQ(1u, pImpl->OpaqueTypes.size());
+ EXPECT_EQ(2u, pImpl->OpaqueTypes.size());
}
- EXPECT_EQ(0u, pImpl->OpaqueTypes.size());
+ EXPECT_EQ(1u, pImpl->OpaqueTypes.size());
}
} // namespace