[PATCH] D65425: [clang-doc] Fix expected output in tests

Diego Astiazarán via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 29 16:38:13 PDT 2019


DiegoAstiazaran created this revision.
DiegoAstiazaran added a reviewer: juliehockett.
DiegoAstiazaran added a project: clang-tools-extra.

Removes conversion of html paths in output. These will always be in posix-style paths.


https://reviews.llvm.org/D65425

Files:
  clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp


Index: clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
===================================================================
--- clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
+++ clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
@@ -171,10 +171,6 @@
   ClangDocContext CDCtx = getClangDocContext();
   auto Err = G->generateDocForInfo(&I, Actual, CDCtx);
   assert(!Err);
-  SmallString<16> PathToFloat;
-  llvm::sys::path::native("path/to/float.html", PathToFloat);
-  SmallString<16> PathToInt;
-  llvm::sys::path::native("path/to/int.html", PathToInt);
   std::string Expected = R"raw(<!DOCTYPE html>
 <meta charset="utf-8"/>
 <title></title>
@@ -182,11 +178,9 @@
 <div>
   <h3>f</h3>
   <p>
-    <a href=")raw" + std::string(PathToFloat.str()) +
-                         R"raw(">float</a>
+    <a href="path/to/float.html">float</a>
      f(
-    <a href=")raw" + std::string(PathToInt.str()) +
-                         R"raw(">int</a>
+    <a href="path/to/int.html">int</a>
      P)
   </p>
   <p>Defined at line 10 of test.cpp</p>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65425.212248.patch
Type: text/x-patch
Size: 1074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190729/88a9eff3/attachment-0001.bin>


More information about the cfe-commits mailing list