[clang-tools-extra] r288495 - Fix a buildbot failure in include-fixer.

Eric Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 2 03:23:07 PST 2016


Author: ioeric
Date: Fri Dec  2 05:23:07 2016
New Revision: 288495

URL: http://llvm.org/viewvc/llvm-project?rev=288495&view=rev
Log:
Fix a buildbot failure in include-fixer.

Modified:
    clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp

Modified: clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp?rev=288495&r1=288494&r2=288495&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp (original)
+++ clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp Fri Dec  2 05:23:07 2016
@@ -111,13 +111,10 @@ TEST(IncludeFixer, Typo) {
   EXPECT_EQ("#include <string>\nstd::string foo;\n",
             runIncludeFixer("std::string foo;\n"));
 
-  // FIXME: the current version of include-fixer does not get this test case
-  // right - header should be inserted before definition.
-  EXPECT_EQ(
-      "// comment\n#include \"foo.h\"\nstd::string foo;\n"
-      "#include \"dir/bar.h\"\n#include <string>\n",
-      runIncludeFixer("// comment\n#include \"foo.h\"\nstd::string foo;\n"
-                      "#include \"dir/bar.h\"\n"));
+  EXPECT_EQ("// comment\n#include \"foo.h\"\n#include <string>\n"
+            "std::string foo;\n#include \"dir/bar.h\"\n",
+            runIncludeFixer("// comment\n#include \"foo.h\"\nstd::string foo;\n"
+                            "#include \"dir/bar.h\"\n"));
 
   EXPECT_EQ("#include \"foo.h\"\n#include <string>\nstd::string foo;\n",
             runIncludeFixer("#include \"foo.h\"\nstd::string foo;\n"));




More information about the cfe-commits mailing list