Skip to content

Commit

Permalink
Add test case for function doc association
Browse files Browse the repository at this point in the history
This test case shows that the documentation entry for a static function
is not added a static function of the same name in another file even if
they belong to the same group.
  • Loading branch information
sebhub committed Mar 24, 2023
1 parent e56eb6b commit 0d38b54
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 0 deletions.
37 changes: 37 additions & 0 deletions testing/100/group___a.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,43 @@
<location file="100_a.c" line="21" column="1" bodyfile="100_a.c" bodystart="21" bodyend="31"/>
</memberdef>
</sectiondef>
<sectiondef kind="func">
<memberdef kind="function" id="group___a_1gabc536d5f4f9a56b7edcce32ed3a06140" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
<type>void</type>
<definition>static void f</definition>
<argsstring>(void)</argsstring>
<name>f</name>
<param>
<type>void</type>
</param>
<briefdescription>
<para>f() in <ref refid="100__a_8c" kindref="compound">100_a.c</ref>. </para>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="100_a.c" line="45" column="13" bodyfile="100_a.c" bodystart="45" bodyend="45"/>
</memberdef>
<memberdef kind="function" id="group___a_1ga5806fbe7d2114068e8085236b6f8098d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type>void</type>
<definition>void g</definition>
<argsstring>(void)</argsstring>
<name>g</name>
<param>
<type>void</type>
</param>
<briefdescription>
<para><ref refid="group___a_1ga5806fbe7d2114068e8085236b6f8098d" kindref="member">g()</ref> in <ref refid="100__a_8c" kindref="compound">100_a.c</ref>. </para>
</briefdescription>
<detaileddescription>
<para>More for <ref refid="group___a_1ga5806fbe7d2114068e8085236b6f8098d" kindref="member">g()</ref> in more_100_a.c from <ref refid="more__100__c_8c" kindref="compound">more_100_c.c</ref>. </para>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="100_a.c" line="52" column="6" bodyfile="100_a.c" bodystart="52" bodyend="52"/>
</memberdef>
</sectiondef>
<sectiondef kind="define">
<memberdef kind="define" id="group___a_1gaf316c33cc298530f245e8b55330e86b5" prot="public" static="no">
<name>D</name>
Expand Down
19 changes: 19 additions & 0 deletions testing/100/group___b.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,25 @@
<location file="more_100_b.c" line="14" column="1" bodyfile="more_100_b.c" bodystart="14" bodyend="24"/>
</memberdef>
</sectiondef>
<sectiondef kind="func">
<memberdef kind="function" id="group___b_1gabc536d5f4f9a56b7edcce32ed3a06140" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual">
<type>void</type>
<definition>static void f</definition>
<argsstring>(void)</argsstring>
<name>f</name>
<param>
<type>void</type>
</param>
<briefdescription>
<para>f() in <ref refid="more__100__b_8c" kindref="compound">more_100_b.c</ref>. </para>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="more_100_b.c" line="38" column="13" bodyfile="more_100_b.c" bodystart="38" bodyend="38"/>
</memberdef>
</sectiondef>
<sectiondef kind="define">
<memberdef kind="define" id="group___b_1gaf316c33cc298530f245e8b55330e86b5" prot="public" static="no">
<name>D</name>
Expand Down
14 changes: 14 additions & 0 deletions testing/100_a.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,17 @@ enum E {
* @ingroup A
*/
#define D 1

/**
* @brief f() in 100_a.c.
*
* @ingroup A
*/
static void f(void) {};

/**
* @brief g() in 100_a.c.
*
* @ingroup A
*/
void g(void) {};
7 changes: 7 additions & 0 deletions testing/more_100_b.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ enum E {
* @ingroup B
*/
#define D 1

/**
* @brief f() in more_100_b.c.
*
* @ingroup B
*/
static void f(void) {};
24 changes: 24 additions & 0 deletions testing/more_100_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,27 @@
*
* More for D in more_100_b.c from more_100_c.c.
*/

/**
* @fn static void f(void)
*
* @ingroup A
*
* More for f() in 100_a.c from more_100_c.c.
*/

/**
* @fn static void f(void)
*
* @ingroup B
*
* More for f() in more_100_b.c from more_100_c.c.
*/

/**
* @fn void g(void)
*
* @ingroup A
*
* More for g() in more_100_a.c from more_100_c.c.
*/

0 comments on commit 0d38b54

Please sign in to comment.