dimanche 15 mars 2020

Separate Functions in Doxygen Documentation

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?

Aucun commentaire:

Enregistrer un commentaire