11#include "clang/Basic/CommentOptions.h"
12#include "llvm/ADT/StringRef.h"
13#include "gtest/gtest.h"
18TEST(SymbolDocumentation, UnhandledDocs) {
20 CommentOptions CommentOpts;
23 llvm::StringRef Documentation;
24 llvm::StringRef ExpectedRenderEscapedMarkdown;
25 llvm::StringRef ExpectedRenderMarkdown;
26 llvm::StringRef ExpectedRenderPlainText;
60 "foo \\*\\*bar\\*\\* baz",
66 "foo \\*\\*\\\\ref\\*\\* \\*bar\\* baz",
67 "foo **\\ref** *bar* baz",
68 "foo **\\ref** *bar* baz",
72 "foo \\*\\*@ref\\*\\* \\*bar\\* baz",
73 "foo **@ref** *bar* baz",
74 "foo **@ref** *bar* baz",
77 "\\brief this is a \\n\nbrief description",
83 "\\throw exception foo",
84 "\\*\\*\\\\throw\\*\\* \\*exception\\* foo",
85 "**\\throw** *exception* foo",
86 "**\\throw** *exception* foo",
89 R
"(\brief this is a brief description
111 "\\defgroup mygroup this is a group\nthis is not a group description",
112 "\\*\\*@defgroup\\*\\* `mygroup this is a group`\n\nthis is not a "
115 "**@defgroup** `mygroup this is a group`\n\nthis is not a group "
117 "**@defgroup** `mygroup this is a group`\n\nthis is not a group "
123verbatim block containing
130verbatim block containing
134\*\*@endverbatim\*\*)",
139verbatim block containing
147verbatim block containing
153 "@param foo this is a parameter\n@param bar this is another "
162@param foo this is a parameter
166\details these are details
170 R"(\*\*\\brief\*\* another brief?
172\*\*\\details\*\* these are details
176 R"(**\brief** another brief?
178**\details** these are details
182 R"(**\brief** another brief?
184**\details** these are details
186More description documentation)",
189 R"(<b>this is a bold text</b>
190normal text<i>this is an italic text</i>
191<code>this is a code block</code>)",
192 R"(<b>this is a bold text</b>
193normal text<i>this is an italic text</i>
194<code>this is a code block</code>)",
195 R"(<b>this is a bold text</b>
196normal text<i>this is an italic text</i>
197<code>this is a code block</code>)",
198 "<b>this is a bold text</b> normal text<i>this is an italic text</i> "
199 "<code>this is a code block</code>",
202 for (
const auto &C : Cases) {
203 markup::Document Doc;
208 EXPECT_EQ(Doc.asPlainText(), C.ExpectedRenderPlainText);
209 EXPECT_EQ(Doc.asMarkdown(), C.ExpectedRenderMarkdown);
210 EXPECT_EQ(Doc.asEscapedMarkdown(), C.ExpectedRenderEscapedMarkdown);
FIXME: Skip testing on windows temporarily due to the different escaping code mode.
TEST(BackgroundQueueTest, Priority)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//