DiegoAstiazaran created this revision. DiegoAstiazaran added a reviewer: juliehockett. DiegoAstiazaran added a project: clang-tools-extra. juliehockett accepted this revision. juliehockett added a comment. This revision is now accepted and ready to land.
Make sure you update the other stylesheet patch, as well, before landing that. Tests on Windows were failing due to path separator differences. '/' was being used as separator in the expected output, paths in expected output are now changed to their native form before comparing them to the actual output. https://reviews.llvm.org/D65306 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 @@ -114,10 +114,15 @@ llvm::sys::path::native("../../../path/to/F.html", PathToF); SmallString<16> PathToInt; llvm::sys::path::native("../int.html", PathToInt); + SmallString<16> PathToSylesheet; + llvm::sys::path::native("../../../clang-doc-default-stylesheet.css", + PathToSylesheet); std::string Expected = R"raw(<!DOCTYPE html> <meta charset="utf-8"/> <title>class r</title> -<link rel="stylesheet" href="../../../clang-doc-default-stylesheet.css"/> +<link rel="stylesheet" href=")raw" + + std::string(PathToSylesheet.str()) + + R"raw("/> <div> <h1>class r</h1> <p>Defined at line 10 of test.cpp</p>
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 @@ -114,10 +114,15 @@ llvm::sys::path::native("../../../path/to/F.html", PathToF); SmallString<16> PathToInt; llvm::sys::path::native("../int.html", PathToInt); + SmallString<16> PathToSylesheet; + llvm::sys::path::native("../../../clang-doc-default-stylesheet.css", + PathToSylesheet); std::string Expected = R"raw(<!DOCTYPE html> <meta charset="utf-8"/> <title>class r</title> -<link rel="stylesheet" href="../../../clang-doc-default-stylesheet.css"/> +<link rel="stylesheet" href=")raw" + + std::string(PathToSylesheet.str()) + + R"raw("/> <div> <h1>class r</h1> <p>Defined at line 10 of test.cpp</p>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits