+TEST(TripleTest, NormalizeWindows) {
+ EXPECT_EQ("i686-pc-windows-msvc", Triple::normalize("i686-pc-win32"));
+ EXPECT_EQ("i686--windows-msvc", Triple::normalize("i686-win32"));
+ EXPECT_EQ("i686-pc-windows-gnu", Triple::normalize("i686-pc-mingw32"));
+ EXPECT_EQ("i686--windows-gnu", Triple::normalize("i686-mingw32"));
+ EXPECT_EQ("i686-pc-windows-gnu", Triple::normalize("i686-pc-mingw32-w64"));
+ EXPECT_EQ("i686--windows-gnu", Triple::normalize("i686-mingw32-w64"));
+ EXPECT_EQ("i686-pc-windows-cygnus", Triple::normalize("i686-pc-cygwin"));
+ EXPECT_EQ("i686--windows-cygnus", Triple::normalize("i686-cygwin"));
+
+ EXPECT_EQ("x86_64-pc-windows-msvc", Triple::normalize("x86_64-pc-win32"));
+ EXPECT_EQ("x86_64--windows-msvc", Triple::normalize("x86_64-win32"));
+ EXPECT_EQ("x86_64-pc-windows-gnu", Triple::normalize("x86_64-pc-mingw32"));
+ EXPECT_EQ("x86_64--windows-gnu", Triple::normalize("x86_64-mingw32"));
+ EXPECT_EQ("x86_64-pc-windows-gnu", Triple::normalize("x86_64-pc-mingw32-w64"));
+ EXPECT_EQ("x86_64--windows-gnu", Triple::normalize("x86_64-mingw32-w64"));
+
+ EXPECT_EQ("i686-pc-windows-elf", Triple::normalize("i686-pc-win32-elf"));
+ EXPECT_EQ("i686--windows-elf", Triple::normalize("i686-win32-elf"));
+ EXPECT_EQ("i686-pc-windows-macho", Triple::normalize("i686-pc-win32-macho"));
+ EXPECT_EQ("i686--windows-macho", Triple::normalize("i686-win32-macho"));
+
+ EXPECT_EQ("x86_64-pc-windows-elf", Triple::normalize("x86_64-pc-win32-elf"));
+ EXPECT_EQ("x86_64--windows-elf", Triple::normalize("x86_64-win32-elf"));
+ EXPECT_EQ("x86_64-pc-windows-macho", Triple::normalize("x86_64-pc-win32-macho"));
+ EXPECT_EQ("x86_64--windows-macho", Triple::normalize("x86_64-win32-macho"));
+
+ EXPECT_EQ("i686-pc-windows-itanium", Triple::normalize("i686-pc-windows-itanium"));
+}