mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-19 19:03:50 +00:00
Add unit test for isLayoutIdentical(empty, empty).
It was previously asserting in Visual C++ debug mode on a null iterator passed to std::equal. Test by Hans Wennborg! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
387ab5afe7
commit
7b18ff7dd2
@ -27,4 +27,12 @@ TEST(TypesTest, StructType) {
|
||||
EXPECT_FALSE(Struct->hasName());
|
||||
}
|
||||
|
||||
TEST(TypesTest, LayoutIdenticalEmptyStructs) {
|
||||
LLVMContext C;
|
||||
|
||||
StructType *Foo = StructType::create(C, "Foo");
|
||||
StructType *Bar = StructType::create(C, "Bar");
|
||||
EXPECT_TRUE(Foo->isLayoutIdentical(Bar));
|
||||
}
|
||||
|
||||
} // end anonymous namespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user