aboutsummaryrefslogtreecommitdiffstats
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-26 03:31:47 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-26 03:31:47 +0000
commita14d225ef4d3d8bd8ec9ec913246d1fb47d2edc1 (patch)
tree0490ef0bdb198deebd60acfcf8a7c5cae828d38d /unittests
parentd61918fc6898a89df8b0a03e068f234ded010cdf (diff)
downloadexternal_llvm-a14d225ef4d3d8bd8ec9ec913246d1fb47d2edc1.zip
external_llvm-a14d225ef4d3d8bd8ec9ec913246d1fb47d2edc1.tar.gz
external_llvm-a14d225ef4d3d8bd8ec9ec913246d1fb47d2edc1.tar.bz2
Update Triple to use StringRef/Twine based APIs.
- This is now shorter, simpler, safer, and more efficient, what a deal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ADT/TripleTest.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/unittests/ADT/TripleTest.cpp b/unittests/ADT/TripleTest.cpp
index dee09f4..cbb2ea4 100644
--- a/unittests/ADT/TripleTest.cpp
+++ b/unittests/ADT/TripleTest.cpp
@@ -18,58 +18,58 @@ TEST(TripleTest, BasicParsing) {
Triple T;
T = Triple("");
- EXPECT_EQ("", T.getArchName());
- EXPECT_EQ("", T.getVendorName());
- EXPECT_EQ("", T.getOSName());
- EXPECT_EQ("", T.getEnvironmentName());
+ EXPECT_EQ("", T.getArchName().str());
+ EXPECT_EQ("", T.getVendorName().str());
+ EXPECT_EQ("", T.getOSName().str());
+ EXPECT_EQ("", T.getEnvironmentName().str());
T = Triple("-");
- EXPECT_EQ("", T.getArchName());
- EXPECT_EQ("", T.getVendorName());
- EXPECT_EQ("", T.getOSName());
- EXPECT_EQ("", T.getEnvironmentName());
+ EXPECT_EQ("", T.getArchName().str());
+ EXPECT_EQ("", T.getVendorName().str());
+ EXPECT_EQ("", T.getOSName().str());
+ EXPECT_EQ("", T.getEnvironmentName().str());
T = Triple("--");
- EXPECT_EQ("", T.getArchName());
- EXPECT_EQ("", T.getVendorName());
- EXPECT_EQ("", T.getOSName());
- EXPECT_EQ("", T.getEnvironmentName());
+ EXPECT_EQ("", T.getArchName().str());
+ EXPECT_EQ("", T.getVendorName().str());
+ EXPECT_EQ("", T.getOSName().str());
+ EXPECT_EQ("", T.getEnvironmentName().str());
T = Triple("---");
- EXPECT_EQ("", T.getArchName());
- EXPECT_EQ("", T.getVendorName());
- EXPECT_EQ("", T.getOSName());
- EXPECT_EQ("", T.getEnvironmentName());
+ EXPECT_EQ("", T.getArchName().str());
+ EXPECT_EQ("", T.getVendorName().str());
+ EXPECT_EQ("", T.getOSName().str());
+ EXPECT_EQ("", T.getEnvironmentName().str());
T = Triple("----");
- EXPECT_EQ("", T.getArchName());
- EXPECT_EQ("", T.getVendorName());
- EXPECT_EQ("", T.getOSName());
- EXPECT_EQ("-", T.getEnvironmentName());
+ EXPECT_EQ("", T.getArchName().str());
+ EXPECT_EQ("", T.getVendorName().str());
+ EXPECT_EQ("", T.getOSName().str());
+ EXPECT_EQ("-", T.getEnvironmentName().str());
T = Triple("a");
- EXPECT_EQ("a", T.getArchName());
- EXPECT_EQ("", T.getVendorName());
- EXPECT_EQ("", T.getOSName());
- EXPECT_EQ("", T.getEnvironmentName());
+ EXPECT_EQ("a", T.getArchName().str());
+ EXPECT_EQ("", T.getVendorName().str());
+ EXPECT_EQ("", T.getOSName().str());
+ EXPECT_EQ("", T.getEnvironmentName().str());
T = Triple("a-b");
- EXPECT_EQ("a", T.getArchName());
- EXPECT_EQ("b", T.getVendorName());
- EXPECT_EQ("", T.getOSName());
- EXPECT_EQ("", T.getEnvironmentName());
+ EXPECT_EQ("a", T.getArchName().str());
+ EXPECT_EQ("b", T.getVendorName().str());
+ EXPECT_EQ("", T.getOSName().str());
+ EXPECT_EQ("", T.getEnvironmentName().str());
T = Triple("a-b-c");
- EXPECT_EQ("a", T.getArchName());
- EXPECT_EQ("b", T.getVendorName());
- EXPECT_EQ("c", T.getOSName());
- EXPECT_EQ("", T.getEnvironmentName());
+ EXPECT_EQ("a", T.getArchName().str());
+ EXPECT_EQ("b", T.getVendorName().str());
+ EXPECT_EQ("c", T.getOSName().str());
+ EXPECT_EQ("", T.getEnvironmentName().str());
T = Triple("a-b-c-d");
- EXPECT_EQ("a", T.getArchName());
- EXPECT_EQ("b", T.getVendorName());
- EXPECT_EQ("c", T.getOSName());
- EXPECT_EQ("d", T.getEnvironmentName());
+ EXPECT_EQ("a", T.getArchName().str());
+ EXPECT_EQ("b", T.getVendorName().str());
+ EXPECT_EQ("c", T.getOSName().str());
+ EXPECT_EQ("d", T.getEnvironmentName().str());
}
TEST(TripleTest, ParsedIDs) {