diff --git a/clang-tools-extra/test/clang-doc/enum.cpp b/clang-tools-extra/test/clang-doc/enum.cpp index e9e912aebd8dbf..6aa8acd8d3ad28 100644 --- a/clang-tools-extra/test/clang-doc/enum.cpp +++ b/clang-tools-extra/test/clang-doc/enum.cpp @@ -9,105 +9,92 @@ // RUN: FileCheck %s < %t/Vehicles/index.md -check-prefix=MD-VEHICLES + +// MD-INDEX: # Global Namespace +// MD-INDEX: ## Enums +// MD-INDEX: | enum Color | +// MD-INDEX: -- +// MD-INDEX: | Red | +// MD-INDEX: | Green | +// MD-INDEX: | Blue | +// MD-INDEX: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp#[[@LINE+13]]* +// MD-INDEX: **brief** For specifying RGB colors + +// HTML-INDEX:
Defined at line [[@LINE+4]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp
/** * @brief For specifying RGB colors */ enum Color { - Red, // Red - Green, // Green - Blue // Blue + Red, ///< Red + Green, ///< Green + Blue ///< Blue }; + +// MD-INDEX: | enum Shapes | +// MD-INDEX: -- +// MD-INDEX: | Circle | +// MD-INDEX: | Rectangle | +// MD-INDEX: | Triangle | +// MD-INDEX: *Defined at A:\clion-llvm\llvm-project\clang-tools-extra\test\clang-doc\enum.cpp#[[@LINE+11]]* +// MD-INDEX: **brief** Shape Types + +// HTML-INDEX:Defined at line [[@LINE+4]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp
/** * @brief Shape Types */ enum Shapes { - // Circle + /// Circle Circle, - // Rectangle + /// Rectangle Rectangle, - // Triangle + /// Triangle Triangle }; -class Animals { -public: - /** - * @brief specify what animal the class is - */ - enum AnimalType { - Dog, // Man's best friend - Cat, // Man's other best friend - Iguana // A lizard - }; -}; - - -namespace Vehicles { - /** - * @brief specify type of car - */ - enum Car { - Sedan, // Sedan - SUV, // SUV - Pickup, // Pickup - Hatchback // Hatchback - }; -} - - -// HTML-INDEX:Defined at line {{.*}} of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp
-// HTML-INDEX:Defined at line {{.*}} of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp
- -// HTML-ANIMAL:Defined at line {{.*}} of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp
-// HTML-ANIMAL:Defined at line {{.*}} of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp
- -// HTML-VEHICLES:Defined at line {{.*}} of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp
- -// MD-INDEX: # Global Namespace -// MD-INDEX: ## Enums -// MD-INDEX: | enum Color | -// MD-INDEX: -- -// MD-INDEX: | Red | -// MD-INDEX: | Green | -// MD-INDEX: | Blue | -// MD-INDEX: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp#{{.*}}* -// MD-INDEX: **brief** For specifying RGB colors // MD-ANIMAL: # class Animals -// MD-ANIMAL: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp#{{.*}}* +// MD-ANIMAL: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp#[[@LINE+18]]* // MD-ANIMAL: ## Enums // MD-ANIMAL: | enum AnimalType | // MD-ANIMAL: -- // MD-ANIMAL: | Dog | // MD-ANIMAL: | Cat | // MD-ANIMAL: | Iguana | -// MD-ANIMAL: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp#{{.*}}* +// MD-ANIMAL: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp#[[@LINE+16]]* // MD-ANIMAL: **brief** specify what animal the class is +// HTML-ANIMAL:Defined at line [[@LINE+7]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp
+// HTML-ANIMAL:Defined at line [[@LINE+6]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp
+class Animals { +public: + /** + * @brief specify what animal the class is + */ + enum AnimalType { + Dog, /// Man's best friend + Cat, /// Man's other best friend + Iguana /// A lizard + }; +}; + + // MD-VEHICLES: # namespace Vehicles // MD-VEHICLES: ## Enums @@ -117,5 +104,25 @@ namespace Vehicles { // MD-VEHICLES: | SUV | // MD-VEHICLES: | Pickup | // MD-VEHICLES: | Hatchback | -// MD-VEHICLES: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp#{{.*}}* -// MD-VEHICLES: **brief** specify type of car \ No newline at end of file +// MD-VEHICLES: *Defined at {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp#[[@LINE+15]]* +// MD-VEHICLES: **brief** specify type of car + +// HTML-VEHICLES:Defined at line [[@LINE+5]] of file {{.*}}clang-tools-extra{{[\/]}}test{{[\/]}}clang-doc{{[\/]}}enum.cpp
+namespace Vehicles { + /** + * @brief specify type of car + */ + enum Car { + Sedan, /// Sedan + SUV, /// SUV + Pickup, /// Pickup + Hatchback /// Hatchback + }; +} \ No newline at end of file