llvm.org GIT mirror llvm / 0a965f8
Don't rely on an implicit std::tuple constructor. Apparently it doesn't have one, so using an initializer list doesn't work correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298018 91177308-0d34-0410-b5e6-96231b3b80d8 Zachary Turner 3 years ago
1 changed file(s) with 9 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
10531053 }
10541054
10551055 TEST(Support, NormalizePath) {
1056 using TestTuple = std::tuple;
1057 TestTuple Tests[] = {{"a", "a", "a"}, {"a/b", "a\\b", "a/b"},
1058 {"a\\b", "a\\b", "a/b"}, {"a\\\\b", "a\\\\b", "a\\\\b"},
1059 {"\\a", "\\a", "/a"}, {"a\\", "a\\", "a/"}};
1056 using TestTuple = std::tuple;
1057 std::vector Tests;
1058 Tests.emplace_back("a", "a", "a");
1059 Tests.emplace_back("a/b", "a\\b", "a/b");
1060 Tests.emplace_back("a\\b", "a\\b", "a/b");
1061 Tests.emplace_back("a\\\\b", "a\\\\b", "a\\\\b");
1062 Tests.emplace_back("\\a", "\\a", "/a");
1063 Tests.emplace_back("a\\", "a\\", "a/");
1064
10601065 for (auto &T : Tests) {
10611066 SmallString<64> Win = std::get<0>(T);
10621067 SmallString<64> Posix = Win;