0

For Unit testing purposes I mocked some cpp files in a separate directory but still using the origin header files.

In my special case the cpp files (origin and mocked) are holding the member documentation.

Sadly the cpp mocks aren't documented. I've set INCLUDE_PATH to the origin of the h-files (where are the origin cpp files are located as well).

In the mocked cpp files I used @ingroup/@addtogroup to proper arrange them inside the modules section.

MKFein
  • 79
  • 1
  • 7
  • Which version of doxygen are you using? In the "mocked" doxygen settings file are the include files just in the `INCLUDE_PATH` and not in the `INPUT`? Are the include files in the `INPUT` of the original case (maybe "hidden" through the fact you are using `RECURSIVE`). All some wild guesses as there is hardly information about the both, i.e "mocked" and original, doxygen settings (`please generate the difference to the standard version with `doxygen -x`). – albert Sep 01 '22 at 08:33
  • I've created an example and uploaded to https://github.com/MKHen/Example – MKFein Sep 02 '22 at 04:34
  • It looks like as I tried to describe in my original comment. When I change the `INPUT` setting in: `INPUT = ../mocks ../src/fuu.h` instead of INPUT = ../mocks` all is documented. – albert Sep 02 '22 at 08:22
  • I've updated the github repo with an better example. Now a second pair of files is in src (foo.*) which shall not occur in the documentation. Only the mocked class foo or respective files shall occur. – MKFein Sep 06 '22 at 04:39
  • Some suggestions: In that case you have to explicitly mention the files you want to have like in the `INPUT` settings or use the setting `FILE_PATTERNS` or use the settings like `EXCLUDE`, `EXCLUDE_PATTERNS`, `EXCLUDE_SYMBOLS` – albert Sep 06 '22 at 08:12
  • Maybe I want to have the same as in https://stackoverflow.com/questions/58824474/doxygen-how-to-document-header-files-found-with-preprocessor – MKFein Sep 07 '22 at 10:58
  • Maybe a bug: If header file is included with #include the debug output (-d preprocessor) is #include xxx.h: not found! skipping.... With #include "fuu.h" out is #include xxx.h: parsing... – MKFein Sep 07 '22 at 11:08
  • This has to do with the difference in the meaning between `` and `"inc_file.h", see also https://stackoverflow.com/questions/21593/what-is-the-difference-between-include-filename-and-include-filename – albert Sep 07 '22 at 13:04

0 Answers0