[clang-tools-extra] 70ec841 - [clang-doc] Add basic e2e test (#93928)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 19 10:06:37 PDT 2024
Author: PeterChou1
Date: 2024-06-19T10:06:33-07:00
New Revision: 70ec8419dd722abeddf09e11f01500ae62334394
URL: https://github.com/llvm/llvm-project/commit/70ec8419dd722abeddf09e11f01500ae62334394
DIFF: https://github.com/llvm/llvm-project/commit/70ec8419dd722abeddf09e11f01500ae62334394.diff
LOG: [clang-doc] Add basic e2e test (#93928)
Adds e2e tests for clang-doc, which serves as useful test against
regression in the html output. It also serves as a helpful tool for code
review as we can see the diffs to clang-docs output
Closes https://github.com/llvm/llvm-project/issues/93925
Added:
clang-tools-extra/test/clang-doc/Inputs/basic-project/database_template.json
clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Calculator.h
clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Circle.h
clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Rectangle.h
clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Shape.h
clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Calculator.cpp
clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Circle.cpp
clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Rectangle.cpp
clang-tools-extra/test/clang-doc/basic-project.test
Modified:
clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
index 21b581fa6df2e..5517522d7967d 100644
--- a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+++ b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
@@ -299,8 +299,7 @@ Example usage for a project using a compile commands database:
llvm::outs() << "Generating assets for docs...\n";
Err = G->get()->createResources(CDCtx);
if (Err) {
- llvm::errs() << toString(std::move(Err)) << "\n";
- return 1;
+ llvm::outs() << "warning: " << toString(std::move(Err)) << "\n";
}
return 0;
diff --git a/clang-tools-extra/test/clang-doc/Inputs/basic-project/database_template.json b/clang-tools-extra/test/clang-doc/Inputs/basic-project/database_template.json
new file mode 100644
index 0000000000000..97afe931b0c10
--- /dev/null
+++ b/clang-tools-extra/test/clang-doc/Inputs/basic-project/database_template.json
@@ -0,0 +1,17 @@
+[
+ {
+ "directory": "$test_dir/Inputs/basic-project",
+ "command": "clang++ -o Calculator.o -I./include ./src/Calculator.cpp",
+ "file": "./src/Calculator.cpp"
+ },
+ {
+ "directory": "$test_dir/Inputs/basic-project",
+ "command": "clang++ -o Circle.o -I./include ./src/Circle.cpp",
+ "file": "./src/Circle.cpp"
+ },
+ {
+ "directory": "$test_dir/Inputs/basic-project",
+ "command": "clang++ -o Rectangle.o -I./include ./src/Rectangle.cpp",
+ "file": "./src/Rectangle.cpp"
+ }
+]
\ No newline at end of file
diff --git a/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Calculator.h b/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Calculator.h
new file mode 100644
index 0000000000000..6811834bc0159
--- /dev/null
+++ b/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Calculator.h
@@ -0,0 +1,46 @@
+#pragma once
+
+/**
+ * @brief A simple calculator class.
+ *
+ * Provides basic arithmetic operations.
+ */
+class Calculator {
+public:
+ /**
+ * @brief Adds two integers.
+ *
+ * @param a First integer.
+ * @param b Second integer.
+ * @return int The sum of a and b.
+ */
+ int add(int a, int b);
+
+ /**
+ * @brief Subtracts the second integer from the first.
+ *
+ * @param a First integer.
+ * @param b Second integer.
+ * @return int The result of a - b.
+ */
+ int subtract(int a, int b);
+
+ /**
+ * @brief Multiplies two integers.
+ *
+ * @param a First integer.
+ * @param b Second integer.
+ * @return int The product of a and b.
+ */
+ int multiply(int a, int b);
+
+ /**
+ * @brief Divides the first integer by the second.
+ *
+ * @param a First integer.
+ * @param b Second integer.
+ * @return double The result of a / b.
+ * @throw std::invalid_argument if b is zero.
+ */
+ double divide(int a, int b);
+};
\ No newline at end of file
diff --git a/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Circle.h b/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Circle.h
new file mode 100644
index 0000000000000..7bee3ffa92539
--- /dev/null
+++ b/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Circle.h
@@ -0,0 +1,35 @@
+#pragma once
+
+#include "Shape.h"
+
+/**
+ * @brief Circle class derived from Shape.
+ *
+ * Represents a circle with a given radius.
+ */
+class Circle : public Shape {
+public:
+ /**
+ * @brief Constructs a new Circle object.
+ *
+ * @param radius Radius of the circle.
+ */
+ Circle(double radius);
+
+ /**
+ * @brief Calculates the area of the circle.
+ *
+ * @return double The area of the circle.
+ */
+ double area() const override;
+
+ /**
+ * @brief Calculates the perimeter of the circle.
+ *
+ * @return double The perimeter of the circle.
+ */
+ double perimeter() const override;
+
+private:
+ double radius_; ///< Radius of the circle.
+};
diff --git a/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Rectangle.h b/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Rectangle.h
new file mode 100644
index 0000000000000..8c6223a4f6180
--- /dev/null
+++ b/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Rectangle.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "Shape.h"
+
+/**
+ * @brief Rectangle class derived from Shape.
+ *
+ * Represents a rectangle with a given width and height.
+ */
+class Rectangle : public Shape {
+public:
+ /**
+ * @brief Constructs a new Rectangle object.
+ *
+ * @param width Width of the rectangle.
+ * @param height Height of the rectangle.
+ */
+ Rectangle(double width, double height);
+
+ /**
+ * @brief Calculates the area of the rectangle.
+ *
+ * @return double The area of the rectangle.
+ */
+ double area() const override;
+
+ /**
+ * @brief Calculates the perimeter of the rectangle.
+ *
+ * @return double The perimeter of the rectangle.
+ */
+ double perimeter() const override;
+
+private:
+ double width_; ///< Width of the rectangle.
+ double height_; ///< Height of the rectangle.
+};
\ No newline at end of file
diff --git a/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Shape.h b/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Shape.h
new file mode 100644
index 0000000000000..e5c5d4c9e4412
--- /dev/null
+++ b/clang-tools-extra/test/clang-doc/Inputs/basic-project/include/Shape.h
@@ -0,0 +1,30 @@
+#pragma once
+
+/**
+ * @brief Abstract base class for shapes.
+ *
+ * Provides a common interface for
diff erent types of shapes.
+ */
+class Shape {
+public:
+ /**
+ * @brief Virtual destructor.
+ */
+ virtual ~Shape() {}
+
+ /**
+ * @brief Calculates the area of the shape.
+ *
+ * @return double The area of the shape.
+ */
+ virtual double area() const = 0;
+
+ /**
+ * @brief Calculates the perimeter of the shape.
+ *
+ * @return double The perimeter of the shape.
+ */
+ virtual double perimeter() const = 0;
+};
+
+
diff --git a/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Calculator.cpp b/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Calculator.cpp
new file mode 100644
index 0000000000000..df1778c3b9d55
--- /dev/null
+++ b/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Calculator.cpp
@@ -0,0 +1,21 @@
+#include "Calculator.h"
+#include <stdexcept>
+
+int Calculator::add(int a, int b) {
+ return a + b;
+}
+
+int Calculator::subtract(int a, int b) {
+ return a - b;
+}
+
+int Calculator::multiply(int a, int b) {
+ return a * b;
+}
+
+double Calculator::divide(int a, int b) {
+ if (b == 0) {
+ throw std::invalid_argument("Division by zero");
+ }
+ return static_cast<double>(a) / b;
+}
diff --git a/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Circle.cpp b/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Circle.cpp
new file mode 100644
index 0000000000000..823384a4d97e8
--- /dev/null
+++ b/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Circle.cpp
@@ -0,0 +1,11 @@
+#include "Circle.h"
+
+Circle::Circle(double radius) : radius_(radius) {}
+
+double Circle::area() const {
+ return 3.141 * radius_ * radius_;
+}
+
+double Circle::perimeter() const {
+ return 3.141 * radius_;
+}
\ No newline at end of file
diff --git a/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Rectangle.cpp b/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Rectangle.cpp
new file mode 100644
index 0000000000000..7ffc769157ebc
--- /dev/null
+++ b/clang-tools-extra/test/clang-doc/Inputs/basic-project/src/Rectangle.cpp
@@ -0,0 +1,12 @@
+#include "Rectangle.h"
+
+Rectangle::Rectangle(double width, double height)
+ : width_(width), height_(height) {}
+
+double Rectangle::area() const {
+ return width_ * height_;
+}
+
+double Rectangle::perimeter() const {
+ return 2 * (width_ + height_);
+}
\ No newline at end of file
diff --git a/clang-tools-extra/test/clang-doc/basic-project.test b/clang-tools-extra/test/clang-doc/basic-project.test
new file mode 100644
index 0000000000000..0898acaea3a33
--- /dev/null
+++ b/clang-tools-extra/test/clang-doc/basic-project.test
@@ -0,0 +1,358 @@
+// RUN: rm -rf %t && mkdir -p %t/docs %t/build
+// RUN: sed 's|$test_dir|%/S|g' %S/Inputs/basic-project/database_template.json > %t/build/compile_commands.json
+// RUN: clang-doc --format=html --output=%t/docs --executor=all-TUs %t/build/compile_commands.json
+// RUN: FileCheck %s -input-file=%t/docs/index_json.js -check-prefix=JSON-INDEX
+// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Shape.html -check-prefix=HTML-SHAPE
+// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Calculator.html -check-prefix=HTML-CALC
+// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Rectangle.html -check-prefix=HTML-RECTANGLE
+// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Circle.html -check-prefix=HTML-CIRCLE
+
+// JSON-INDEX: var JsonIndex = `
+// JSON-INDEX-NEXT: {
+// JSON-INDEX-NEXT: "USR": "{{([0-9A-F]{40})}}",
+// JSON-INDEX-NEXT: "Name": "",
+// JSON-INDEX-NEXT: "RefType": "default",
+// JSON-INDEX-NEXT: "Path": "",
+// JSON-INDEX-NEXT: "Children": [
+// JSON-INDEX-NEXT: {
+// JSON-INDEX-NEXT: "USR": "{{([0-9A-F]{40})}}",
+// JSON-INDEX-NEXT: "Name": "GlobalNamespace",
+// JSON-INDEX-NEXT: "RefType": "namespace",
+// JSON-INDEX-NEXT: "Path": "GlobalNamespace",
+// JSON-INDEX-NEXT: "Children": [
+// JSON-INDEX-NEXT: {
+// JSON-INDEX-NEXT: "USR": "{{([0-9A-F]{40})}}",
+// JSON-INDEX-NEXT: "Name": "Calculator",
+// JSON-INDEX-NEXT: "RefType": "record",
+// JSON-INDEX-NEXT: "Path": "GlobalNamespace",
+// JSON-INDEX-NEXT: "Children": []
+// JSON-INDEX-NEXT: },
+// JSON-INDEX-NEXT: {
+// JSON-INDEX-NEXT: "USR": "{{([0-9A-F]{40})}}",
+// JSON-INDEX-NEXT: "Name": "Circle",
+// JSON-INDEX-NEXT: "RefType": "record",
+// JSON-INDEX-NEXT: "Path": "GlobalNamespace",
+// JSON-INDEX-NEXT: "Children": []
+// JSON-INDEX-NEXT: },
+// JSON-INDEX-NEXT: {
+// JSON-INDEX-NEXT: "USR": "{{([0-9A-F]{40})}}",
+// JSON-INDEX-NEXT: "Name": "Rectangle",
+// JSON-INDEX-NEXT: "RefType": "record",
+// JSON-INDEX-NEXT: "Path": "GlobalNamespace",
+// JSON-INDEX-NEXT: "Children": []
+// JSON-INDEX-NEXT: },
+// JSON-INDEX-NEXT: {
+// JSON-INDEX-NEXT: "USR": "{{([0-9A-F]{40})}}",
+// JSON-INDEX-NEXT: "Name": "Shape",
+// JSON-INDEX-NEXT: "RefType": "record",
+// JSON-INDEX-NEXT: "Path": "GlobalNamespace",
+// JSON-INDEX-NEXT: "Children": []
+// JSON-INDEX-NEXT: }
+// JSON-INDEX-NEXT: ]
+// JSON-INDEX-NEXT: }
+// JSON-INDEX-NEXT: ]
+// JSON-INDEX-NEXT: }`;
+
+// HTML-SHAPE: <!DOCTYPE html>
+// HTML-SHAPE-NEXT: <meta charset="utf-8"/>
+// HTML-SHAPE-NEXT: <title>class Shape</title>
+// HTML-SHAPE-NEXT: <link rel="stylesheet" href="../clang-doc-default-stylesheet.css"/>
+// HTML-SHAPE-NEXT: <script src="../index.js"></script>
+// HTML-SHAPE-NEXT: <script src="../index_json.js"></script>
+// HTML-SHAPE-NEXT: <header id="project-title"></header>
+// HTML-SHAPE-NEXT: <main>
+// HTML-SHAPE-NEXT: <div id="sidebar-left" path="GlobalNamespace" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left"></div>
+// HTML-SHAPE-NEXT: <div id="main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
+// HTML-SHAPE-NEXT: <h1>class Shape</h1>
+// HTML-SHAPE-NEXT: <p>Defined at line 8 of file {{.*}}Shape.h</p>
+// HTML-SHAPE-NEXT: <div>
+// HTML-SHAPE-NEXT: <div>
+// HTML-SHAPE-NEXT: <p> Provides a common interface for
diff erent types of shapes.</p>
+// HTML-SHAPE-NEXT: </div>
+// HTML-SHAPE-NEXT: </div>
+// HTML-SHAPE-NEXT: <h2 id="Functions">Functions</h2>
+// HTML-SHAPE-NEXT: <div>
+// HTML-SHAPE-NEXT: <h3 id="{{([0-9A-F]{40})}}">~Shape</h3>
+// HTML-SHAPE-NEXT: <p>public void ~Shape()</p>
+// HTML-SHAPE-NEXT: <p>Defined at line 13 of file {{.*}}Shape.h</p>
+// HTML-SHAPE-NEXT: <div>
+// HTML-SHAPE-NEXT: <div></div>
+// HTML-SHAPE-NEXT: </div>
+// HTML-SHAPE-NEXT: <h3 id="{{([0-9A-F]{40})}}">area</h3>
+// HTML-SHAPE-NEXT: <p>public double area()</p>
+// HTML-SHAPE-NEXT: <div>
+// HTML-SHAPE-NEXT: <div></div>
+// HTML-SHAPE-NEXT: </div>
+// HTML-SHAPE-NEXT: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>
+// HTML-SHAPE-NEXT: <p>public double perimeter()</p>
+// HTML-SHAPE-NEXT: <div>
+// HTML-SHAPE-NEXT: <div></div>
+// HTML-SHAPE-NEXT: </div>
+// HTML-SHAPE-NEXT: </div>
+// HTML-SHAPE-NEXT: </div>
+// HTML-SHAPE-NEXT: <div id="sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
+// HTML-SHAPE-NEXT: <ol>
+// HTML-SHAPE-NEXT: <li>
+// HTML-SHAPE-NEXT: <span>
+// HTML-SHAPE-NEXT: <a href="#Functions">Functions</a>
+// HTML-SHAPE-NEXT: </span>
+// HTML-SHAPE-NEXT: <ul>
+// HTML-SHAPE-NEXT: <li>
+// HTML-SHAPE-NEXT: <span>
+// HTML-SHAPE-NEXT: <a href="#{{([0-9A-F]{40})}}">~Shape</a>
+// HTML-SHAPE-NEXT: </span>
+// HTML-SHAPE-NEXT: </li>
+// HTML-SHAPE-NEXT: <li>
+// HTML-SHAPE-NEXT: <span>
+// HTML-SHAPE-NEXT: <a href="#{{([0-9A-F]{40})}}">area</a>
+// HTML-SHAPE-NEXT: </span>
+// HTML-SHAPE-NEXT: </li>
+// HTML-SHAPE-NEXT: <li>
+// HTML-SHAPE-NEXT: <span>
+// HTML-SHAPE-NEXT: <a href="#{{([0-9A-F]{40})}}">perimeter</a>
+// HTML-SHAPE-NEXT: </span>
+// HTML-SHAPE-NEXT: </li>
+// HTML-SHAPE-NEXT: </ul>
+// HTML-SHAPE-NEXT: </li>
+// HTML-SHAPE-NEXT: </ol>
+// HTML-SHAPE-NEXT: </div>
+// HTML-SHAPE-NEXT: </main>
+
+// HTML-CALC: <!DOCTYPE html>
+// HTML-CALC-NEXT: <meta charset="utf-8"/>
+// HTML-CALC-NEXT: <title>class Calculator</title>
+// HTML-CALC-NEXT: <link rel="stylesheet" href="{{.*}}clang-doc-default-stylesheet.css"/>
+// HTML-CALC-NEXT: <script src="{{.*}}index.js"></script>
+// HTML-CALC-NEXT: <script src="{{.*}}index_json.js"></script>
+// HTML-CALC-NEXT: <header id="project-title"></header>
+// HTML-CALC-NEXT: <main>
+// HTML-CALC-NEXT: <div id="sidebar-left" path="GlobalNamespace" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left"></div>
+// HTML-CALC-NEXT: <div id="main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
+// HTML-CALC-NEXT: <h1>class Calculator</h1>
+// HTML-CALC-NEXT: <p>Defined at line 8 of file {{.*}}Calculator.h</p>
+// HTML-CALC-NEXT: <div>
+// HTML-CALC-NEXT: <div>
+// HTML-CALC-NEXT: <p> Provides basic arithmetic operations.</p>
+// HTML-CALC-NEXT: </div>
+// HTML-CALC-NEXT: </div>
+// HTML-CALC-NEXT: <h2 id="Functions">Functions</h2>
+// HTML-CALC-NEXT: <div>
+// HTML-CALC-NEXT: <h3 id="{{([0-9A-F]{40})}}">add</h3>
+// HTML-CALC-NEXT: <p>public int add(int a, int b)</p>
+// HTML-CALC-NEXT: <p>Defined at line 4 of file {{.*}}Calculator.cpp</p>
+// HTML-CALC-NEXT: <div>
+// HTML-CALC-NEXT: <div></div>
+// HTML-CALC-NEXT: </div>
+// HTML-CALC-NEXT: <h3 id="{{([0-9A-F]{40})}}">subtract</h3>
+// HTML-CALC-NEXT: <p>public int subtract(int a, int b)</p>
+// HTML-CALC-NEXT: <p>Defined at line 8 of file {{.*}}Calculator.cpp</p>
+// HTML-CALC-NEXT: <div>
+// HTML-CALC-NEXT: <div></div>
+// HTML-CALC-NEXT: </div>
+// HTML-CALC-NEXT: <h3 id="{{([0-9A-F]{40})}}">multiply</h3>
+// HTML-CALC-NEXT: <p>public int multiply(int a, int b)</p>
+// HTML-CALC-NEXT: <p>Defined at line 12 of file {{.*}}Calculator.cpp</p>
+// HTML-CALC-NEXT: <div>
+// HTML-CALC-NEXT: <div></div>
+// HTML-CALC-NEXT: </div>
+// HTML-CALC-NEXT: <h3 id="{{([0-9A-F]{40})}}">divide</h3>
+// HTML-CALC-NEXT: <p>public double divide(int a, int b)</p>
+// HTML-CALC-NEXT: <p>Defined at line 16 of file {{.*}}Calculator.cpp</p>
+// HTML-CALC-NEXT: <div>
+// HTML-CALC-NEXT: <div></div>
+// HTML-CALC-NEXT: </div>
+// HTML-CALC-NEXT: </div>
+// HTML-CALC-NEXT: </div>
+// HTML-CALC-NEXT: <div id="sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
+// HTML-CALC-NEXT: <ol>
+// HTML-CALC-NEXT: <li>
+// HTML-CALC-NEXT: <span>
+// HTML-CALC-NEXT: <a href="#Functions">Functions</a>
+// HTML-CALC-NEXT: </span>
+// HTML-CALC-NEXT: <ul>
+// HTML-CALC-NEXT: <li>
+// HTML-CALC-NEXT: <span>
+// HTML-CALC-NEXT: <a href="#{{([0-9A-F]{40})}}">add</a>
+// HTML-CALC-NEXT: </span>
+// HTML-CALC-NEXT: </li>
+// HTML-CALC-NEXT: <li>
+// HTML-CALC-NEXT: <span>
+// HTML-CALC-NEXT: <a href="#{{([0-9A-F]{40})}}">subtract</a>
+// HTML-CALC-NEXT: </span>
+// HTML-CALC-NEXT: </li>
+// HTML-CALC-NEXT: <li>
+// HTML-CALC-NEXT: <span>
+// HTML-CALC-NEXT: <a href="#{{([0-9A-F]{40})}}">multiply</a>
+// HTML-CALC-NEXT: </span>
+// HTML-CALC-NEXT: </li>
+// HTML-CALC-NEXT: <li>
+// HTML-CALC-NEXT: <span>
+// HTML-CALC-NEXT: <a href="#{{([0-9A-F]{40})}}">divide</a>
+// HTML-CALC-NEXT: </span>
+// HTML-CALC-NEXT: </li>
+// HTML-CALC-NEXT: </ul>
+// HTML-CALC-NEXT: </li>
+// HTML-CALC-NEXT: </ol>
+// HTML-CALC-NEXT: </div>
+// HTML-CALC-NEXT: </main>
+
+// HTML-RECTANGLE: <!DOCTYPE html>
+// HTML-RECTANGLE-NEXT: <meta charset="utf-8"/>
+// HTML-RECTANGLE-NEXT: <title>class Rectangle</title>
+// HTML-RECTANGLE-NEXT: <link rel="stylesheet" href="{{.*}}clang-doc-default-stylesheet.css"/>
+// HTML-RECTANGLE-NEXT: <script src="{{.*}}index.js"></script>
+// HTML-RECTANGLE-NEXT: <script src="{{.*}}index_json.js"></script>
+// HTML-RECTANGLE-NEXT: <header id="project-title"></header>
+// HTML-RECTANGLE-NEXT: <main>
+// HTML-RECTANGLE-NEXT: <div id="sidebar-left" path="GlobalNamespace" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left"></div>
+// HTML-RECTANGLE-NEXT: <div id="main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
+// HTML-RECTANGLE-NEXT: <h1>class Rectangle</h1>
+// HTML-RECTANGLE-NEXT: <p>Defined at line 10 of file {{.*}}Rectangle.h</p>
+// HTML-RECTANGLE-NEXT: <div>
+// HTML-RECTANGLE-NEXT: <div>
+// HTML-RECTANGLE-NEXT: <p> Represents a rectangle with a given width and height.</p>
+// HTML-RECTANGLE-NEXT: </div>
+// HTML-RECTANGLE-NEXT: </div>
+// HTML-RECTANGLE-NEXT: <p>
+// HTML-RECTANGLE-NEXT: Inherits from
+// HTML-RECTANGLE-NEXT: <a href="Shape.html">Shape</a>
+// HTML-RECTANGLE-NEXT: </p>
+// HTML-RECTANGLE-NEXT: <h2 id="Members">Members</h2>
+// HTML-RECTANGLE-NEXT: <ul>
+// HTML-RECTANGLE-NEXT: <li>private double width_</li>
+// HTML-RECTANGLE-NEXT: <li>private double height_</li>
+// HTML-RECTANGLE-NEXT: </ul>
+// HTML-RECTANGLE-NEXT: <h2 id="Functions">Functions</h2>
+// HTML-RECTANGLE-NEXT: <div>
+// HTML-RECTANGLE-NEXT: <h3 id="{{([0-9A-F]{40})}}">Rectangle</h3>
+// HTML-RECTANGLE-NEXT: <p>public void Rectangle(double width, double height)</p>
+// HTML-RECTANGLE-NEXT: <p>Defined at line 3 of file {{.*}}Rectangle.cpp</p>
+// HTML-RECTANGLE-NEXT: <div>
+// HTML-RECTANGLE-NEXT: <div></div>
+// HTML-RECTANGLE-NEXT: </div>
+// HTML-RECTANGLE-NEXT: <h3 id="{{([0-9A-F]{40})}}">area</h3>
+// HTML-RECTANGLE-NEXT: <p>public double area()</p>
+// HTML-RECTANGLE-NEXT: <p>Defined at line 6 of file {{.*}}Rectangle.cpp</p>
+// HTML-RECTANGLE-NEXT: <div>
+// HTML-RECTANGLE-NEXT: <div></div>
+// HTML-RECTANGLE-NEXT: </div>
+// HTML-RECTANGLE-NEXT: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>
+// HTML-RECTANGLE-NEXT: <p>public double perimeter()</p>
+// HTML-RECTANGLE-NEXT: <p>Defined at line 10 of file {{.*}}Rectangle.cpp</p>
+// HTML-RECTANGLE-NEXT: <div>
+// HTML-RECTANGLE-NEXT: <div></div>
+// HTML-RECTANGLE-NEXT: </div>
+// HTML-RECTANGLE-NEXT: </div>
+// HTML-RECTANGLE-NEXT: </div>
+// HTML-RECTANGLE-NEXT: <div id="sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
+// HTML-RECTANGLE-NEXT: <ol>
+// HTML-RECTANGLE-NEXT: <li>
+// HTML-RECTANGLE-NEXT: <span>
+// HTML-RECTANGLE-NEXT: <a href="#Members">Members</a>
+// HTML-RECTANGLE-NEXT: </span>
+// HTML-RECTANGLE-NEXT: </li>
+// HTML-RECTANGLE-NEXT: <li>
+// HTML-RECTANGLE-NEXT: <span>
+// HTML-RECTANGLE-NEXT: <a href="#Functions">Functions</a>
+// HTML-RECTANGLE-NEXT: </span>
+// HTML-RECTANGLE-NEXT: <ul>
+// HTML-RECTANGLE-NEXT: <li>
+// HTML-RECTANGLE-NEXT: <span>
+// HTML-RECTANGLE-NEXT: <a href="#{{([0-9A-F]{40})}}">Rectangle</a>
+// HTML-RECTANGLE-NEXT: </span>
+// HTML-RECTANGLE-NEXT: </li>
+// HTML-RECTANGLE-NEXT: <li>
+// HTML-RECTANGLE-NEXT: <span>
+// HTML-RECTANGLE-NEXT: <a href="#{{([0-9A-F]{40})}}">area</a>
+// HTML-RECTANGLE-NEXT: </span>
+// HTML-RECTANGLE-NEXT: </li>
+// HTML-RECTANGLE-NEXT: <li>
+// HTML-RECTANGLE-NEXT: <span>
+// HTML-RECTANGLE-NEXT: <a href="#{{([0-9A-F]{40})}}">perimeter</a>
+// HTML-RECTANGLE-NEXT: </span>
+// HTML-RECTANGLE-NEXT: </li>
+// HTML-RECTANGLE-NEXT: </ul>
+// HTML-RECTANGLE-NEXT: </li>
+// HTML-RECTANGLE-NEXT: </ol>
+// HTML-RECTANGLE-NEXT: </div>
+// HTML-RECTANGLE-NEXT: </main>
+
+// HTML-CIRCLE: <!DOCTYPE html>
+// HTML-CIRCLE-NEXT: <meta charset="utf-8"/>
+// HTML-CIRCLE-NEXT: <title>class Circle</title>
+// HTML-CIRCLE-NEXT: <link rel="stylesheet" href="{{.*}}clang-doc-default-stylesheet.css"/>
+// HTML-CIRCLE-NEXT: <script src="{{.*}}index.js"></script>
+// HTML-CIRCLE-NEXT: <script src="{{.*}}index_json.js"></script>
+// HTML-CIRCLE-NEXT: <header id="project-title"></header>
+// HTML-CIRCLE-NEXT: <main>
+// HTML-CIRCLE-NEXT: <div id="sidebar-left" path="GlobalNamespace" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left"></div>
+// HTML-CIRCLE-NEXT: <div id="main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
+// HTML-CIRCLE-NEXT: <h1>class Circle</h1>
+// HTML-CIRCLE-NEXT: <p>Defined at line 10 of file {{.*}}Circle.h</p>
+// HTML-CIRCLE-NEXT: <div>
+// HTML-CIRCLE-NEXT: <div>
+// HTML-CIRCLE-NEXT: <p> Represents a circle with a given radius.</p>
+// HTML-CIRCLE-NEXT: </div>
+// HTML-CIRCLE-NEXT: </div>
+// HTML-CIRCLE-NEXT: <p>
+// HTML-CIRCLE-NEXT: Inherits from
+// HTML-CIRCLE-NEXT: <a href="Shape.html">Shape</a>
+// HTML-CIRCLE-NEXT: </p>
+// HTML-CIRCLE-NEXT: <h2 id="Members">Members</h2>
+// HTML-CIRCLE-NEXT: <ul>
+// HTML-CIRCLE-NEXT: <li>private double radius_</li>
+// HTML-CIRCLE-NEXT: </ul>
+// HTML-CIRCLE-NEXT: <h2 id="Functions">Functions</h2>
+// HTML-CIRCLE-NEXT: <div>
+// HTML-CIRCLE-NEXT: <h3 id="{{([0-9A-F]{40})}}">Circle</h3>
+// HTML-CIRCLE-NEXT: <p>public void Circle(double radius)</p>
+// HTML-CIRCLE-NEXT: <p>Defined at line 3 of file {{.*}}Circle.cpp</p>
+// HTML-CIRCLE-NEXT: <div>
+// HTML-CIRCLE-NEXT: <div></div>
+// HTML-CIRCLE-NEXT: </div>
+// HTML-CIRCLE-NEXT: <h3 id="{{([0-9A-F]{40})}}">area</h3>
+// HTML-CIRCLE-NEXT: <p>public double area()</p>
+// HTML-CIRCLE-NEXT: <p>Defined at line 5 of file {{.*}}Circle.cpp</p>
+// HTML-CIRCLE-NEXT: <div>
+// HTML-CIRCLE-NEXT: <div></div>
+// HTML-CIRCLE-NEXT: </div>
+// HTML-CIRCLE-NEXT: <h3 id="{{([0-9A-F]{40})}}">perimeter</h3>
+// HTML-CIRCLE-NEXT: <p>public double perimeter()</p>
+// HTML-CIRCLE-NEXT: <p>Defined at line 9 of file {{.*}}Circle.cpp</p>
+// HTML-CIRCLE-NEXT: <div>
+// HTML-CIRCLE-NEXT: <div></div>
+// HTML-CIRCLE-NEXT: </div>
+// HTML-CIRCLE-NEXT: </div>
+// HTML-CIRCLE-NEXT: </div>
+// HTML-CIRCLE-NEXT: <div id="sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
+// HTML-CIRCLE-NEXT: <ol>
+// HTML-CIRCLE-NEXT: <li>
+// HTML-CIRCLE-NEXT: <span>
+// HTML-CIRCLE-NEXT: <a href="#Members">Members</a>
+// HTML-CIRCLE-NEXT: </span>
+// HTML-CIRCLE-NEXT: </li>
+// HTML-CIRCLE-NEXT: <li>
+// HTML-CIRCLE-NEXT: <span>
+// HTML-CIRCLE-NEXT: <a href="#Functions">Functions</a>
+// HTML-CIRCLE-NEXT: </span>
+// HTML-CIRCLE-NEXT: <ul>
+// HTML-CIRCLE-NEXT: <li>
+// HTML-CIRCLE-NEXT: <span>
+// HTML-CIRCLE-NEXT: <a href="#{{([0-9A-F]{40})}}">Circle</a>
+// HTML-CIRCLE-NEXT: </span>
+// HTML-CIRCLE-NEXT: </li>
+// HTML-CIRCLE-NEXT: <li>
+// HTML-CIRCLE-NEXT: <span>
+// HTML-CIRCLE-NEXT: <a href="#{{([0-9A-F]{40})}}">area</a>
+// HTML-CIRCLE-NEXT: </span>
+// HTML-CIRCLE-NEXT: </li>
+// HTML-CIRCLE-NEXT: <li>
+// HTML-CIRCLE-NEXT: <span>
+// HTML-CIRCLE-NEXT: <a href="#{{([0-9A-F]{40})}}">perimeter</a>
+// HTML-CIRCLE-NEXT: </span>
+// HTML-CIRCLE-NEXT: </li>
+// HTML-CIRCLE-NEXT: </ul>
+// HTML-CIRCLE-NEXT: </li>
+// HTML-CIRCLE-NEXT: </ol>
+// HTML-CIRCLE-NEXT: </div>
+// HTML-CIRCLE-NEXT: </main>
\ No newline at end of file
More information about the cfe-commits
mailing list