llvm.org GIT mirror llvm / 175106b
[mips] Add unitests to check parsing MIPS triples. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313160 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Atanasyan 2 years ago
1 changed file(s) with 30 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
306306 EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
307307 EXPECT_EQ(Triple::Haiku, T.getOS());
308308 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
309
310 T = Triple("mips-mti-linux-gnu");
311 EXPECT_EQ(Triple::mips, T.getArch());
312 EXPECT_EQ(Triple::MipsTechnologies, T.getVendor());
313 EXPECT_EQ(Triple::Linux, T.getOS());
314 EXPECT_EQ(Triple::GNU, T.getEnvironment());
315
316 T = Triple("mipsel-img-linux-gnu");
317 EXPECT_EQ(Triple::mipsel, T.getArch());
318 EXPECT_EQ(Triple::ImaginationTechnologies, T.getVendor());
319 EXPECT_EQ(Triple::Linux, T.getOS());
320 EXPECT_EQ(Triple::GNU, T.getEnvironment());
321
322 T = Triple("mips64-mti-linux-gnu");
323 EXPECT_EQ(Triple::mips64, T.getArch());
324 EXPECT_EQ(Triple::MipsTechnologies, T.getVendor());
325 EXPECT_EQ(Triple::Linux, T.getOS());
326 EXPECT_EQ(Triple::GNU, T.getEnvironment());
327
328 T = Triple("mips64el-img-linux-gnu");
329 EXPECT_EQ(Triple::mips64el, T.getArch());
330 EXPECT_EQ(Triple::ImaginationTechnologies, T.getVendor());
331 EXPECT_EQ(Triple::Linux, T.getOS());
332 EXPECT_EQ(Triple::GNU, T.getEnvironment());
333
334 T = Triple("mips64el-unknown-linux-gnuabi64");
335 EXPECT_EQ(Triple::mips64el, T.getArch());
336 EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
337 EXPECT_EQ(Triple::Linux, T.getOS());
338 EXPECT_EQ(Triple::GNUABI64, T.getEnvironment());
309339
310340 T = Triple("huh");
311341 EXPECT_EQ(Triple::UnknownArch, T.getArch());