From a14d225ef4d3d8bd8ec9ec913246d1fb47d2edc1 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sun, 26 Jul 2009 03:31:47 +0000 Subject: 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 --- unittests/ADT/TripleTest.cpp | 72 ++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'unittests') 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) { -- cgit v1.1