1

I followed this tutorial and used the default Doxygen config-file: https://flcwiki.desy.de/How%20to%20document%20your%20code%20using%20doxygen

I have a tests.cpp file that looks like this:

/// \file
#include "gtest/gtest.h"
#include "./src/Factory.h"
#include "./src/Player.h"

/**
* Tests for the Player Class
*/

/**
* Tests the setter for Player Id.
*/

TEST(playerTest, setPIdTest) {

    Player p;
    p.setPId(2);
    EXPECT_EQ(2, p.getPId());
}

/**
* Tests for the Factory Class
*/

/**
* Tests the produce() method from  
*/

TEST(factoryTest, produceTest){

    Factory f;
    f.produce(15);
    f.produce(20);
    EXPECT_EQ(35, f.getProduced());
}

In my output, the 1st and 3rd comments are ignored so all tests appear in a list. The tests are documented well but there's no clear distinction between them. Is there any way I can make subsections and distinguish between the Player class tests & Factory class tests?

  • 2
    Ik think that you probably should have a look at the grouping possibilities of doxygen (doxygen.nl/manual/grouping.html) and the `\defgroup` command (doxygen.nl/manual/commands.html#cmddefgroup) and other grouping commands like `\ingroup`, `\addtogroup`, `\weakgroup` and maybe the `\name` command. – albert Mar 15 '20 at 17:31
  • ```\addtogroup``` kinda worked! @albert –  Mar 19 '20 at 12:03

0 Answers0