diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/unittests/Basic/VirtualFileSystemTest.cpp | 2 | ||||
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 46 |
2 files changed, 26 insertions, 22 deletions
diff --git a/clang/unittests/Basic/VirtualFileSystemTest.cpp b/clang/unittests/Basic/VirtualFileSystemTest.cpp index 27d5e4cd052..6d05049c789 100644 --- a/clang/unittests/Basic/VirtualFileSystemTest.cpp +++ b/clang/unittests/Basic/VirtualFileSystemTest.cpp @@ -35,7 +35,7 @@ public: std::map<std::string, vfs::Status>::iterator I = FilesAndDirs.find(Path.str()); if (I == FilesAndDirs.end()) - return make_error_code(std::errc::no_such_file_or_directory); + return std::make_error_code(std::errc::no_such_file_or_directory); return I->second; } error_code openFileForRead(const Twine &Path, diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index d7aeb30fbf2..ecccc706eb9 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -8181,9 +8181,10 @@ TEST_F(FormatTest, ParsesConfigurationWithLanguages) { CHECK_PARSE("Language: Cpp\n" "IndentWidth: 12", IndentWidth, 12u); - EXPECT_EQ(ParseError::Unsuitable, parseConfiguration("Language: JavaScript\n" - "IndentWidth: 34", - &Style)); + EXPECT_EQ(parseConfiguration("Language: JavaScript\n" + "IndentWidth: 34", + &Style), + ParseError::Unsuitable); EXPECT_EQ(12u, Style.IndentWidth); CHECK_PARSE("IndentWidth: 56", IndentWidth, 56u); EXPECT_EQ(FormatStyle::LK_Cpp, Style.Language); @@ -8193,9 +8194,10 @@ TEST_F(FormatTest, ParsesConfigurationWithLanguages) { "IndentWidth: 12", IndentWidth, 12u); CHECK_PARSE("IndentWidth: 23", IndentWidth, 23u); - EXPECT_EQ(ParseError::Unsuitable, parseConfiguration("Language: Cpp\n" - "IndentWidth: 34", - &Style)); + EXPECT_EQ(parseConfiguration("Language: Cpp\n" + "IndentWidth: 34", + &Style), + ParseError::Unsuitable); EXPECT_EQ(23u, Style.IndentWidth); CHECK_PARSE("IndentWidth: 56", IndentWidth, 56u); EXPECT_EQ(FormatStyle::LK_JavaScript, Style.Language); @@ -8252,21 +8254,23 @@ TEST_F(FormatTest, ParsesConfigurationWithLanguages) { EXPECT_EQ(FormatStyle::BS_Stroustrup, Style.BreakBeforeBraces); EXPECT_EQ(789u, Style.TabWidth); - EXPECT_EQ(ParseError::Error, parseConfiguration("---\n" - "Language: JavaScript\n" - "IndentWidth: 56\n" - "---\n" - "IndentWidth: 78\n" - "...\n", - &Style)); - EXPECT_EQ(ParseError::Error, parseConfiguration("---\n" - "Language: JavaScript\n" - "IndentWidth: 56\n" - "---\n" - "Language: JavaScript\n" - "IndentWidth: 78\n" - "...\n", - &Style)); + EXPECT_EQ(parseConfiguration("---\n" + "Language: JavaScript\n" + "IndentWidth: 56\n" + "---\n" + "IndentWidth: 78\n" + "...\n", + &Style), + ParseError::Error); + EXPECT_EQ(parseConfiguration("---\n" + "Language: JavaScript\n" + "IndentWidth: 56\n" + "---\n" + "Language: JavaScript\n" + "IndentWidth: 78\n" + "...\n", + &Style), + ParseError::Error); EXPECT_EQ(FormatStyle::LK_Cpp, Style.Language); } |