[clang-tools-extra] [clang-doc] add enum test (PR #97679)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 15 15:02:36 PDT 2024


================
@@ -0,0 +1,121 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %s
+// RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s
+// RUN: FileCheck %s < %t/GlobalNamespace/index.html -check-prefix=HTML-INDEX
+// RUN: FileCheck %s < %t/GlobalNamespace/Animals.html -check-prefix=HTML-ANIMAL
+// RUN: FileCheck %s < %t/Vehicles/index.html -check-prefix=HTML-VEHICLES
+// RUN: FileCheck %s < %t/GlobalNamespace/index.md -check-prefix=MD-INDEX
+// RUN: FileCheck %s < %t/GlobalNamespace/Animals.md -check-prefix=MD-ANIMAL
+// RUN: FileCheck %s < %t/Vehicles/index.md -check-prefix=MD-VEHICLES
+
+
+/**
+ * @brief For specifying RGB colors
+ */
+enum Color {
+  Red, // Red
+  Green, // Green
+  Blue // Blue
+};
+
+/**
+ * @brief Shape Types
+ */
+enum Shapes {
----------------
PeterChou1 wrote:

I did not know that enum classes were a thing, I thought you meant enum embedded in a class, I've update the code

https://github.com/llvm/llvm-project/pull/97679


More information about the cfe-commits mailing list