Skip to content

Commit f0a280f

Browse files
committed
[clang-doc] Add Mustache output to comment in macros test
1 parent 61632d3 commit f0a280f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

clang-tools-extra/test/clang-doc/comments-in-macros.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.html --check-prefix=HTML-MYCLASS-LINE
1010
// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.html --check-prefix=HTML-MYCLASS
1111

12+
// RUN: clang-doc --format=mustache --doxygen --output=%t --executor=standalone %s
13+
// RUN: FileCheck %s < %t/html/GlobalNamespace/_ZTV7MyClass.html --check-prefix=MUSTACHE-MYCLASS-LINE
14+
// RUN: FileCheck %s < %t/html/GlobalNamespace/_ZTV7MyClass.html --check-prefix=MUSTACHE-MYCLASS
15+
1216
#define DECLARE_METHODS \
1317
/**
1418
* @brief Declare a method to calculate the sum of two numbers
@@ -25,11 +29,18 @@
2529
// HTML-MYCLASS: <div>brief</div>
2630
// HTML-MYCLASS: <p> Declare a method to calculate the sum of two numbers</p>
2731

32+
// MUSTACHE-MYCLASS: <pre><code class="language-cpp code-clang-doc">int Add (int a, int b)</code></pre>
33+
// MUSTACHE-MYCLASS: <div>
34+
// MUSTACHE-MYCLASS: <div>
35+
// MUSTACHE-MYCLASS: <p> Declare a method to calculate the sum of two numbers</p>
36+
// MUSTACHE-MYCLASS: </div>
37+
2838

2939
class MyClass {
3040
public:
31-
// MD-MYCLASS-LINE: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}comments-in-macros.cpp#[[@LINE+2]]*
32-
// HTML-MYCLASS-LINE: <p>Defined at line [[@LINE+1]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}comments-in-macros.cpp</p>
41+
// MD-MYCLASS-LINE: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}comments-in-macros.cpp#[[@LINE+3]]*
42+
// HTML-MYCLASS-LINE: <p>Defined at line [[@LINE+2]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}comments-in-macros.cpp</p>
43+
// MUSTACHE-MYCLASS-LINE: <p>Defined at line [[@LINE-4]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}comments-in-macros.cpp</p>
3344
DECLARE_METHODS
3445
};
3546

0 commit comments

Comments
 (0)