aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/VMCore/MetadataTest.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-05-30 05:06:04 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-05-30 05:06:04 +0000
commit7a0370f66ab5739f42ffe822f33494e0de9b182b (patch)
tree45b56951ca455c4f0fffdc0e55733b84608162ef /unittests/VMCore/MetadataTest.cpp
parentc5ca713b8073d9fe95b258d0c01328d020df3357 (diff)
downloadexternal_llvm-7a0370f66ab5739f42ffe822f33494e0de9b182b.tar.gz
external_llvm-7a0370f66ab5739f42ffe822f33494e0de9b182b.tar.bz2
external_llvm-7a0370f66ab5739f42ffe822f33494e0de9b182b.zip
Give embedded metadata its own type instead of relying on EmptyStructTy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/VMCore/MetadataTest.cpp')
-rw-r--r--unittests/VMCore/MetadataTest.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/unittests/VMCore/MetadataTest.cpp b/unittests/VMCore/MetadataTest.cpp
index c4b845e7ae..2de3a92481 100644
--- a/unittests/VMCore/MetadataTest.cpp
+++ b/unittests/VMCore/MetadataTest.cpp
@@ -50,7 +50,7 @@ TEST(MDStringTest, PrintingSimple) {
std::ostringstream oss;
s->print(oss);
- EXPECT_STREQ("{ } !\"testing 1 2 3\"", oss.str().c_str());
+ EXPECT_STREQ("metadata !\"testing 1 2 3\"", oss.str().c_str());
}
// Test printing of MDString with non-printable characters.
@@ -59,7 +59,7 @@ TEST(MDStringTest, PrintingComplex) {
MDString *s = MDString::get(str+0, str+5);
std::ostringstream oss;
s->print(oss);
- EXPECT_STREQ("{ } !\"\\00\\0A\\22\\5C\\FF\"", oss.str().c_str());
+ EXPECT_STREQ("metadata !\"\\00\\0A\\22\\5C\\FF\"", oss.str().c_str());
}
// Test the two constructors, and containing other Constants.
@@ -94,8 +94,10 @@ TEST(MDNodeTest, Simple) {
std::ostringstream oss1, oss2;
n1->print(oss1);
n2->print(oss2);
- EXPECT_STREQ("{ } !{{ } !\"abc\", i8 0, { } !\"123\"}", oss1.str().c_str());
- EXPECT_STREQ("{ } !{{ } !{{ } !\"abc\", i8 0, { } !\"123\"}}",
+ EXPECT_STREQ("metadata !{metadata !\"abc\", i8 0, metadata !\"123\"}",
+ oss1.str().c_str());
+ EXPECT_STREQ("metadata !{metadata !{metadata !\"abc\", i8 0, "
+ "metadata !\"123\"}}",
oss2.str().c_str());
}
@@ -132,6 +134,6 @@ TEST(MDNodeTest, Delete) {
std::ostringstream oss;
wvh->print(oss);
- EXPECT_STREQ("{ } !{null}", oss.str().c_str());
+ EXPECT_STREQ("metadata !{null}", oss.str().c_str());
}
}