diff options
Diffstat (limited to 'testing')
137 files changed, 4086 insertions, 0 deletions
diff --git a/testing/001/indexpage.xml b/testing/001/indexpage.xml new file mode 100644 index 0000000..06d680b --- /dev/null +++ b/testing/001/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Text <emphasis>argument</emphasis> more text. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/001_a.dox b/testing/001_a.dox new file mode 100644 index 0000000..c37136b --- /dev/null +++ b/testing/001_a.dox @@ -0,0 +1,5 @@ +// objective: test the \a and \mainpage commands +// check: indexpage.xml +/** \mainpage + * Text \a argument more text. + */ diff --git a/testing/002/indexpage.xml b/testing/002/indexpage.xml new file mode 100644 index 0000000..1eba9d5 --- /dev/null +++ b/testing/002/indexpage.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para> + <indexentry> + <primaryie>keyword</primaryie> + <secondaryie/> + </indexentry> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/002_addindex.dox b/testing/002_addindex.dox new file mode 100644 index 0000000..b1c941f --- /dev/null +++ b/testing/002_addindex.dox @@ -0,0 +1,5 @@ +// objective: test \addindex command +// check: indexpage.xml +/** \mainpage + * \addindex keyword + */ diff --git a/testing/003/indexpage.xml b/testing/003/indexpage.xml new file mode 100644 index 0000000..a4f42e2 --- /dev/null +++ b/testing/003/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para><ref refid="index_1myanchor" kindref="member">See Anchor</ref> Some text. <anchor id="index_1myanchor"/>More text. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/003_anchor.dox b/testing/003_anchor.dox new file mode 100644 index 0000000..b28fc5e --- /dev/null +++ b/testing/003_anchor.dox @@ -0,0 +1,8 @@ +// objective: test \anchor command +// check: indexpage.xml +/** \mainpage + * \ref myanchor "See Anchor" + * Some text. + * \anchor myanchor + * More text. + */ diff --git a/testing/004/indexpage.xml b/testing/004/indexpage.xml new file mode 100644 index 0000000..3d0a713 --- /dev/null +++ b/testing/004/indexpage.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para><itemizedlist><listitem><para><computeroutput>AlignLeft</computeroutput> left alignment. </para></listitem><listitem><para><computeroutput>AlignCenter</computeroutput> center alignment. </para></listitem><listitem><para><computeroutput>AlignRight</computeroutput> right alignment</para></listitem></itemizedlist> +No other types of alignment are supported.</para> + <para><itemizedlist><listitem><para><computeroutput>AlignLeft</computeroutput> left alignment. </para></listitem><listitem><para><computeroutput>AlignCenter</computeroutput> center alignment. </para></listitem><listitem><para><computeroutput>AlignRight</computeroutput> right alignment</para></listitem></itemizedlist> +No other types of alignment are supported. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/004_arg.dox b/testing/004_arg.dox new file mode 100644 index 0000000..c6ea8e5 --- /dev/null +++ b/testing/004_arg.dox @@ -0,0 +1,15 @@ +// objective: test \arg and \li commands +// check: indexpage.xml +/** \mainpage + \arg \c AlignLeft left alignment. + \arg \c AlignCenter center alignment. + \arg \c AlignRight right alignment + + No other types of alignment are supported. + + \li \c AlignLeft left alignment. + \li \c AlignCenter center alignment. + \li \c AlignRight right alignment + + No other types of alignment are supported. +*/ diff --git a/testing/005/indexpage.xml b/testing/005/indexpage.xml new file mode 100644 index 0000000..5a2e6f9 --- /dev/null +++ b/testing/005/indexpage.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para> + <simplesect kind="attention"> + <para>Attention message. </para> + </simplesect> + <simplesect kind="note"> + <para>Something to note. </para> + </simplesect> + <simplesect kind="remark"> + <para>A remark. </para> + </simplesect> + <simplesect kind="warning"> + <para>A warning message. </para> + </simplesect> + <simplesect kind="par"> + <title/> + <para>Second paragraph </para> + </simplesect> + <simplesect kind="par"> + <title>User defined paragraph.</title> + <para>Contents of paragraph. </para> + </simplesect> + <simplesect kind="par"> + <title/> + <para>More text in a new paragraph. </para> + </simplesect> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/005_attention.dox b/testing/005_attention.dox new file mode 100644 index 0000000..c3c390e --- /dev/null +++ b/testing/005_attention.dox @@ -0,0 +1,14 @@ +// objective: test \attention, \not, \remark, \warning, and \par commands +// check: indexpage.xml +/** \mainpage + * \attention Attention message. + * \note Something to note. + * \remark A remark. + * \warning A warning message. + * \par + * Second paragraph + * \par User defined paragraph. + * Contents of paragraph. + * \par + * More text in a new paragraph. + */ diff --git a/testing/006/indexpage.xml b/testing/006/indexpage.xml new file mode 100644 index 0000000..edb2904 --- /dev/null +++ b/testing/006/indexpage.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para> + <simplesect kind="author"> + <para>John Doe </para> + <simplesectsep/> + <para>Jane Doe </para> + </simplesect> + <simplesect kind="authors"> + <para>David, Steven </para> + </simplesect> + <simplesect kind="since"> + <para>version 1.2 </para> + </simplesect> + <simplesect kind="version"> + <para>1.8-beta2 </para> + </simplesect> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/006_author.dox b/testing/006_author.dox new file mode 100644 index 0000000..ba07c1e --- /dev/null +++ b/testing/006_author.dox @@ -0,0 +1,9 @@ +// objective: test the \author, \since, and \version command +// check: indexpage.xml +/** \mainpage + * \author John Doe + * \author Jane Doe + * \authors David, Steven + * \since version 1.2 + * \version 1.8-beta2 + */ diff --git a/testing/007/indexpage.xml b/testing/007/indexpage.xml new file mode 100644 index 0000000..9b22813 --- /dev/null +++ b/testing/007/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Text <bold>bold</bold> normal text. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/007_b.dox b/testing/007_b.dox new file mode 100644 index 0000000..887c19f --- /dev/null +++ b/testing/007_b.dox @@ -0,0 +1,5 @@ +// objective: test the \b command +// check: indexpage.xml +/** \mainpage + * Text \b bold normal text. + */ diff --git a/testing/008/008__brief_8c.xml b/testing/008/008__brief_8c.xml new file mode 100644 index 0000000..3416798 --- /dev/null +++ b/testing/008/008__brief_8c.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="008__brief_8c" kind="file"> + <compoundname>008_brief.c</compoundname> + <briefdescription> + <para>A brief description. </para> + </briefdescription> + <detaileddescription> + <para>More details. </para> + </detaileddescription> + <location file="008_brief.c"/> + </compounddef> +</doxygen> diff --git a/testing/008_brief.c b/testing/008_brief.c new file mode 100644 index 0000000..773eaf1 --- /dev/null +++ b/testing/008_brief.c @@ -0,0 +1,7 @@ +// objective: test \brief and \file command +// check: 008__brief_8c.xml +/** \file + * \brief A brief description. + * + * More details. + */ diff --git a/testing/009/bug.xml b/testing/009/bug.xml new file mode 100644 index 0000000..1d80134 --- /dev/null +++ b/testing/009/bug.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="bug" kind="page"> + <compoundname>bug</compoundname> + <title>Bug List</title> + <detaileddescription> + <para> + <variablelist> + <varlistentry> + <term><anchor id="bug_1_bug000001"/>Class <ref refid="class_bug" kindref="compound">Bug</ref></term> + </varlistentry> + <listitem> + <para>Class bug. </para> + </listitem> + <varlistentry> + <term><anchor id="bug_1_bug000002"/>Member <ref refid="class_bug_1a1f720954dd97cd1203e80501a6eae74c" kindref="member">Bug::foo</ref> ()</term> + </varlistentry> + <listitem> + <para>Function bug<itemizedlist><listitem><para>list item 1 in bug</para></listitem><listitem><para>list item 2 in bug</para></listitem></itemizedlist> +</para> + </listitem> + </variablelist> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/009/class_bug.xml b/testing/009/class_bug.xml new file mode 100644 index 0000000..75a3fa1 --- /dev/null +++ b/testing/009/class_bug.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_bug" kind="class" prot="public"> + <compoundname>Bug</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_bug_1a1f720954dd97cd1203e80501a6eae74c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Bug::foo</definition> + <argsstring>()</argsstring> + <name>foo</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Description <xrefsect id="bug_1_bug000002"><xreftitle>Bug</xreftitle><xrefdescription><para>Function bug<itemizedlist><listitem><para>list item 1 in bug</para></listitem><listitem><para>list item 2 in bug</para></listitem></itemizedlist> +</para></xrefdescription></xrefsect></para> + <para>More text. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="009_bug.cpp" line="25" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para> + <xrefsect id="bug_1_bug000001"> + <xreftitle>Bug</xreftitle> + <xrefdescription> + <para>Class bug. </para> + </xrefdescription> + </xrefsect> + </para> + </detaileddescription> + <location file="009_bug.cpp" bodystart="15" bodyend="26"/> + <listofallmembers> + <member refid="class_bug_1a1f720954dd97cd1203e80501a6eae74c" prot="public" virt="non-virtual"> + <scope>Bug</scope> + <name>foo</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/009/class_deprecated.xml b/testing/009/class_deprecated.xml new file mode 100644 index 0000000..2420466 --- /dev/null +++ b/testing/009/class_deprecated.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_deprecated" kind="class" prot="public"> + <compoundname>Deprecated</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_deprecated_1a1d5f6803e72c625727e7083d1722dbf9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Deprecated::deprecated</definition> + <argsstring>()</argsstring> + <name>deprecated</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Do deprecated things. <xrefsect id="deprecated_1_deprecated000002"><xreftitle>Deprecated</xreftitle><xrefdescription><para>No not use this function anymore. </para></xrefdescription></xrefsect></para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="009_bug.cpp" line="35" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para> + <xrefsect id="deprecated_1_deprecated000001"> + <xreftitle>Deprecated</xreftitle> + <xrefdescription> + <para>This class is deprecated </para> + </xrefdescription> + </xrefsect> + </para> + </detaileddescription> + <location file="009_bug.cpp" bodystart="29" bodyend="36"/> + <listofallmembers> + <member refid="class_deprecated_1a1d5f6803e72c625727e7083d1722dbf9" prot="public" virt="non-virtual"> + <scope>Deprecated</scope> + <name>deprecated</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/009/class_reminder.xml b/testing/009/class_reminder.xml new file mode 100644 index 0000000..2f3c641 --- /dev/null +++ b/testing/009/class_reminder.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_reminder" kind="class" prot="public"> + <compoundname>Reminder</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_reminder_1a173b5218bb11287b0e86a550d9f0728d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Reminder::reminder</definition> + <argsstring>()</argsstring> + <name>reminder</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para> + <xrefsect id="reminders_1_reminders000002"> + <xreftitle>Reminder</xreftitle> + <xrefdescription> + <para>Need to rework this before the next release. </para> + </xrefdescription> + </xrefsect> + </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="009_bug.cpp" line="59" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para> + <xrefsect id="reminders_1_reminders000001"> + <xreftitle>Reminder</xreftitle> + <xrefdescription> + <para>A reminder </para> + </xrefdescription> + </xrefsect> + </para> + </detaileddescription> + <location file="009_bug.cpp" bodystart="55" bodyend="60"/> + <listofallmembers> + <member refid="class_reminder_1a173b5218bb11287b0e86a550d9f0728d" prot="public" virt="non-virtual"> + <scope>Reminder</scope> + <name>reminder</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/009/class_test.xml b/testing/009/class_test.xml new file mode 100644 index 0000000..505617f --- /dev/null +++ b/testing/009/class_test.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_test" kind="class" prot="public"> + <compoundname>Test</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_test_1a9fc54b716f326514a4c5f434137f4fc0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Test::test</definition> + <argsstring>()</argsstring> + <name>test</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para> + <xrefsect id="test_1_test000002"> + <xreftitle>Test</xreftitle> + <xrefdescription> + <para>more things to test. </para> + </xrefdescription> + </xrefsect> + </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="009_bug.cpp" line="51" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para> + <xrefsect id="test_1_test000001"> + <xreftitle>Test</xreftitle> + <xrefdescription> + <para>This is part of testing </para> + </xrefdescription> + </xrefsect> + </para> + </detaileddescription> + <location file="009_bug.cpp" bodystart="47" bodyend="52"/> + <listofallmembers> + <member refid="class_test_1a9fc54b716f326514a4c5f434137f4fc0" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>test</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/009/class_todo.xml b/testing/009/class_todo.xml new file mode 100644 index 0000000..0ac555f --- /dev/null +++ b/testing/009/class_todo.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_todo" kind="class" prot="public"> + <compoundname>Todo</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_todo_1a9e70ec9176ac4c1b20e011b4daddc9d8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Todo::todo</definition> + <argsstring>()</argsstring> + <name>todo</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para> + <xrefsect id="todo_1_todo000002"> + <xreftitle>Todo</xreftitle> + <xrefdescription> + <para>more things to do here </para> + </xrefdescription> + </xrefsect> + </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="009_bug.cpp" line="43" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para> + <xrefsect id="todo_1_todo000001"> + <xreftitle>Todo</xreftitle> + <xrefdescription> + <para>This still needs to be done. </para> + </xrefdescription> + </xrefsect> + </para> + </detaileddescription> + <location file="009_bug.cpp" bodystart="39" bodyend="44"/> + <listofallmembers> + <member refid="class_todo_1a9e70ec9176ac4c1b20e011b4daddc9d8" prot="public" virt="non-virtual"> + <scope>Todo</scope> + <name>todo</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/009/deprecated.xml b/testing/009/deprecated.xml new file mode 100644 index 0000000..0613b25 --- /dev/null +++ b/testing/009/deprecated.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="deprecated" kind="page"> + <compoundname>deprecated</compoundname> + <title>Deprecated List</title> + <detaileddescription> + <para> + <variablelist> + <varlistentry> + <term><anchor id="deprecated_1_deprecated000001"/>Class <ref refid="class_deprecated" kindref="compound">Deprecated</ref></term> + </varlistentry> + <listitem> + <para>This class is deprecated </para> + </listitem> + <varlistentry> + <term><anchor id="deprecated_1_deprecated000002"/>Member <ref refid="class_deprecated_1a1d5f6803e72c625727e7083d1722dbf9" kindref="member">Deprecated::deprecated</ref> ()</term> + </varlistentry> + <listitem> + <para>No not use this function anymore. </para> + </listitem> + </variablelist> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/009/reminders.xml b/testing/009/reminders.xml new file mode 100644 index 0000000..e9983ed --- /dev/null +++ b/testing/009/reminders.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="reminders" kind="page"> + <compoundname>reminders</compoundname> + <title>Reminders</title> + <detaileddescription> + <para> + <variablelist> + <varlistentry> + <term><anchor id="reminders_1_reminders000001"/>Class <ref refid="class_reminder" kindref="compound">Reminder</ref></term> + </varlistentry> + <listitem> + <para>A reminder </para> + </listitem> + <varlistentry> + <term><anchor id="reminders_1_reminders000002"/>Member <ref refid="class_reminder_1a173b5218bb11287b0e86a550d9f0728d" kindref="member">Reminder::reminder</ref> ()</term> + </varlistentry> + <listitem> + <para>Need to rework this before the next release. </para> + </listitem> + </variablelist> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/009/test.xml b/testing/009/test.xml new file mode 100644 index 0000000..14395bf --- /dev/null +++ b/testing/009/test.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="test" kind="page"> + <compoundname>test</compoundname> + <title>Test List</title> + <detaileddescription> + <para> + <variablelist> + <varlistentry> + <term><anchor id="test_1_test000001"/>Class <ref refid="class_test" kindref="compound">Test</ref></term> + </varlistentry> + <listitem> + <para>This is part of testing </para> + </listitem> + <varlistentry> + <term><anchor id="test_1_test000002"/>Member <ref refid="class_test_1a9fc54b716f326514a4c5f434137f4fc0" kindref="member">Test::test</ref> ()</term> + </varlistentry> + <listitem> + <para>more things to test. </para> + </listitem> + </variablelist> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/009/todo.xml b/testing/009/todo.xml new file mode 100644 index 0000000..4b731e3 --- /dev/null +++ b/testing/009/todo.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="todo" kind="page"> + <compoundname>todo</compoundname> + <title>Todo List</title> + <detaileddescription> + <para> + <variablelist> + <varlistentry> + <term><anchor id="todo_1_todo000001"/>Class <ref refid="class_todo" kindref="compound">Todo</ref></term> + </varlistentry> + <listitem> + <para>This still needs to be done. </para> + </listitem> + <varlistentry> + <term><anchor id="todo_1_todo000002"/>Member <ref refid="class_todo_1a9e70ec9176ac4c1b20e011b4daddc9d8" kindref="member">Todo::todo</ref> ()</term> + </varlistentry> + <listitem> + <para>more things to do here </para> + </listitem> + </variablelist> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/009_bug.cpp b/testing/009_bug.cpp new file mode 100644 index 0000000..285c77e --- /dev/null +++ b/testing/009_bug.cpp @@ -0,0 +1,62 @@ +// objective: test the \bug, \deprecated, \todo, \test, and \xrefitem commands +// check: class_bug.xml +// check: class_deprecated.xml +// check: class_todo.xml +// check: class_test.xml +// check: class_reminder.xml +// check: bug.xml +// check: deprecated.xml +// check: todo.xml +// check: test.xml +// check: reminders.xml +// config: ALIASES = "reminder=\xrefitem reminders \"Reminder\" \"Reminders\"" + +/** \bug Class bug. */ +class Bug +{ + public: + /** Description + * \bug Function bug + * - list item 1 in bug + * - list item 2 in bug + * + * More text. + */ + void foo(); +}; + +/** \deprecated This class is deprecated */ +class Deprecated +{ + public: + /** Do deprecated things. + * \deprecated No not use this function anymore. + */ + void deprecated(); +}; + +/** \todo This still needs to be done. */ +class Todo +{ + public: + /** \todo more things to do here */ + void todo(); +}; + +/** \test This is part of testing */ +class Test +{ + public: + /** \test more things to test. */ + void test(); +}; + +/** \reminder A reminder */ +class Reminder +{ + public: + /** \reminder Need to rework this before the next release. */ + void reminder(); +}; + + diff --git a/testing/010/indexpage.xml b/testing/010/indexpage.xml new file mode 100644 index 0000000..61f515c --- /dev/null +++ b/testing/010/indexpage.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Text <computeroutput>code</computeroutput> normal text.</para> + <para>Text <computeroutput>code</computeroutput> normal text. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/010_c.dox b/testing/010_c.dox new file mode 100644 index 0000000..a26b5fd --- /dev/null +++ b/testing/010_c.dox @@ -0,0 +1,7 @@ +// objective: test the \c and \p commands +// check: indexpage.xml +/** \mainpage + * Text \c code normal text. + * + * Text \p code normal text. + */ diff --git a/testing/011/category_integer_07_arithmetic_08.xml b/testing/011/category_integer_07_arithmetic_08.xml new file mode 100644 index 0000000..9d64d98 --- /dev/null +++ b/testing/011/category_integer_07_arithmetic_08.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="category_integer_07_arithmetic_08" kind="category" prot="public"> + <compoundname>Integer(Arithmetic)</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="category_integer_07_arithmetic_08_1a12f411c5872ba3bafb8ea7dd1826cf2a" prot="public" static="no" const="no" explicit="no" inline="no" virt="virtual"> + <type>id</type> + <definition>id Integer(Arithmetic)::add:</definition> + <argsstring>(Integer *addend)</argsstring> + <name>add:</name> + <param> + <type><ref refid="interface_integer" kindref="compound">Integer</ref> *</type> + <declname>addend</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>add operation </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="011_category.m" line="8" column="1"/> + </memberdef> + <memberdef kind="function" id="category_integer_07_arithmetic_08_1ae4ff0b0c62b6809e8f5bcee9baa6e521" prot="public" static="no" const="no" explicit="no" inline="no" virt="virtual"> + <type>id</type> + <definition>id Integer(Arithmetic)::sub:</definition> + <argsstring>(Integer *subtrahend)</argsstring> + <name>sub:</name> + <param> + <type><ref refid="interface_integer" kindref="compound">Integer</ref> *</type> + <declname>subtrahend</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>substract operation </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="011_category.m" line="8" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A category </para> + </detaileddescription> + <location file="011_category.m" bodystart="17" bodyend="-1"/> + <listofallmembers> + <member refid="category_integer_07_arithmetic_08_1a12f411c5872ba3bafb8ea7dd1826cf2a" prot="public" virt="virtual"> + <scope>Integer(Arithmetic)</scope> + <name>add:</name> + </member> + <member refid="category_integer_07_arithmetic_08_1ae4ff0b0c62b6809e8f5bcee9baa6e521" prot="public" virt="virtual"> + <scope>Integer(Arithmetic)</scope> + <name>sub:</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/011/interface_integer.xml b/testing/011/interface_integer.xml new file mode 100644 index 0000000..bdbcad2 --- /dev/null +++ b/testing/011/interface_integer.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="interface_integer" kind="class" prot="public"> + <compoundname>Integer</compoundname> + <basecompoundref prot="public" virt="non-virtual">Object</basecompoundref> + <sectiondef kind="protected-attrib"> + <memberdef kind="variable" id="interface_integer_1a35e89216966d8179a1b77f14b8211fda" prot="protected" static="no" mutable="no"> + <type>int</type> + <definition>int Integer::integer</definition> + <argsstring/> + <name>integer</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>data member </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="011_category.m" bodystart="8" bodyend="-1"/> + </memberdef> + </sectiondef> + <sectiondef kind="public-func"> + <memberdef kind="function" id="interface_integer_1a7b55035e1b0e8e7d4c8587f54a760819" prot="public" static="no" const="no" explicit="no" inline="no" virt="virtual"> + <type>int</type> + <definition>int Integer::integer</definition> + <argsstring>()</argsstring> + <name>integer</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>getter </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="011_category.m" line="8" column="1"/> + </memberdef> + <memberdef kind="function" id="interface_integer_1ad2f47761103b2442ff7b3fbfe33ec6c9" prot="public" static="no" const="no" explicit="no" inline="no" virt="virtual"> + <type>id</type> + <definition>id Integer::integer:</definition> + <argsstring>(int _integer)</argsstring> + <name>integer:</name> + <param> + <type>int</type> + <declname>_integer</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>setter </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="011_category.m" line="8" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>An interface </para> + </detaileddescription> + <inheritancegraph> + <node id="1"> + <label>Object</label> + </node> + <node id="0"> + <label>Integer</label> + <link refid="interface_integer"/> + <childnode refid="1" relation="public-inheritance"> + </childnode> + </node> + </inheritancegraph> + <collaborationgraph> + <node id="3"> + <label>Object</label> + </node> + <node id="2"> + <label>Integer</label> + <link refid="interface_integer"/> + <childnode refid="3" relation="public-inheritance"> + </childnode> + </node> + </collaborationgraph> + <location file="011_category.m" bodystart="6" bodyend="-1"/> + <listofallmembers> + <member refid="interface_integer_1a35e89216966d8179a1b77f14b8211fda" prot="protected" virt="non-virtual"> + <scope>Integer</scope> + <name>integer</name> + </member> + <member refid="interface_integer_1a7b55035e1b0e8e7d4c8587f54a760819" prot="public" virt="virtual"> + <scope>Integer</scope> + <name>integer</name> + </member> + <member refid="interface_integer_1ad2f47761103b2442ff7b3fbfe33ec6c9" prot="public" virt="virtual"> + <scope>Integer</scope> + <name>integer:</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/011_category.m b/testing/011_category.m new file mode 100644 index 0000000..8cb4d3a --- /dev/null +++ b/testing/011_category.m @@ -0,0 +1,30 @@ +// objective: test the \interface and \category command +// check: category_integer_07_arithmetic_08.xml +// check: interface_integer.xml +# import <objc/Object.h> + +@interface Integer : Object { + /** data member */ + int integer; +} + +/** getter */ +- (int) integer; +/** setter */ +- (id) integer: (int) _integer; +@end + +@interface Integer (Arithmetic) +/** add operation */ +- (id) add: (Integer *) addend; +/** substract operation */ +- (id) sub: (Integer *) subtrahend; +@end + +/** \interface Integer + * An interface + */ + +/** \category Integer(Arithmetic) + * A category + */ diff --git a/testing/012/citelist.xml b/testing/012/citelist.xml new file mode 100644 index 0000000..29e7dcd --- /dev/null +++ b/testing/012/citelist.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="citelist" kind="page"> + <compoundname>citelist</compoundname> + <title>Bibliographic References</title> + <detaileddescription> + <para> + <variablelist> + <varlistentry> + <term><anchor id="_1CITEREF_knuth79"/>[1]</term> + </varlistentry> + <listitem> + <para>Donald<nonbreakablespace/>E. Knuth. <emphasis>Tex and Metafont, New Directions in Typesetting</emphasis>. American Mathematical Society and Digital Press, Stanford, 1979.</para> + <para/> + </listitem> + </variablelist> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/012/indexpage.xml b/testing/012/indexpage.xml new file mode 100644 index 0000000..926b53b --- /dev/null +++ b/testing/012/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">[1]</ref> for more info. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/012_cite.dox b/testing/012_cite.dox new file mode 100644 index 0000000..9bcb2c5 --- /dev/null +++ b/testing/012_cite.dox @@ -0,0 +1,7 @@ +// objective: test the \cite command +// check: indexpage.xml +// check: citelist.xml +// config: CITE_BIB_FILES = sample.bib +/** \mainpage + * See \cite knuth79 for more info. + */ diff --git a/testing/013/class_t1.xml b/testing/013/class_t1.xml new file mode 100644 index 0000000..2a9b415 --- /dev/null +++ b/testing/013/class_t1.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_t1" kind="class" prot="public"> + <compoundname>T1</compoundname> + <includes refid="013__class_8h" local="yes">inc/013_class.h</includes> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A class </para> + </detaileddescription> + <location file="013_class.h" bodystart="10" bodyend="12"/> + <listofallmembers> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/013/class_t2.xml b/testing/013/class_t2.xml new file mode 100644 index 0000000..9c85ff6 --- /dev/null +++ b/testing/013/class_t2.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_t2" kind="class" prot="public"> + <compoundname>T2</compoundname> + <includes refid="013__class_8h" local="no">013_class.h</includes> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>class <ref refid="class_t2" kindref="compound">T2</ref> </para> + </detaileddescription> + <location file="013_class.h" bodystart="14" bodyend="16"/> + <listofallmembers> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/013/class_t3.xml b/testing/013/class_t3.xml new file mode 100644 index 0000000..49e7a16 --- /dev/null +++ b/testing/013/class_t3.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_t3" kind="class" prot="public"> + <compoundname>T3</compoundname> + <includes refid="013__class_8h" local="no">013_class.h</includes> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>class <ref refid="class_t3" kindref="compound">T3</ref> </para> + </detaileddescription> + <location file="013_class.h" bodystart="18" bodyend="20"/> + <listofallmembers> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/013/class_t4.xml b/testing/013/class_t4.xml new file mode 100644 index 0000000..d87571d --- /dev/null +++ b/testing/013/class_t4.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_t4" kind="class" prot="public"> + <compoundname>T4</compoundname> + <includes refid="013__class_8h" local="yes">inc/013_class.h</includes> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>class <ref refid="class_t4" kindref="compound">T4</ref> </para> + </detaileddescription> + <location file="013_class.h" bodystart="22" bodyend="24"/> + <listofallmembers> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/013_class.h b/testing/013_class.h new file mode 100644 index 0000000..346250b --- /dev/null +++ b/testing/013_class.h @@ -0,0 +1,37 @@ +// objective: test the \class and \headerfile commands +// check: class_t1.xml +// check: class_t2.xml +// check: class_t3.xml +// check: class_t4.xml + +/** A class + * \headerfile 013_class.h "inc/013_class.h" + */ +class T1 +{ +}; + +class T2 +{ +}; + +class T3 +{ +}; + +class T4 +{ +}; + +/** \class T2 + * \headerfile <> + * class T2 + */ + +/** \class T3 013_class.h + * class T3 + */ + +/** \class T4 013_class.h "inc/013_class.h" + * class T4 + */ diff --git a/testing/014/indexpage.xml b/testing/014/indexpage.xml new file mode 100644 index 0000000..9662b9c --- /dev/null +++ b/testing/014/indexpage.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para> + <programlisting> + <codeline lineno="1"> + <highlight class="normal">*<sp/></highlight> + <highlight class="comment">#<sp/>comment<sp/>in<sp/>Python</highlight> + <highlight class="normal"/> + </codeline> + <codeline lineno="2"> + <highlight class="normal">*<sp/></highlight> + <highlight class="keyword">class<sp/></highlight> + <highlight class="normal">Python:</highlight> + </codeline> + <codeline lineno="3"> + <highlight class="normal">*<sp/><sp/><sp/></highlight> + <highlight class="keywordflow">pass</highlight> + <highlight class="normal"/> + </codeline> + <codeline lineno="4"> + <highlight class="normal">*<sp/></highlight> + </codeline> + </programlisting> + </para> + <para> + <programlisting> + <codeline> + <highlight class="normal">*<sp/></highlight> + <highlight class="comment">//<sp/>comment<sp/>in<sp/>a<sp/>code<sp/>block</highlight> + <highlight class="normal"/> + </codeline> + <codeline> + <highlight class="normal">*<sp/></highlight> + <highlight class="keyword">class<sp/></highlight> + <highlight class="normal">Cpp<sp/>{};</highlight> + </codeline> + <codeline> + <highlight class="normal">*<sp/></highlight> + </codeline> + </programlisting> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/014_code.dox b/testing/014_code.dox new file mode 100644 index 0000000..871a44c --- /dev/null +++ b/testing/014_code.dox @@ -0,0 +1,14 @@ +// objective: test the \code command +// check: indexpage.xml +/** \mainpage + * \code{.py} + * # comment in Python + * class Python: + * pass + * \endcode + * + * \code{.cpp} + * // comment in a code block + * class Cpp {}; + * \endcode + */ diff --git a/testing/015/015__cond_8c.xml b/testing/015/015__cond_8c.xml new file mode 100644 index 0000000..39baed7 --- /dev/null +++ b/testing/015/015__cond_8c.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="015__cond_8c" kind="file"> + <compoundname>015_cond.c</compoundname> + <sectiondef kind="func"> + <memberdef kind="function" id="015__cond_8c_1a2521dcda743ec66ad8e030113d6e0c63" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void cond_enabled</definition> + <argsstring>()</argsstring> + <name>cond_enabled</name> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="015_cond.c" bodystart="20" bodyend="22"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <location file="015_cond.c"/> + </compounddef> +</doxygen> diff --git a/testing/015_cond.c b/testing/015_cond.c new file mode 100644 index 0000000..ab3044c --- /dev/null +++ b/testing/015_cond.c @@ -0,0 +1,30 @@ +// objective: test the \cond command +// check: 015__cond_8c.xml +// config: ENABLED_SECTIONS = COND_ENABLED + +/** \file + * Text \a argument more text. + */ + +/// \cond + +/** A function */ +void func(); + +/** A macro */ +#define MACRO 42 + +/// \endcond + +/// \cond COND_ENABLED +void cond_enabled() +{ +} +/// \endcond + +/** \cond COND_DISABLED */ +void cond_disabled() +{ +} +/** \endcond */ + diff --git a/testing/016/016__copydoc_8c.xml b/testing/016/016__copydoc_8c.xml new file mode 100644 index 0000000..dd1de8f --- /dev/null +++ b/testing/016/016__copydoc_8c.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="016__copydoc_8c" kind="file"> + <compoundname>016_copydoc.c</compoundname> + <sectiondef kind="func"> + <memberdef kind="function" id="016__copydoc_8c_1af721a79655a3857b98d70fa6ada8a916" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void func</definition> + <argsstring>(int i)</argsstring> + <name>func</name> + <param> + <type>int</type> + <declname>i</declname> + </param> + <briefdescription> + <para>Brief description. </para> + </briefdescription> + <detaileddescription> + <para>Detailed description. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="016_copydoc.c" line="11" column="1"/> + </memberdef> + <memberdef kind="function" id="016__copydoc_8c_1a119dbcf2f0bc3ec1fbf77fcd35dec6df" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void func_brief</definition> + <argsstring>()</argsstring> + <name>func_brief</name> + <briefdescription> + <para>Brief description. </para> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="016_copydoc.c" line="14" column="1"/> + </memberdef> + <memberdef kind="function" id="016__copydoc_8c_1a3c1e44de2b412b5218b55e216cebb4ac" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void func_details</definition> + <argsstring>()</argsstring> + <name>func_details</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Detailed description. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="016_copydoc.c" line="17" column="1"/> + </memberdef> + <memberdef kind="function" id="016__copydoc_8c_1a2535f29ea009c3d7449264671e15afe9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void func_doc</definition> + <argsstring>()</argsstring> + <name>func_doc</name> + <briefdescription> + <para>Brief description. </para> + </briefdescription> + <detaileddescription> + <para>Detailed description. More text. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="016_copydoc.c" line="22" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Text <emphasis>argument</emphasis> more text. </para> + </detaileddescription> + <location file="016_copydoc.c"/> + </compounddef> +</doxygen> diff --git a/testing/016_copydoc.c b/testing/016_copydoc.c new file mode 100644 index 0000000..bb8b1bb --- /dev/null +++ b/testing/016_copydoc.c @@ -0,0 +1,23 @@ +// objective: test the \copydoc, \copybrief, \copydetails, and \details commands +// check: 016__copydoc_8c.xml + +/** \file + * Text \a argument more text. + */ + +/** \brief Brief description. + * \details Detailed description. + */ +void func(int i); + +/** \copybrief func(int) */ +void func_brief(); + +/** \copydetails func(int) */ +void func_details(); + +/** \copydoc func(int) + * More text. + */ +void func_doc(); + diff --git a/testing/017/indexpage.xml b/testing/017/indexpage.xml new file mode 100644 index 0000000..f1bfc5e --- /dev/null +++ b/testing/017/indexpage.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para> + <simplesect kind="copyright"> + <para>Dimitri van Heesch </para> + </simplesect> + <simplesect kind="date"> + <para>July 13 2013 </para> + </simplesect> + </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/017_copyright.dox b/testing/017_copyright.dox new file mode 100644 index 0000000..2351180 --- /dev/null +++ b/testing/017_copyright.dox @@ -0,0 +1,6 @@ +// objective: test \copyright and \date commands +// check: indexpage.xml +/** \mainpage + * \copyright Dimitri van Heesch + * \date July 13 2013 + */ diff --git a/testing/018/018__def_8c.xml b/testing/018/018__def_8c.xml new file mode 100644 index 0000000..b55a2eb --- /dev/null +++ b/testing/018/018__def_8c.xml @@ -0,0 +1,125 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="018__def_8c" kind="file"> + <compoundname>018_def.c</compoundname> + <sectiondef kind="define"> + <memberdef kind="define" id="018__def_8c_1a824c99cb152a3c2e9111a2cb9c34891e" prot="public" static="no"> + <name>MACRO</name> + <initializer>42</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A macro definition </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="018_def.c" line="8" column="9"/> + </memberdef> + </sectiondef> + <sectiondef kind="enum"> + <memberdef kind="enum" id="018__def_8c_1aa57b8491d1d8fc1014dd54bcf83b130a" prot="public" static="no"> + <name>E</name> + <enumvalue id="018__def_8c_1aa57b8491d1d8fc1014dd54bcf83b130aab1710e6a49014ba389d57c8753c530f4" prot="public"> + <name>E1</name> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + </enumvalue> + <enumvalue id="018__def_8c_1aa57b8491d1d8fc1014dd54bcf83b130aace9a5783f96994d28bc6ec5c9ece8c80" prot="public"> + <name>E2</name> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + </enumvalue> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>An enum </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="018_def.c" bodystart="13" bodyend="13"/> + </memberdef> + </sectiondef> + <sectiondef kind="typedef"> + <memberdef kind="typedef" id="018__def_8c_1a1d1cfd8ffb84e947f82999c682b666a7" prot="public" static="no"> + <type>int</type> + <definition>Type</definition> + <argsstring/> + <name>Type</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A type definition. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="018_def.c" bodystart="12" bodyend="-1"/> + </memberdef> + </sectiondef> + <sectiondef kind="var"> + <memberdef kind="variable" id="018__def_8c_1a335628f2e9085305224b4f9cc6e95ed5" prot="public" static="no" mutable="no"> + <type>int</type> + <definition>var</definition> + <argsstring/> + <name>var</name> + <initializer>= 10</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A variable </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="018_def.c" bodystart="9" bodyend="-1"/> + </memberdef> + </sectiondef> + <sectiondef kind="func"> + <memberdef kind="function" id="018__def_8c_1aee50dbe7d43d2202b490a6977a325584" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>func</definition> + <argsstring>(int)</argsstring> + <name>func</name> + <param> + <type>int</type> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A function with one parameter. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="018_def.c" bodystart="10" bodyend="10"/> + </memberdef> + <memberdef kind="function" id="018__def_8c_1a2652ccbfb85efa2df3c70ba6c4628f8d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>func</definition> + <argsstring>(int, const char *)</argsstring> + <name>func</name> + <param> + <type>int</type> + </param> + <param> + <type>const char *</type> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A function with two parameters </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="018_def.c" bodystart="11" bodyend="11"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Text <emphasis>argument</emphasis> more text. </para> + </detaileddescription> + <location file="018_def.c"/> + </compounddef> +</doxygen> diff --git a/testing/018_def.c b/testing/018_def.c new file mode 100644 index 0000000..dadc71c --- /dev/null +++ b/testing/018_def.c @@ -0,0 +1,37 @@ +// objective: test the \def, \var, \fn, and \typedef commands +// check: 018__def_8c.xml + +/** \file + * Text \a argument more text. + */ + +#define MACRO 42 +int var = 10; +void func(int) {} +void func(int,const char *) {} +typedef int Type; +enum E { E1, E2 }; + +/** \def MACRO + * A macro definition + */ + +/** \var var + * A variable + */ + +/** \fn func(int) + * A function with one parameter. + */ + +/** \fn func(int,const char *) + * A function with two parameters + */ + +/** \typedef Type + * A type definition. + */ + +/** \enum E + * An enum + */ diff --git a/testing/019/group__g1.xml b/testing/019/group__g1.xml new file mode 100644 index 0000000..23d9c31 --- /dev/null +++ b/testing/019/group__g1.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="group__g1" kind="group"> + <compoundname>g1</compoundname> + <title>First Group</title> + <sectiondef kind="func"> + <memberdef kind="function" id="group__g1_1gae84463e3941387a9da58279761e18d7e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void func_g1</definition> + <argsstring>()</argsstring> + <name>func_g1</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A function in the first group. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="019_defgroup.c" line="13" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Text for first group. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/019/group__g2.xml b/testing/019/group__g2.xml new file mode 100644 index 0000000..51df509 --- /dev/null +++ b/testing/019/group__g2.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="group__g2" kind="group"> + <compoundname>g2</compoundname> + <title>Second Group</title> + <innergroup refid="group__g3">Third Group</innergroup> + <sectiondef kind="func"> + <memberdef kind="function" id="group__g2_1gafd310bbec27993e80a5dbaf6c54d5e0b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void func_g2</definition> + <argsstring>()</argsstring> + <name>func_g2</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A function in the second group </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="019_defgroup.c" line="23" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Text for second group. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/019/group__g3.xml b/testing/019/group__g3.xml new file mode 100644 index 0000000..1c2b33b --- /dev/null +++ b/testing/019/group__g3.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="group__g3" kind="group"> + <compoundname>g3</compoundname> + <title>Third Group</title> + <sectiondef kind="func"> + <memberdef kind="function" id="group__g3_1ga59de48fb40aec5ee2623cc453fe71643" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void func_g3</definition> + <argsstring>()</argsstring> + <name>func_g3</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A function in the third group </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="019_defgroup.c" line="36" column="1"/> + </memberdef> + <memberdef kind="function" id="group__g3_1gaf32d23522a5d9c3e7fed3dd5710001f7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void func_g3_add</definition> + <argsstring>()</argsstring> + <name>func_g3_add</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Another function added to the third group </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="019_defgroup.c" line="45" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Text for third group. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/019_defgroup.c b/testing/019_defgroup.c new file mode 100644 index 0000000..d42d63e --- /dev/null +++ b/testing/019_defgroup.c @@ -0,0 +1,48 @@ +// objective: test the \defgroup, \addtogroup, and \ingroup command. +// check: group__g1.xml +// check: group__g2.xml +// check: group__g3.xml + +/** \defgroup g1 First Group + * Text for first group. + */ + +/** A function in the first group. + * \ingroup g1 + */ +void func_g1(); + +//-------------------------------- + +/** \defgroup g2 Second Group + * Text for second group. + */ +/// \{ + +/** A function in the second group */ +void func_g2(); + +/// \} + +/** \defgroup g3 Third Group + * Text for third group. + * \ingroup g2 + * \{ + */ + +//-------------------------------- + +/** A function in the third group */ +void func_g3(); + +/** \} */ + +/** \addtogroup g3 + * \{ + */ + +/** Another function added to the third group */ +void func_g3_add(); + +/** \} */ + diff --git a/testing/020/indexpage.xml b/testing/020/indexpage.xml new file mode 100644 index 0000000..d5bccda --- /dev/null +++ b/testing/020/indexpage.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Text. <htmlonly> +HTML +</htmlonly> <rtfonly> +RTF +</rtfonly> <manonly> +Man +</manonly> <latexonly> +LaTeX +</latexonly> +XML + <docbookonly> +DocBook +</docbookonly> More text. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/020_only.dox b/testing/020_only.dox new file mode 100644 index 0000000..be21136 --- /dev/null +++ b/testing/020_only.dox @@ -0,0 +1,24 @@ +// objective: test the \*only and \*endonly commands +// check: indexpage.xml +/** \mainpage + * Text. + * \htmlonly + * HTML + * \endhtmlonly + * \rtfonly + * RTF + * \endrtfonly + * \manonly + * Man + * \endmanonly + * \latexonly + * LaTeX + * \endlatexonly + * \xmlonly + * XML + * \endxmlonly + * \docbookonly + * DocBook + * \enddocbookonly + * More text. + */ diff --git a/testing/021/indexpage.xml b/testing/021/indexpage.xml new file mode 100644 index 0000000..38ee1ad --- /dev/null +++ b/testing/021/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para> Our main function starts like this: <programlisting><codeline/></programlisting> First we create a object <computeroutput>t</computeroutput> of the <ref refid="class_test" kindref="compound">Test</ref> class. <programlisting><codeline><highlight class="normal"><sp/>*<sp/><sp/>First<sp/>we<sp/>create<sp/>a<sp/>object<sp/>\c<sp/>t<sp/>of<sp/>the<sp/><ref refid="class_test" kindref="compound">Test</ref><sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal">.</highlight></codeline></programlisting> Then we call the example member function <programlisting/> After that our little test routine ends. <programlisting/> </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/021_dontinclude.cpp b/testing/021_dontinclude.cpp new file mode 100644 index 0000000..9fea1c6 --- /dev/null +++ b/testing/021_dontinclude.cpp @@ -0,0 +1,24 @@ +// objective: test the \dontinclude, \skip, \until, \skipline, \line commands +// check: indexpage.xml +// config: EXAMPLE_PATH = . +/*! A test class. */ + +class Test +{ + public: + /// a member function + void example(); +}; + +/*! \mainpage + * \dontinclude 021_dontinclude.cpp + * Our main function starts like this: + * \skip main + * \until { + * First we create a object \c t of the Test class. + * \skipline Test + * Then we call the example member function + * \line example + * After that our little test routine ends. + * \line } + */ diff --git a/testing/022/indexpage.xml b/testing/022/indexpage.xml new file mode 100644 index 0000000..83ed868 --- /dev/null +++ b/testing/022/indexpage.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Class relations expressed via an inline dot graph: <dot> +digraph example { + node [shape=record, fontname=Helvetica, fontsize=10]; + b [ label="class B" URL="\ref B"]; + c [ label="class C" URL="\ref C"]; + b -> c [ arrowhead="open", style="dashed" ]; +} +</dot> </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/022_dot.cpp b/testing/022_dot.cpp new file mode 100644 index 0000000..2db7c38 --- /dev/null +++ b/testing/022_dot.cpp @@ -0,0 +1,22 @@ +// objective: test the \dot and \enddot commands +// check: indexpage.xml +// config: HAVE_DOT = YES +// config: DOTFILE_DIRS = . + +/*! class B */ +class B {}; +/*! class C */ +class C {}; + +/*! \mainpage +Class relations expressed via an inline dot graph: +\dot +digraph example { + node [shape=record, fontname=Helvetica, fontsize=10]; + b [ label="class B" URL="\ref B"]; + c [ label="class C" URL="\ref C"]; + b -> c [ arrowhead="open", style="dashed" ]; +} +\enddot +*/ + diff --git a/testing/023/indexpage.xml b/testing/023/indexpage.xml new file mode 100644 index 0000000..b907db9 --- /dev/null +++ b/testing/023/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Normal <emphasis>emphasis</emphasis> and more <emphasis>emphasis</emphasis> back to normal. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/023_e.dox b/testing/023_e.dox new file mode 100644 index 0000000..5f787b7 --- /dev/null +++ b/testing/023_e.dox @@ -0,0 +1,5 @@ +// objective: test the \e, \em commands +// check: indexpage.xml +/** \mainpage + * Normal \e emphasis and more \em emphasis back to normal. + */ diff --git a/testing/024/indexpage.xml b/testing/024/indexpage.xml new file mode 100644 index 0000000..11a385b --- /dev/null +++ b/testing/024/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Unconditional (start) Enabled (if). Enabled (else). Unconditional (middle) Enabled (else). Unconditional (end) </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/024_if.dox b/testing/024_if.dox new file mode 100644 index 0000000..f24be43 --- /dev/null +++ b/testing/024_if.dox @@ -0,0 +1,21 @@ +// objective: test the \if, \ifnot, \elsif, \else, and \endif commands +// check: indexpage.xml +// config: ENABLED_SECTIONS = GUARD_ENABLED +/** \mainpage + * Unconditional (start) + * \if GUARD_ENABLED + * Enabled (if). + * \if (!GUARD_ENABLED) Disabled (if).\else Enabled (else). \endif + * \else + * Disabled. + * \endif + * Unconditional (middle) + * \ifnot GUARD_ENABLED + * Disabled (ifnot). + * \elseif GUARD_DISABLED + * Disabled (elseif). + * \else + * Enabled (else). + * \endif + * Unconditional (end) + */ diff --git a/testing/025/class_test.xml b/testing/025/class_test.xml new file mode 100644 index 0000000..8d3f076 --- /dev/null +++ b/testing/025/class_test.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_test" kind="class" prot="public"> + <compoundname>Test</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_test_1a47b775f65718978f1ffcd96376f8ecfa" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Test::example</definition> + <argsstring>()</argsstring> + <name>example</name> + <briefdescription> + <para>An example member function. </para> + </briefdescription> + <detaileddescription> + <para>More details about this function. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="025_example.cpp" bodystart="20" bodyend="20"/> + </memberdef> + </sectiondef> + <briefdescription> + <para>A <ref refid="class_test" kindref="compound">Test</ref> class. </para> + </briefdescription> + <detaileddescription> + <para>More details about this class. </para> + </detaileddescription> + <location file="025_example.cpp" bodystart="10" bodyend="18"/> + <listofallmembers> + <member refid="class_test_1a47b775f65718978f1ffcd96376f8ecfa" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>example</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/025/example_test_8cpp-example.xml b/testing/025/example_test_8cpp-example.xml new file mode 100644 index 0000000..6c0ce90 --- /dev/null +++ b/testing/025/example_test_8cpp-example.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="example_test_8cpp-example" kind="example"> + <compoundname>example_test.cpp</compoundname> + <detaileddescription> + <para>This is an example of how to use the <ref refid="class_test" kindref="compound">Test</ref> class.</para> + <para>More details about this example. <programlisting><codeline><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>main()</highlight></codeline><codeline><highlight class="normal">{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><ref refid="class_test" kindref="compound">Test</ref><sp/>t;</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>t.<ref refid="class_test_1a47b775f65718978f1ffcd96376f8ecfa" kindref="member">example</ref>();</highlight></codeline><codeline><highlight class="normal">}</highlight></codeline><codeline><highlight class="normal"/></codeline></programlisting> </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/025_example.cpp b/testing/025_example.cpp new file mode 100644 index 0000000..39736f8 --- /dev/null +++ b/testing/025_example.cpp @@ -0,0 +1,26 @@ +// objective: test the \example command +// check: example_test_8cpp-example.xml +// check: class_test.xml +// config: EXAMPLE_PATH = . + +/** \brief A Test class. + * + * More details about this class. + */ +class Test +{ + public: + /** \brief An example member function. + * + * More details about this function. + */ + void example(); +}; + +void Test::example() {} + +/** \example example_test.cpp + * This is an example of how to use the Test class. + * + * More details about this example. + */ diff --git a/testing/026/class_test.xml b/testing/026/class_test.xml new file mode 100644 index 0000000..f49cc8d --- /dev/null +++ b/testing/026/class_test.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_test" kind="class" prot="public"> + <compoundname>Test</compoundname> + <templateparamlist> + <param> + <type>class T</type> + </param> + </templateparamlist> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_test_1abf9d5fbdaa4c23d0a513ee9746060779" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>int</type> + <definition>int Test< T >::example</definition> + <argsstring>(int p1, int p2)</argsstring> + <name>example</name> + <param> + <type>int</type> + <declname>p1</declname> + </param> + <param> + <type>int</type> + <declname>p2</declname> + </param> + <exceptions> throw (std::out_of_range)</exceptions> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>An example member function. <parameterlist kind="param"><parameteritem><parameternamelist><parametername>p1</parametername></parameternamelist><parameterdescription><para>First parameter. </para></parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>p2</parametername></parameternamelist><parameterdescription><para>Second parameter. </para></parameterdescription></parameteritem></parameterlist> +<parameterlist kind="exception"><parameteritem><parameternamelist><parametername>std::out_of_range</parametername></parameternamelist><parameterdescription><para>parameter is out of range. </para></parameterdescription></parameteritem></parameterlist> +<parameterlist kind="retval"><parameteritem><parameternamelist><parametername>0</parametername></parameternamelist><parameterdescription><para>if p1 and p2 are equal </para></parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>-1</parametername></parameternamelist><parameterdescription><para>if p1 is smaller than p2 </para></parameterdescription></parameteritem><parameteritem><parameternamelist><parametername>1</parametername></parameternamelist><parameterdescription><para>if p1 is bigger than p2 </para></parameterdescription></parameteritem></parameterlist> +</para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="026_exception.cpp" line="19" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A <ref refid="class_test" kindref="compound">Test</ref> class. More details about this class. <parameterlist kind="templateparam"><parameteritem><parameternamelist><parametername>T</parametername></parameternamelist><parameterdescription><para>A template parameter. </para></parameterdescription></parameteritem></parameterlist> +</para> + </detaileddescription> + <location file="026_exception.cpp" bodystart="8" bodyend="20"/> + <listofallmembers> + <member refid="class_test_1abf9d5fbdaa4c23d0a513ee9746060779" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>example</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/026_exception.cpp b/testing/026_exception.cpp new file mode 100644 index 0000000..cabb128 --- /dev/null +++ b/testing/026_exception.cpp @@ -0,0 +1,21 @@ +// objective: test the \exception, \param, and \tparam commands +// check: class_test.xml + +/** A Test class. + * More details about this class. + * @tparam T A template parameter. + */ +template<class T> class Test +{ + public: + /** An example member function. + * \param p1 First parameter. + * \param p2 Second parameter. + * \exception std::out_of_range parameter is out of range. + * \retval 0 if p1 and p2 are equal + * \retval -1 if p1 is smaller than p2 + * \retval 1 if p1 is bigger than p2 + */ + int example(int p1,int p2) throw(std::out_of_range); +}; + diff --git a/testing/027/struct_car.xml b/testing/027/struct_car.xml new file mode 100644 index 0000000..0e40922 --- /dev/null +++ b/testing/027/struct_car.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="struct_car" kind="struct" prot="public"> + <compoundname>Car</compoundname> + <basecompoundref refid="struct_vehicle" prot="public" virt="non-virtual">Vehicle</basecompoundref> + <sectiondef kind="protected-attrib"> + <memberdef kind="variable" id="struct_car_1ab8ff28306286da5a8b14fa9bdccaafaa" prot="protected" static="no" mutable="no"> + <type> + <ref refid="struct_vehicle" kindref="compound">Vehicle</ref> + </type> + <definition>Vehicle Car::base</definition> + <argsstring/> + <name>base</name> + <briefdescription> + <para>Base class. </para> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="027_extends.c" bodystart="69" bodyend="-1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para><ref refid="struct_car" kindref="compound">Car</ref> class. </para> + </detaileddescription> + <inheritancegraph> + <node id="1"> + <label>Vehicle</label> + <link refid="struct_vehicle"/> + <childnode refid="2" relation="public-inheritance"> + </childnode> + </node> + <node id="2"> + <label>Object</label> + <link refid="struct_object"/> + </node> + <node id="0"> + <label>Car</label> + <link refid="struct_car"/> + <childnode refid="1" relation="public-inheritance"> + </childnode> + </node> + </inheritancegraph> + <collaborationgraph> + <node id="4"> + <label>Vehicle</label> + <link refid="struct_vehicle"/> + <childnode refid="5" relation="public-inheritance"> + </childnode> + <childnode refid="5" relation="usage"> + <edgelabel>base</edgelabel> + </childnode> + </node> + <node id="5"> + <label>Object</label> + <link refid="struct_object"/> + </node> + <node id="3"> + <label>Car</label> + <link refid="struct_car"/> + <childnode refid="4" relation="public-inheritance"> + </childnode> + <childnode refid="4" relation="usage"> + <edgelabel>base</edgelabel> + </childnode> + </node> + </collaborationgraph> + <location file="027_extends.c" bodystart="67" bodyend="70"/> + <listofallmembers> + <member refid="struct_car_1ab8ff28306286da5a8b14fa9bdccaafaa" prot="protected" virt="non-virtual"> + <scope>Car</scope> + <name>base</name> + </member> + <member refid="struct_object_1a71225073d06a793b9a6ea9263ed37b12" prot="public" virt="non-virtual"> + <scope>Car</scope> + <name>objRef</name> + </member> + <member refid="struct_object_1a924ee0cecc906d148022b3f0d6325cfb" prot="public" virt="non-virtual"> + <scope>Car</scope> + <name>objUnref</name> + </member> + <member refid="struct_vehicle_1a6891d3d28853bc3fdd075596dc6de9f8" prot="public" virt="non-virtual"> + <scope>Car</scope> + <name>vehicleStart</name> + </member> + <member refid="struct_vehicle_1a4dcbcba43792dcd673a552b14479ab77" prot="public" virt="non-virtual"> + <scope>Car</scope> + <name>vehicleStop</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/027/struct_object.xml b/testing/027/struct_object.xml new file mode 100644 index 0000000..107548d --- /dev/null +++ b/testing/027/struct_object.xml @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="struct_object" kind="struct" prot="public"> + <compoundname>Object</compoundname> + <derivedcompoundref refid="struct_vehicle" prot="public" virt="non-virtual">Vehicle</derivedcompoundref> + <sectiondef kind="private-attrib"> + <memberdef kind="variable" id="struct_object_1a1b6037fba835e83243ababce426ff9af" prot="private" static="no" mutable="no"> + <type>int</type> + <definition>int Object::ref</definition> + <argsstring/> + <name>ref</name> + <briefdescription> + <para>Reference count. </para> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="027_extends.c" bodystart="21" bodyend="-1"/> + </memberdef> + </sectiondef> + <sectiondef kind="public-func"> + <memberdef kind="function" id="struct_object_1a71225073d06a793b9a6ea9263ed37b12" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type><ref refid="struct_object" kindref="compound">Object</ref> *</type> + <definition>static Object * objRef</definition> + <argsstring>(Object *obj)</argsstring> + <name>objRef</name> + <param> + <type><ref refid="struct_object" kindref="compound">Object</ref> *</type> + <declname>obj</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Increments object reference count by one. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="027_extends.c" line="29" column="1"/> + </memberdef> + <memberdef kind="function" id="struct_object_1a924ee0cecc906d148022b3f0d6325cfb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type><ref refid="struct_object" kindref="compound">Object</ref> *</type> + <definition>static Object * objUnref</definition> + <argsstring>(Object *obj)</argsstring> + <name>objUnref</name> + <param> + <type><ref refid="struct_object" kindref="compound">Object</ref> *</type> + <declname>obj</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Decrements object reference count by one. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="027_extends.c" line="36" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Base object class. </para> + </detaileddescription> + <inheritancegraph> + <node id="9"> + <label>Truck</label> + <link refid="struct_truck"/> + <childnode refid="7" relation="public-inheritance"> + </childnode> + </node> + <node id="7"> + <label>Vehicle</label> + <link refid="struct_vehicle"/> + <childnode refid="6" relation="public-inheritance"> + </childnode> + </node> + <node id="6"> + <label>Object</label> + <link refid="struct_object"/> + </node> + <node id="8"> + <label>Car</label> + <link refid="struct_car"/> + <childnode refid="7" relation="public-inheritance"> + </childnode> + </node> + </inheritancegraph> + <location file="027_extends.c" bodystart="19" bodyend="22"/> + <listofallmembers> + <member refid="struct_object_1a71225073d06a793b9a6ea9263ed37b12" prot="public" virt="non-virtual"> + <scope>Object</scope> + <name>objRef</name> + </member> + <member refid="struct_object_1a924ee0cecc906d148022b3f0d6325cfb" prot="public" virt="non-virtual"> + <scope>Object</scope> + <name>objUnref</name> + </member> + <member refid="struct_object_1a1b6037fba835e83243ababce426ff9af" prot="private" virt="non-virtual"> + <scope>Object</scope> + <name>ref</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/027/struct_truck.xml b/testing/027/struct_truck.xml new file mode 100644 index 0000000..1da9e2f --- /dev/null +++ b/testing/027/struct_truck.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="struct_truck" kind="struct" prot="public"> + <compoundname>Truck</compoundname> + <basecompoundref refid="struct_vehicle" prot="public" virt="non-virtual">Vehicle</basecompoundref> + <sectiondef kind="protected-attrib"> + <memberdef kind="variable" id="struct_truck_1ad0ac321609dda1a6c552488b05ec7ac8" prot="protected" static="no" mutable="no"> + <type> + <ref refid="struct_vehicle" kindref="compound">Vehicle</ref> + </type> + <definition>Vehicle Truck::base</definition> + <argsstring/> + <name>base</name> + <briefdescription> + <para>Base class. </para> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="027_extends.c" bodystart="79" bodyend="-1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para><ref refid="struct_truck" kindref="compound">Truck</ref> class. </para> + </detaileddescription> + <inheritancegraph> + <node id="11"> + <label>Truck</label> + <link refid="struct_truck"/> + <childnode refid="12" relation="public-inheritance"> + </childnode> + </node> + <node id="12"> + <label>Vehicle</label> + <link refid="struct_vehicle"/> + <childnode refid="13" relation="public-inheritance"> + </childnode> + </node> + <node id="13"> + <label>Object</label> + <link refid="struct_object"/> + </node> + </inheritancegraph> + <collaborationgraph> + <node id="14"> + <label>Truck</label> + <link refid="struct_truck"/> + <childnode refid="15" relation="public-inheritance"> + </childnode> + <childnode refid="15" relation="usage"> + <edgelabel>base</edgelabel> + </childnode> + </node> + <node id="15"> + <label>Vehicle</label> + <link refid="struct_vehicle"/> + <childnode refid="16" relation="public-inheritance"> + </childnode> + <childnode refid="16" relation="usage"> + <edgelabel>base</edgelabel> + </childnode> + </node> + <node id="16"> + <label>Object</label> + <link refid="struct_object"/> + </node> + </collaborationgraph> + <location file="027_extends.c" bodystart="77" bodyend="80"/> + <listofallmembers> + <member refid="struct_truck_1ad0ac321609dda1a6c552488b05ec7ac8" prot="protected" virt="non-virtual"> + <scope>Truck</scope> + <name>base</name> + </member> + <member refid="struct_object_1a71225073d06a793b9a6ea9263ed37b12" prot="public" virt="non-virtual"> + <scope>Truck</scope> + <name>objRef</name> + </member> + <member refid="struct_object_1a924ee0cecc906d148022b3f0d6325cfb" prot="public" virt="non-virtual"> + <scope>Truck</scope> + <name>objUnref</name> + </member> + <member refid="struct_vehicle_1a6891d3d28853bc3fdd075596dc6de9f8" prot="public" virt="non-virtual"> + <scope>Truck</scope> + <name>vehicleStart</name> + </member> + <member refid="struct_vehicle_1a4dcbcba43792dcd673a552b14479ab77" prot="public" virt="non-virtual"> + <scope>Truck</scope> + <name>vehicleStop</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/027/struct_vehicle.xml b/testing/027/struct_vehicle.xml new file mode 100644 index 0000000..a1f7654 --- /dev/null +++ b/testing/027/struct_vehicle.xml @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="struct_vehicle" kind="struct" prot="public"> + <compoundname>Vehicle</compoundname> + <basecompoundref refid="struct_object" prot="public" virt="non-virtual">Object</basecompoundref> + <derivedcompoundref refid="struct_car" prot="public" virt="non-virtual">Car</derivedcompoundref> + <derivedcompoundref refid="struct_truck" prot="public" virt="non-virtual">Truck</derivedcompoundref> + <sectiondef kind="protected-attrib"> + <memberdef kind="variable" id="struct_vehicle_1ad7970f528d429f6fc1725173e93a77c2" prot="protected" static="no" mutable="no"> + <type> + <ref refid="struct_object" kindref="compound">Object</ref> + </type> + <definition>Object Vehicle::base</definition> + <argsstring/> + <name>base</name> + <briefdescription> + <para>Base class. </para> + </briefdescription> + <detaileddescription> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="027_extends.c" bodystart="45" bodyend="-1"/> + </memberdef> + </sectiondef> + <sectiondef kind="public-func"> + <memberdef kind="function" id="struct_vehicle_1a6891d3d28853bc3fdd075596dc6de9f8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void vehicleStart</definition> + <argsstring>(Vehicle *obj)</argsstring> + <name>vehicleStart</name> + <param> + <type><ref refid="struct_vehicle" kindref="compound">Vehicle</ref> *</type> + <declname>obj</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Starts the vehicle. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="027_extends.c" line="53" column="1"/> + </memberdef> + <memberdef kind="function" id="struct_vehicle_1a4dcbcba43792dcd673a552b14479ab77" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void vehicleStop</definition> + <argsstring>(Vehicle *obj)</argsstring> + <name>vehicleStop</name> + <param> + <type><ref refid="struct_vehicle" kindref="compound">Vehicle</ref> *</type> + <declname>obj</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Stops the vehicle. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="027_extends.c" line="60" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para><ref refid="struct_vehicle" kindref="compound">Vehicle</ref> class. </para> + </detaileddescription> + <inheritancegraph> + <node id="20"> + <label>Truck</label> + <link refid="struct_truck"/> + <childnode refid="17" relation="public-inheritance"> + </childnode> + </node> + <node id="17"> + <label>Vehicle</label> + <link refid="struct_vehicle"/> + <childnode refid="18" relation="public-inheritance"> + </childnode> + </node> + <node id="18"> + <label>Object</label> + <link refid="struct_object"/> + </node> + <node id="19"> + <label>Car</label> + <link refid="struct_car"/> + <childnode refid="17" relation="public-inheritance"> + </childnode> + </node> + </inheritancegraph> + <collaborationgraph> + <node id="21"> + <label>Vehicle</label> + <link refid="struct_vehicle"/> + <childnode refid="22" relation="public-inheritance"> + </childnode> + <childnode refid="22" relation="usage"> + <edgelabel>base</edgelabel> + </childnode> + </node> + <node id="22"> + <label>Object</label> + <link refid="struct_object"/> + </node> + </collaborationgraph> + <location file="027_extends.c" bodystart="43" bodyend="46"/> + <listofallmembers> + <member refid="struct_vehicle_1ad7970f528d429f6fc1725173e93a77c2" prot="protected" virt="non-virtual"> + <scope>Vehicle</scope> + <name>base</name> + </member> + <member refid="struct_object_1a71225073d06a793b9a6ea9263ed37b12" prot="public" virt="non-virtual"> + <scope>Vehicle</scope> + <name>objRef</name> + </member> + <member refid="struct_object_1a924ee0cecc906d148022b3f0d6325cfb" prot="public" virt="non-virtual"> + <scope>Vehicle</scope> + <name>objUnref</name> + </member> + <member refid="struct_vehicle_1a6891d3d28853bc3fdd075596dc6de9f8" prot="public" virt="non-virtual"> + <scope>Vehicle</scope> + <name>vehicleStart</name> + </member> + <member refid="struct_vehicle_1a4dcbcba43792dcd673a552b14479ab77" prot="public" virt="non-virtual"> + <scope>Vehicle</scope> + <name>vehicleStop</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/027_extends.c b/testing/027_extends.c new file mode 100644 index 0000000..7860abd --- /dev/null +++ b/testing/027_extends.c @@ -0,0 +1,93 @@ +// objective: test the \extends, \implements, \memberof, \private, and \public commands +// check: struct_object.xml +// check: struct_vehicle.xml +// check: struct_car.xml +// check: struct_truck.xml + +/** + * \file + */ + +typedef struct Object Object; //!< Object type +typedef struct Vehicle Vehicle; //!< Vehicle type +typedef struct Car Car; //!< Car type +typedef struct Truck Truck; //!< Truck type + +/*! + * Base object class. + */ +struct Object +{ + int ref; //!< \private Reference count. +}; + + +/*! + * Increments object reference count by one. + * \public \memberof Object + */ +static Object * objRef(Object *obj); + + +/*! + * Decrements object reference count by one. + * \public \memberof Object + */ +static Object * objUnref(Object *obj); + + +/*! + * Vehicle class. + * \extends Object + */ +struct Vehicle +{ + Object base; //!< \protected Base class. +}; + + +/*! + * Starts the vehicle. + * \public \memberof Vehicle + */ +void vehicleStart(Vehicle *obj); + + +/*! + * Stops the vehicle. + * \public \memberof Vehicle + */ +void vehicleStop(Vehicle *obj); + + +/*! + * Car class. + * \implements Vehicle + */ +struct Car +{ + Vehicle base; //!< \protected Base class. +}; + + +/*! + * Truck class. + * \implements Vehicle + */ +struct Truck +{ + Vehicle base; //!< \protected Base class. +}; + + +/*! + * Main function. + * + * Ref vehicleStart(), objRef(), objUnref(). + */ +int main(void) +{ + Car c; + vehicleStart((Vehicle*) &c); +} + diff --git a/testing/028/indexpage.xml b/testing/028/indexpage.xml new file mode 100644 index 0000000..d508adb --- /dev/null +++ b/testing/028/indexpage.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Here are some formulas:<orderedlist><listitem><para>The distance between <formula id="0">$(x_1,y_1)$</formula> and <formula id="1">$(x_2,y_2)$</formula> is <formula id="2">$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$</formula>.</para></listitem><listitem><para>Unnumbered formula: <formula id="3">\[ |I_2|=\left| \int_{0}^T \psi(t) \left\{ u(a,t)- \int_{\gamma(t)}^a \frac{d\theta}{k(\theta,t)} \int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi \right\} dt \right| \]</formula></para></listitem><listitem><para>Formula in different environment <formula id="4">\begin{eqnarray*} g &=& \frac{Gm_2}{r^2} \\ &=& \frac{(6.673 \times 10^{-11}\,\mbox{m}^3\,\mbox{kg}^{-1}\, \mbox{s}^{-2})(5.9736 \times 10^{24}\,\mbox{kg})}{(6371.01\,\mbox{km})^2} \\ &=& 9.82066032\,\mbox{m/s}^2 \end{eqnarray*}</formula> </para></listitem></orderedlist> +</para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/028_formula.c b/testing/028_formula.c new file mode 100644 index 0000000..2a4c5cb --- /dev/null +++ b/testing/028_formula.c @@ -0,0 +1,17 @@ +// objective: test the \f$, \f[, \f], \f{, and \f} commands +// check: indexpage.xml + +/** @mainpage +Here are some formulas: +-# The distance between \f$(x_1,y_1)\f$ and \f$(x_2,y_2)\f$ is + \f$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\f$. +-# Unnumbered formula: + \f[ |I_2|=\left| \int_{0}^T \psi(t) \left\{ u(a,t)- \int_{\gamma(t)}^a + \frac{d\theta}{k(\theta,t)} \int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi \right\} dt \right| \f] +-# Formula in different environment + \f{eqnarray*}{ g &=& \frac{Gm_2}{r^2} \\ + &=& \frac{(6.673 \times 10^{-11}\,\mbox{m}^3\,\mbox{kg}^{-1}\, + \mbox{s}^{-2})(5.9736 \times 10^{24}\,\mbox{kg})}{(6371.01\,\mbox{km})^2} \\ + &=& 9.82066032\,\mbox{m/s}^2 + \f} +*/ diff --git a/testing/029/029__hideinit_8c.xml b/testing/029/029__hideinit_8c.xml new file mode 100644 index 0000000..4bf1516 --- /dev/null +++ b/testing/029/029__hideinit_8c.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="029__hideinit_8c" kind="file"> + <compoundname>029_hideinit.c</compoundname> + <sectiondef kind="var"> + <memberdef kind="variable" id="029__hideinit_8c_1a799f44203647e4c53bdb0386aa95680f" prot="public" static="no" mutable="no"> + <type>int</type> + <definition>int var1</definition> + <argsstring/> + <name>var1</name> + <initializer>= 10</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>a variable with initializer visible </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="029_hideinit.c" bodystart="7" bodyend="-1"/> + </memberdef> + <memberdef kind="variable" id="029__hideinit_8c_1ac0da06d47d79ad4b9fb1c0eaf1118c3f" prot="public" static="no" mutable="no"> + <type>int</type> + <definition>int var2</definition> + <argsstring/> + <name>var2</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>a variable without initializer visible </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="029_hideinit.c" bodystart="12" bodyend="-1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <location file="029_hideinit.c"/> + </compounddef> +</doxygen> diff --git a/testing/029_hideinit.c b/testing/029_hideinit.c new file mode 100644 index 0000000..da3f4a5 --- /dev/null +++ b/testing/029_hideinit.c @@ -0,0 +1,12 @@ +// objective: test the \hideinitializer command +// check: 029__hideinit_8c.xml + +/** \file */ + +/** a variable with initializer visible */ +int var1 = 10; + +/** a variable without initializer visible + * \hideinitializer + */ +int var2 = 20; diff --git a/testing/030/indexpage.xml b/testing/030/indexpage.xml new file mode 100644 index 0000000..62046d4 --- /dev/null +++ b/testing/030/indexpage.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Some text. <htmlonly><h1>Hello world</h1> +</htmlonly> More text. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/030_htmlinclude.dox b/testing/030_htmlinclude.dox new file mode 100644 index 0000000..a3716e6 --- /dev/null +++ b/testing/030_htmlinclude.dox @@ -0,0 +1,8 @@ +// objective: test the \htmlinclude command +// check: indexpage.xml +// config: EXAMPLE_PATH = . +/** \mainpage + * Some text. + * \htmlinclude sample.html + * More text. + */ diff --git a/testing/031/indexpage.xml b/testing/031/indexpage.xml new file mode 100644 index 0000000..a0297fa --- /dev/null +++ b/testing/031/indexpage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Some text. <image type="html" name="sample.png"/> + <image type="latex" name="sample.png" width="5cm">Doxygen logo</image> + More text. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/031_image.dox b/testing/031_image.dox new file mode 100644 index 0000000..96ba43b --- /dev/null +++ b/testing/031_image.dox @@ -0,0 +1,9 @@ +// objective: test the \image command +// check: indexpage.xml +// config: IMAGE_PATH = . +/** \mainpage + * Some text. + * \image html sample.png + * \image latex sample.png "Doxygen logo" width=5cm + * More text. + */ diff --git a/testing/032/indexpage.xml b/testing/032/indexpage.xml new file mode 100644 index 0000000..ba401c8 --- /dev/null +++ b/testing/032/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Some text. <programlisting><codeline><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>main()</highlight></codeline><codeline><highlight class="normal">{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>Test<sp/>t;</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>t.example();</highlight></codeline><codeline><highlight class="normal">}</highlight></codeline><codeline><highlight class="normal"/></codeline></programlisting> More text. <programlisting><codeline lineno="1"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>main()</highlight></codeline><codeline lineno="2"><highlight class="normal">{</highlight></codeline><codeline lineno="3"><highlight class="normal"><sp/><sp/>Test<sp/>t;</highlight></codeline><codeline lineno="4"><highlight class="normal"><sp/><sp/>t.example();</highlight></codeline><codeline lineno="5"><highlight class="normal">}</highlight></codeline><codeline lineno="6"><highlight class="normal"/></codeline></programlisting> End. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/032_include.cpp b/testing/032_include.cpp new file mode 100644 index 0000000..8aae8e9 --- /dev/null +++ b/testing/032_include.cpp @@ -0,0 +1,11 @@ +// objective: test the \include and \includelineno commands +// check: indexpage.xml +// config: EXAMPLE_PATH = . + +/** \mainpage + * Some text. + * \include example_test.cpp + * More text. + * \includelineno example_test.cpp + * End. + */ diff --git a/testing/033/indexpage.xml b/testing/033/indexpage.xml new file mode 100644 index 0000000..4b2f47d --- /dev/null +++ b/testing/033/indexpage.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Some text.</para> + <para>More visible text. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/033_internal.dox b/testing/033_internal.dox new file mode 100644 index 0000000..6e28f22 --- /dev/null +++ b/testing/033_internal.dox @@ -0,0 +1,12 @@ +// objective: test the \internal and \endinternal commands (1) +// check: indexpage.xml + +/** \mainpage + * Some text. + * \internal + * Internal text. + * \endinternal + * More visible text. + * \internal + * More internal text. + */ diff --git a/testing/034/indexpage.xml b/testing/034/indexpage.xml new file mode 100644 index 0000000..e994666 --- /dev/null +++ b/testing/034/indexpage.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Some text. </para> + <internal> + <para>Internal text. </para> + </internal> + <sect1 id="index_1s1"> + <title>A Section</title> + <para>Some text in the section 1. </para> + <internal> + <para>Internal text. </para> + <sect2 id="index_1ss1"> + <title>A Subsection</title> + <para>Some text in the subsection. </para> + </sect2> + </internal> + <para>Visible text in section 1. </para> + </sect1> + <sect1 id="index_1s2"> + <title>Another Section</title> + <para>Visible text. </para> + </sect1> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/034_internal.dox b/testing/034_internal.dox new file mode 100644 index 0000000..01587a9 --- /dev/null +++ b/testing/034_internal.dox @@ -0,0 +1,21 @@ +// objective: test the \internal and \endinternal commands (2) +// check: indexpage.xml +// config: INTERNAL_DOCS = YES + +/** \mainpage + * Some text. + * \internal + * Internal text. + * \endinternal + * \section s1 A Section + * Some text in the section 1. + * \internal + * Internal text. + * \subsection ss1 A Subsection + * Some text in the subsection. + * \endinternal + * Visible text in section 1. + * \section s2 Another Section + * Visible text. + */ + diff --git a/testing/035/035__invariant_8c.xml b/testing/035/035__invariant_8c.xml new file mode 100644 index 0000000..d036388 --- /dev/null +++ b/testing/035/035__invariant_8c.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="035__invariant_8c" kind="file"> + <compoundname>035_invariant.c</compoundname> + <sectiondef kind="func"> + <memberdef kind="function" id="035__invariant_8c_1a92e32ddd4278ab907422d5aaa34cb796" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void func</definition> + <argsstring>(int p, int *q)</argsstring> + <name>func</name> + <param> + <type>int</type> + <declname>p</declname> + </param> + <param> + <type>int *</type> + <declname>q</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para> + <simplesect kind="invariant"> + <para>i+j=p </para> + </simplesect> + <simplesect kind="pre"> + <para>p>=0 </para> + </simplesect> + <simplesect kind="post"> + <para>*q=2^(p+1) </para> + </simplesect> + </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="035_invariant.c" bodystart="10" bodyend="15"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <location file="035_invariant.c"/> + </compounddef> +</doxygen> diff --git a/testing/035_invariant.c b/testing/035_invariant.c new file mode 100644 index 0000000..28c08f8 --- /dev/null +++ b/testing/035_invariant.c @@ -0,0 +1,15 @@ +// objective: test \invariant, \pre and \post commands +// check: 035__invariant_8c.xml + +/** \file */ + +/** \invariant i+j=p + * \pre p\>=0 + * \post *q=2^(p+1) + */ +void func(int p,int *q) +{ + int j = p, k=1, i; + for (i=0; i<=p; i++) j--,k=k*2; + *q = k; +} diff --git a/testing/036/036__link_8c.xml b/testing/036/036__link_8c.xml new file mode 100644 index 0000000..4347d4b --- /dev/null +++ b/testing/036/036__link_8c.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="036__link_8c" kind="file"> + <compoundname>036_link.c</compoundname> + <innerclass refid="class_test" prot="public">Test</innerclass> + <sectiondef kind="func"> + <memberdef kind="function" id="036__link_8c_1affb6da6cff1b57cdf8efc0123dceac9b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void func</definition> + <argsstring>(int p)</argsstring> + <name>func</name> + <param> + <type>int</type> + <declname>p</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A function </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="036_link.c" line="11" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>See <ref refid="036__link_8c_1affb6da6cff1b57cdf8efc0123dceac9b" kindref="member">the function</ref> for more info. See the <ref refid="class_test" kindref="compound">test</ref> class. </para> + </detaileddescription> + <location file="036_link.c"/> + </compounddef> +</doxygen> diff --git a/testing/036_link.c b/testing/036_link.c new file mode 100644 index 0000000..901f660 --- /dev/null +++ b/testing/036_link.c @@ -0,0 +1,16 @@ +// objective: test \link command +// check: 036__link_8c.xml + +/** \file + * See \link func() the function\endlink for more info. + * See the \link Test test\endlink class. + */ + +/** A function + */ +void func(int p); + +/** A test */ +class Test +{ +}; diff --git a/testing/037/class_receiver.xml b/testing/037/class_receiver.xml new file mode 100644 index 0000000..eb37d47 --- /dev/null +++ b/testing/037/class_receiver.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_receiver" kind="class" prot="public"> + <compoundname>Receiver</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_receiver_1a162099741e0324e6254c9bc570566e40" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Receiver::Command</definition> + <argsstring>(int commandId)</argsstring> + <name>Command</name> + <param> + <type>int</type> + <declname>commandId</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Executable a command on the server </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="037_msc.cpp" line="32" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para><ref refid="class_receiver" kindref="compound">Receiver</ref> class. Can be used to receive and execute commands. After execution of a command, the receiver will send an acknowledgement <msc> + Receiver,Sender; + Receiver<-Sender [label="Command()", URL="\ref Command()"]; + Receiver->Sender [label="Ack()", URL="\ref Sender::Ack()", ID="1"]; +</msc> </para> + </detaileddescription> + <location file="037_msc.cpp" bodystart="28" bodyend="33"/> + <listofallmembers> + <member refid="class_receiver_1a162099741e0324e6254c9bc570566e40" prot="public" virt="non-virtual"> + <scope>Receiver</scope> + <name>Command</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/037/class_sender.xml b/testing/037/class_sender.xml new file mode 100644 index 0000000..117ed93 --- /dev/null +++ b/testing/037/class_sender.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_sender" kind="class" prot="public"> + <compoundname>Sender</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_sender_1a8ad2c6f9baa4e798868fe4a4d45f8fda" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Sender::Ack</definition> + <argsstring>(bool ok)</argsstring> + <name>Ack</name> + <param> + <type>bool</type> + <declname>ok</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Acknowledgement from server </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="037_msc.cpp" line="17" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para><ref refid="class_sender" kindref="compound">Sender</ref> class. Can be used to send a command to the server. The receiver will acknowledge the command by calling <ref refid="class_sender_1a8ad2c6f9baa4e798868fe4a4d45f8fda" kindref="member">Ack()</ref>. <msc> + Sender,Receiver; + Sender->Receiver [label="Command()", URL="\ref Receiver::Command()"]; + Sender<-Receiver [label="Ack()", URL="\ref Ack()", ID="1"]; +</msc> </para> + </detaileddescription> + <location file="037_msc.cpp" bodystart="13" bodyend="18"/> + <listofallmembers> + <member refid="class_sender_1a8ad2c6f9baa4e798868fe4a4d45f8fda" prot="public" virt="non-virtual"> + <scope>Sender</scope> + <name>Ack</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/037_msc.cpp b/testing/037_msc.cpp new file mode 100644 index 0000000..84ffc55 --- /dev/null +++ b/testing/037_msc.cpp @@ -0,0 +1,33 @@ +// objective: test the \msc and \endmsc commands +// check: class_sender.xml +// check: class_receiver.xml + +/** Sender class. Can be used to send a command to the server. + * The receiver will acknowledge the command by calling Ack(). + * \msc + * Sender,Receiver; + * Sender->Receiver [label="Command()", URL="\ref Receiver::Command()"]; + * Sender<-Receiver [label="Ack()", URL="\ref Ack()", ID="1"]; + * \endmsc + */ +class Sender +{ + public: + /** Acknowledgement from server */ + void Ack(bool ok); +}; + +/** Receiver class. Can be used to receive and execute commands. + * After execution of a command, the receiver will send an acknowledgement + * \msc + * Receiver,Sender; + * Receiver<-Sender [label="Command()", URL="\ref Command()"]; + * Receiver->Sender [label="Ack()", URL="\ref Sender::Ack()", ID="1"]; + * \endmsc + */ +class Receiver +{ + public: + /** Executable a command on the server */ + void Command(int commandId); +}; diff --git a/testing/038/indexpage.xml b/testing/038/indexpage.xml new file mode 100644 index 0000000..3657034 --- /dev/null +++ b/testing/038/indexpage.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Text<linebreak/> +New line<linebreak/> +Another line </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/038_n.dox b/testing/038_n.dox new file mode 100644 index 0000000..617743c --- /dev/null +++ b/testing/038_n.dox @@ -0,0 +1,7 @@ +// objective: test the \n command +// check: indexpage.xml +/** \mainpage +Text\n +New line\n +Another line +*/ diff --git a/testing/039/class_test.xml b/testing/039/class_test.xml new file mode 100644 index 0000000..3f38916 --- /dev/null +++ b/testing/039/class_test.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_test" kind="class" prot="public"> + <compoundname>Test</compoundname> + <sectiondef kind="user-defined"> + <header>A group of functions.</header> + <memberdef kind="function" id="class_test_1a09d1d148c3624a636b7590f8cf816a55" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Test::foo</definition> + <argsstring>()</argsstring> + <name>foo</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>foo function </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="039_name.cpp" line="16" column="1"/> + </memberdef> + <memberdef kind="function" id="class_test_1a78e37a450a276b60a5a2fa4a46c86f2e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Test::bar</definition> + <argsstring>()</argsstring> + <name>bar</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>bar function </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="039_name.cpp" line="18" column="1"/> + </memberdef> + </sectiondef> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_test_1a1a26b34cfe612dacf462b81f74235269" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Test::ungrouped</definition> + <argsstring>()</argsstring> + <name>ungrouped</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>ungrouped function </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="039_name.cpp" line="23" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + <para>A <ref refid="class_test" kindref="compound">Test</ref> class. </para> + </briefdescription> + <detaileddescription> + <para>More details about this class. </para> + </detaileddescription> + <location file="039_name.cpp" bodystart="8" bodyend="24"/> + <listofallmembers> + <member refid="class_test_1a78e37a450a276b60a5a2fa4a46c86f2e" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>bar</name> + </member> + <member refid="class_test_1a09d1d148c3624a636b7590f8cf816a55" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>foo</name> + </member> + <member refid="class_test_1a1a26b34cfe612dacf462b81f74235269" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>ungrouped</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/039_name.cpp b/testing/039_name.cpp new file mode 100644 index 0000000..f07b45c --- /dev/null +++ b/testing/039_name.cpp @@ -0,0 +1,25 @@ +// objective: test the \name and \short commands +// check: class_test.xml + +/** \short A Test class. + * + * More details about this class. + */ +class Test +{ + public: + /** \name A group of functions. + * \{ + */ + + /** foo function */ + void foo(); + /** bar function */ + void bar(); + + /** \} */ + + /** ungrouped function */ + void ungrouped(); +}; + diff --git a/testing/040/namespace_n_s.xml b/testing/040/namespace_n_s.xml new file mode 100644 index 0000000..14ffc26 --- /dev/null +++ b/testing/040/namespace_n_s.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="namespace_n_s" kind="namespace"> + <compoundname>NS</compoundname> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A namespace </para> + </detaileddescription> + <location file="040_namespace.cpp" line="5" column="1"/> + </compounddef> +</doxygen> diff --git a/testing/040_namespace.cpp b/testing/040_namespace.cpp new file mode 100644 index 0000000..a90f377 --- /dev/null +++ b/testing/040_namespace.cpp @@ -0,0 +1,10 @@ +// objective: test the \namespace command +// check: namespace_n_s.xml + +namespace NS +{ +} + +/** @namespace NS + * A namespace + */ diff --git a/testing/041/class_test.xml b/testing/041/class_test.xml new file mode 100644 index 0000000..294b67c --- /dev/null +++ b/testing/041/class_test.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_test" kind="class" prot="public"> + <compoundname>Test</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_test_1a8e7b46ceaf7bd2ab94114b390b3288ca" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Test::drawRect</definition> + <argsstring>(int, int, int, int)</argsstring> + <name>drawRect</name> + <param> + <type>int</type> + <defname>x</defname> + </param> + <param> + <type>int</type> + <defname>y</defname> + </param> + <param> + <type>int</type> + <defname>w</defname> + </param> + <param> + <type>int</type> + <defname>h</defname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>This command draws a rectangle with a left upper corner at ( <emphasis>x</emphasis> , <emphasis>y</emphasis> ), width <emphasis>w</emphasis> and height <emphasis>h</emphasis>. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="041_overload.cpp" bodystart="12" bodyend="12"/> + </memberdef> + <memberdef kind="function" id="class_test_1ae87a6e26707e684c0d2d07bb3d4a9d7f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Test::drawRect</definition> + <argsstring>(const Rect &r)</argsstring> + <name>drawRect</name> + <param> + <type>const Rect &</type> + <declname>r</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="041_overload.cpp" bodystart="13" bodyend="13"/> + </memberdef> + <memberdef kind="function" id="class_test_1a62a76eed05fa84633d1e460aeeaf875d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Test::drawRect</definition> + <argsstring>(const Point &topLeft, const Point &bottomRight)</argsstring> + <name>drawRect</name> + <param> + <type>const Point &</type> + <declname>topLeft</declname> + </param> + <param> + <type>const Point &</type> + <declname>bottomRight</declname> + </param> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</para> + <para>More text. </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="041_overload.cpp" bodystart="18" bodyend="18"/> + </memberdef> + </sectiondef> + <briefdescription> + <para>A short description. </para> + </briefdescription> + <detaileddescription> + <para>More text. </para> + </detaileddescription> + <location file="041_overload.cpp" bodystart="4" bodyend="10"/> + <listofallmembers> + <member refid="class_test_1a8e7b46ceaf7bd2ab94114b390b3288ca" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>drawRect</name> + </member> + <member refid="class_test_1ae87a6e26707e684c0d2d07bb3d4a9d7f" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>drawRect</name> + </member> + <member refid="class_test_1a62a76eed05fa84633d1e460aeeaf875d" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>drawRect</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/041_overload.cpp b/testing/041_overload.cpp new file mode 100644 index 0000000..e206acf --- /dev/null +++ b/testing/041_overload.cpp @@ -0,0 +1,33 @@ +// objective: test the \overload command +// check: class_test.xml + +class Test +{ + public: + void drawRect(int,int,int,int); + void drawRect(const Rect &r); + void drawRect(const Point &topLeft,const Point &bottomRight); +}; + +void Test::drawRect(int x,int y,int w,int h) {} +void Test::drawRect(const Rect &r) {} +/*! \overload + * + * More text. + */ +void Test::drawRect(const Point &topLeft,const Point &bottomRight) {} + +/*! \class Test + * \brief A short description. + * + * More text. + */ + +/*! \fn void Test::drawRect(int x,int y,int w,int h) + * This command draws a rectangle with a left upper corner at ( \a x , \a y ), + * width \a w and height \a h. + */ + +/*! + * \overload void Test::drawRect(const Rect &r) + */ diff --git a/testing/042/namespaceorg_1_1doxygen_1_1_test.xml b/testing/042/namespaceorg_1_1doxygen_1_1_test.xml new file mode 100644 index 0000000..b48c307 --- /dev/null +++ b/testing/042/namespaceorg_1_1doxygen_1_1_test.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="namespaceorg_1_1doxygen_1_1_test" kind="namespace"> + <compoundname>org::doxygen::Test</compoundname> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A test package. </para> + </detaileddescription> + <location file="042_package.java" line="4" column="1"/> + </compounddef> +</doxygen> diff --git a/testing/042_package.java b/testing/042_package.java new file mode 100644 index 0000000..f46d55c --- /dev/null +++ b/testing/042_package.java @@ -0,0 +1,8 @@ +// objective: test the \package command +// check: namespaceorg_1_1doxygen_1_1_test.xml + +package org.doxygen.Test; + +/** @package org.doxygen.Test + * A test package. + */ diff --git a/testing/043/another.xml b/testing/043/another.xml new file mode 100644 index 0000000..f403e8f --- /dev/null +++ b/testing/043/another.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="another" kind="page"> + <compoundname>another</compoundname> + <title>Another Page</title> + <detaileddescription> + <para>Another page's text. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/043/mypage.xml b/testing/043/mypage.xml new file mode 100644 index 0000000..efb09c7 --- /dev/null +++ b/testing/043/mypage.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="mypage" kind="page"> + <compoundname>mypage</compoundname> + <title>Page Title</title> + <innerpage refid="another">Another Page</innerpage> + <detaileddescription> + <para>Text at page level. See <ref refid="mypage_1mysect" kindref="member">Section Title.</ref> for more. </para> + <sect1 id="mypage_1mysect"> + <title>Section Title.</title> + <para>Text at section level. See <ref refid="mypage_1mysubsect" kindref="member">Subsection Title.</ref> for more. </para> + <sect2 id="mypage_1mysubsect"> + <title>Subsection Title.</title> + <para>Text at subsection level. see <ref refid="mypage_1mysubsubsect" kindref="member">Subsubsection Title.</ref> for more. </para> + <sect3 id="mypage_1mysubsubsect"> + <title>Subsubsection Title.</title> + <para>Text at subsubsection level. <ref refid="mypage_1mypara" kindref="member">Paragraph Title.</ref> for more. </para> + <sect4 id="mypage_1mypara"> + <title>Paragraph Title.</title> + <para>Text at paragraph level. <ref refid="mypage_1mysect2" kindref="member">Another Section Title.</ref> for more. </para> + </sect4> + </sect3> + </sect2> + </sect1> + <sect1 id="mypage_1mysect2"> + <title>Another Section Title.</title> + <para>Text at section level.</para> + <para> + <ref refid="another" kindref="compound">Another Page</ref> + </para> + </sect1> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/043_page.dox b/testing/043_page.dox new file mode 100644 index 0000000..784f58d --- /dev/null +++ b/testing/043_page.dox @@ -0,0 +1,22 @@ +// objective: test \page, \subpage, \*section, \paragraph, and \ref commands +// check: mypage.xml +// check: another.xml +/** \page mypage Page Title + * Text at page level. See \ref mysect for more. + * \section mysect Section Title. + * Text at section level. See \ref mysubsect for more. + * \subsection mysubsect Subsection Title. + * Text at subsection level. see \ref mysubsubsect for more. + * \subsubsection mysubsubsect Subsubsection Title. + * Text at subsubsection level. \ref mypara for more. + * \paragraph mypara Paragraph Title. + * Text at paragraph level. \ref mysect2 for more. + * \section mysect2 Another Section Title. + * Text at section level. + * + * \subpage another + */ + +/** \page another Another Page + * Another page's text. + */ diff --git a/testing/044/struct_s.xml b/testing/044/struct_s.xml new file mode 100644 index 0000000..9505f8c --- /dev/null +++ b/testing/044/struct_s.xml @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="struct_s" kind="struct" prot="public"> + <compoundname>S</compoundname> + <includes refid="044__section_8h" local="no">044_section.h</includes> + <sectiondef kind="public-attrib"> + <memberdef kind="variable" id="struct_s_1aff6062601582dff52ace76d285c2e504" prot="public" static="no" mutable="no"> + <type>int</type> + <definition>int S::pub1</definition> + <argsstring/> + <name>pub1</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>public field </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="044_section.h" bodystart="10" bodyend="-1"/> + </memberdef> + <memberdef kind="variable" id="struct_s_1a413054db7785010db38c16322c8583cc" prot="public" static="no" mutable="no"> + <type>int</type> + <definition>int S::pub2</definition> + <argsstring/> + <name>pub2</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>another public field </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="044_section.h" bodystart="12" bodyend="-1"/> + </memberdef> + </sectiondef> + <sectiondef kind="protected-attrib"> + <memberdef kind="variable" id="struct_s_1ac506df106f05b04ac31b3b6ae1357067" prot="protected" static="no" mutable="no"> + <type>int</type> + <definition>int S::pro1</definition> + <argsstring/> + <name>pro1</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>protected field </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="044_section.h" bodystart="17" bodyend="-1"/> + </memberdef> + <memberdef kind="variable" id="struct_s_1a0c535a6122f4ae509a336e3a67f927a4" prot="protected" static="no" mutable="no"> + <type>int</type> + <definition>int S::pro2</definition> + <argsstring/> + <name>pro2</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>another protected field </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="044_section.h" bodystart="19" bodyend="-1"/> + </memberdef> + </sectiondef> + <sectiondef kind="private-attrib"> + <memberdef kind="variable" id="struct_s_1ab754fee7e3500035f644d0ac528cbfc3" prot="private" static="no" mutable="no"> + <type>int</type> + <definition>int S::pri1</definition> + <argsstring/> + <name>pri1</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>private field </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="044_section.h" bodystart="24" bodyend="-1"/> + </memberdef> + <memberdef kind="variable" id="struct_s_1a4b26822a09bcd6b946702e99280826ff" prot="private" static="no" mutable="no"> + <type>int</type> + <definition>int S::pri2</definition> + <argsstring/> + <name>pri2</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>another private field </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="044_section.h" bodystart="26" bodyend="-1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A struct </para> + </detaileddescription> + <location file="044_section.h" bodystart="5" bodyend="27"/> + <listofallmembers> + <member refid="struct_s_1ab754fee7e3500035f644d0ac528cbfc3" prot="private" virt="non-virtual"> + <scope>S</scope> + <name>pri1</name> + </member> + <member refid="struct_s_1a4b26822a09bcd6b946702e99280826ff" prot="private" virt="non-virtual"> + <scope>S</scope> + <name>pri2</name> + </member> + <member refid="struct_s_1ac506df106f05b04ac31b3b6ae1357067" prot="protected" virt="non-virtual"> + <scope>S</scope> + <name>pro1</name> + </member> + <member refid="struct_s_1a0c535a6122f4ae509a336e3a67f927a4" prot="protected" virt="non-virtual"> + <scope>S</scope> + <name>pro2</name> + </member> + <member refid="struct_s_1aff6062601582dff52ace76d285c2e504" prot="public" virt="non-virtual"> + <scope>S</scope> + <name>pub1</name> + </member> + <member refid="struct_s_1a413054db7785010db38c16322c8583cc" prot="public" virt="non-virtual"> + <scope>S</scope> + <name>pub2</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/044_section.h b/testing/044_section.h new file mode 100644 index 0000000..ef48051 --- /dev/null +++ b/testing/044_section.h @@ -0,0 +1,28 @@ +// objective: test the \(public|protected|private)section commands +// check: struct_s.xml + +/** A struct */ +struct S +{ + /** \publicsection */ + + /** public field */ + int pub1; + /** another public field */ + int pub2; + + /** \protectedsection */ + + /** protected field */ + int pro1; + /** another protected field */ + int pro2; + + /** \privatesection */ + + /** private field */ + int pri1; + /** another private field */ + int pri2; +}; + diff --git a/testing/045/indexpage.xml b/testing/045/indexpage.xml new file mode 100644 index 0000000..75de4ab --- /dev/null +++ b/testing/045/indexpage.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para> + <toclist> + <tocitem id="index_1item1">First Item</tocitem> + <tocitem id="item2_1item2">Second Item</tocitem> + <tocitem id="item2_1item3">Third Item</tocitem> + </toclist> + </para> + <para>Some filler text.</para> + <sect1 id="index_1item1"> + <title>First Section</title> + <para>Section 1 text. </para> + </sect1> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/045_refitem.dox b/testing/045_refitem.dox new file mode 100644 index 0000000..a6ba13b --- /dev/null +++ b/testing/045_refitem.dox @@ -0,0 +1,20 @@ +// objective: test \refitem, \secreflist, \endsecreflist +// check: indexpage.xml +/** \mainpage + * \secreflist + * \refitem item1 First Item + * \refitem item2 Second Item + * \refitem item3 Third Item + * \endsecreflist + * + * Some filler text. + * + * \section item1 First Section + * Section 1 text. + */ + +/** \page item2 A page + * Some text. + * \section item3 Another Section. + * Section 2 text. + */ diff --git a/testing/046/046__related_8cpp.xml b/testing/046/046__related_8cpp.xml new file mode 100644 index 0000000..0291e84 --- /dev/null +++ b/testing/046/046__related_8cpp.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="046__related_8cpp" kind="file"> + <compoundname>046_related.cpp</compoundname> + <innerclass refid="class_test" prot="public">Test</innerclass> + <sectiondef kind="func"> + <memberdef kind="function" id="046__related_8cpp_1a1283d836e0611ff772c1b06a31ecbbfe" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void another</definition> + <argsstring>()</argsstring> + <name>another</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Another function </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="046_related.cpp" line="28" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <location file="046_related.cpp"/> + </compounddef> +</doxygen> diff --git a/testing/046/class_test.xml b/testing/046/class_test.xml new file mode 100644 index 0000000..3c631ab --- /dev/null +++ b/testing/046/class_test.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="class_test" kind="class" prot="public"> + <compoundname>Test</compoundname> + <sectiondef kind="public-func"> + <memberdef kind="function" id="class_test_1a1683da699dc049d74101488d143c8e98" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void Test::method</definition> + <argsstring>()</argsstring> + <name>method</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A method </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="046_related.cpp" line="14" column="1"/> + </memberdef> + </sectiondef> + <sectiondef kind="related"> + <memberdef kind="function" id="class_test_1a51a683fa4fcec142ab1574e00a7b6860" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void function</definition> + <argsstring>()</argsstring> + <name>function</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A function.</para> + <para> + <simplesect kind="see"> + <para> + <ref refid="class_test_1a1283d836e0611ff772c1b06a31ecbbfe" kindref="member">another()</ref> + </para> + </simplesect> + </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="046_related.cpp" line="22" column="1"/> + </memberdef> + <memberdef kind="function" id="class_test_1a1283d836e0611ff772c1b06a31ecbbfe" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>void</type> + <definition>void another</definition> + <argsstring>()</argsstring> + <name>another</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Another function </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="046_related.cpp" line="28" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>A test class <simplesect kind="see"><para><ref refid="class_test_1a1683da699dc049d74101488d143c8e98" kindref="member">Test::method()</ref></para></simplesect> +</para> + </detaileddescription> + <location file="046_related.cpp" bodystart="10" bodyend="15"/> + <listofallmembers> + <member refid="class_test_1a1283d836e0611ff772c1b06a31ecbbfe" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>another</name> + </member> + <member refid="class_test_1a51a683fa4fcec142ab1574e00a7b6860" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>function</name> + </member> + <member refid="class_test_1a1683da699dc049d74101488d143c8e98" prot="public" virt="non-virtual"> + <scope>Test</scope> + <name>method</name> + </member> + </listofallmembers> + </compounddef> +</doxygen> diff --git a/testing/046_related.cpp b/testing/046_related.cpp new file mode 100644 index 0000000..a8deb5a --- /dev/null +++ b/testing/046_related.cpp @@ -0,0 +1,28 @@ +// objective: test the \related, \relatedalso, \see, and \sa commands +// check: class_test.xml +// check: 046__related_8cpp.xml + +/** @file */ + +/** A test class + * @see Test::method() + */ +class Test +{ + public: + /** A method */ + void method(); +}; + +/*! + * A function. + * \related Test + * \sa another() + */ +void function(); + +/*! + * Another function + * \relatedalso Test + */ +void another(); diff --git a/testing/047/047__return_8cpp.xml b/testing/047/047__return_8cpp.xml new file mode 100644 index 0000000..2ed45d1 --- /dev/null +++ b/testing/047/047__return_8cpp.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="047__return_8cpp" kind="file"> + <compoundname>047_return.cpp</compoundname> + <sectiondef kind="func"> + <memberdef kind="function" id="047__return_8cpp_1aab0ee031d46db05d47213d2625ab6aac" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>int</type> + <definition>int func1</definition> + <argsstring>()</argsstring> + <name>func1</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Test function 1. <simplesect kind="return"><para>A integer. </para></simplesect> +</para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="047_return.cpp" line="9" column="1"/> + </memberdef> + <memberdef kind="function" id="047__return_8cpp_1aa1d4878589351db8276c79f98ed9fb7d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>int</type> + <definition>int func2</definition> + <argsstring>()</argsstring> + <name>func2</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Test function 2. <simplesect kind="return"><para>A integer. </para></simplesect> +</para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="047_return.cpp" line="14" column="1"/> + </memberdef> + <memberdef kind="function" id="047__return_8cpp_1abee09dd9ed9ce93df5a931d16faac09a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> + <type>int</type> + <definition>int func3</definition> + <argsstring>()</argsstring> + <name>func3</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>Test function 3. <simplesect kind="return"><para>A integer. </para></simplesect> +</para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="047_return.cpp" line="19" column="1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <location file="047_return.cpp"/> + </compounddef> +</doxygen> diff --git a/testing/047_return.cpp b/testing/047_return.cpp new file mode 100644 index 0000000..7585986 --- /dev/null +++ b/testing/047_return.cpp @@ -0,0 +1,20 @@ +// objective: test the \result, \return, and \returns commands +// check: 047__return_8cpp.xml + +/** \file */ + +/** Test function 1. + * \result A integer. + */ +int func1(); + +/** Test function 2. + * \return A integer. + */ +int func2(); + +/** Test function 3. + * \returns A integer. + */ +int func3(); + diff --git a/testing/048/048__showinit_8c.xml b/testing/048/048__showinit_8c.xml new file mode 100644 index 0000000..a44ccb9 --- /dev/null +++ b/testing/048/048__showinit_8c.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="048__showinit_8c" kind="file"> + <compoundname>048_showinit.c</compoundname> + <sectiondef kind="var"> + <memberdef kind="variable" id="048__showinit_8c_1a799f44203647e4c53bdb0386aa95680f" prot="public" static="no" mutable="no"> + <type>int</type> + <definition>int var1</definition> + <argsstring/> + <name>var1</name> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>a variable with initializer hidden due to MAX_INITIALIZER_LINES </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="048_showinit.c" bodystart="8" bodyend="-1"/> + </memberdef> + <memberdef kind="variable" id="048__showinit_8c_1ac0da06d47d79ad4b9fb1c0eaf1118c3f" prot="public" static="no" mutable="no"> + <type>int</type> + <definition>int var2</definition> + <argsstring/> + <name>var2</name> + <initializer>= 20</initializer> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>a variable with initializer visible </para> + </detaileddescription> + <inbodydescription> + </inbodydescription> + <location file="048_showinit.c" bodystart="13" bodyend="-1"/> + </memberdef> + </sectiondef> + <briefdescription> + </briefdescription> + <detaileddescription> + </detaileddescription> + <location file="048_showinit.c"/> + </compounddef> +</doxygen> diff --git a/testing/048_showinit.c b/testing/048_showinit.c new file mode 100644 index 0000000..a37865d --- /dev/null +++ b/testing/048_showinit.c @@ -0,0 +1,13 @@ +// objective: test the \showinit command +// check: 048__showinit_8c.xml +// config: MAX_INITIALIZER_LINES = 0 + +/** \file */ + +/** a variable with initializer hidden due to MAX_INITIALIZER_LINES */ +int var1 = 10; + +/** a variable with initializer visible + * \showinitializer + */ +int var2 = 20; diff --git a/testing/049/indexpage.xml b/testing/049/indexpage.xml new file mode 100644 index 0000000..0f3a63b --- /dev/null +++ b/testing/049/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>A bubble sort algoritm First get the inputs <programlisting><codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0<sp/>;<sp/>i<n<sp/>;<sp/>i++)</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">"<sp/>Array[%d]<sp/>=<sp/>"</highlight><highlight class="normal">,i);</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/>scanf(</highlight><highlight class="stringliteral">"%d"</highlight><highlight class="normal">,&arr[i]);</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>}</highlight></codeline></programlisting>Then do the bubbling <programlisting><codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0<sp/>;<sp/>i<n<sp/>;<sp/>i++)</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(j=0<sp/>;<sp/>j<n-i-1<sp/>;<sp/>j++)</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(arr[j]>arr[j+1])<sp/></highlight><highlight class="comment">//Swapping<sp/>Condition<sp/>is<sp/>Checked</highlight><highlight class="normal"/></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>temp=arr[j];</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>arr[j]=arr[j+1];</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>arr[j+1]=temp;</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>}</highlight></codeline></programlisting>Then write the result <programlisting><codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0<sp/>;<sp/>i<n<sp/>;<sp/>i++)</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>{</highlight></codeline><codeline><highlight class="normal"><sp/><sp/><sp/><sp/>printf(</highlight><highlight class="stringliteral">"<sp/>%4d"</highlight><highlight class="normal">,arr[i]);</highlight></codeline><codeline><highlight class="normal"><sp/><sp/>}</highlight></codeline></programlisting></para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/049_snippet.cpp b/testing/049_snippet.cpp new file mode 100644 index 0000000..2749a62 --- /dev/null +++ b/testing/049_snippet.cpp @@ -0,0 +1,13 @@ +// objective: test the \snippet command +// check: indexpage.xml +// config: EXAMPLE_PATH = . + +/** \mainpage + * A bubble sort algoritm + * First get the inputs + * \snippet snippet_test.cpp input + * Then do the bubbling + * \snippet snippet_test.cpp bubble + * Then write the result + * \snippet snippet_test.cpp output + */ diff --git a/testing/050/indexpage.xml b/testing/050/indexpage.xml new file mode 100644 index 0000000..73b6d4f --- /dev/null +++ b/testing/050/indexpage.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Some normal text. <verbatim>A verbatim section with a /* C comment */ in it +</verbatim> Showing a file as verbatim <verbatim>@book{knuth79, + author = "Donald E. Knuth", + title = "Tex and Metafont, New Directions in Typesetting", + year = "1979", + publisher = "American Mathematical Society and Digital Press", + address = "Stanford" +} +</verbatim> More text after the verbatim section. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/050_verbatim.dox b/testing/050_verbatim.dox new file mode 100644 index 0000000..0ff315f --- /dev/null +++ b/testing/050_verbatim.dox @@ -0,0 +1,14 @@ +// objective: test \verbatim and \verbinclude commands +// check: indexpage.xml +// config: EXAMPLE_PATH = . +/** +\mainpage +Some normal text. +\verbatim +A verbatim section with a /* C comment */ in it +\endverbatim +Showing a file as verbatim +\verbinclude sample.bib +More text after the verbatim section. + +*/ diff --git a/testing/051/indexpage.xml b/testing/051/indexpage.xml new file mode 100644 index 0000000..4f13f56 --- /dev/null +++ b/testing/051/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Dollar $ At @ Backslash \ Amphasand & Less < Greater > Hash # Percent % Quote " Dot . Double colon :: Pipe | </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/051_escape.dox b/testing/051_escape.dox new file mode 100644 index 0000000..1497ad1 --- /dev/null +++ b/testing/051_escape.dox @@ -0,0 +1,18 @@ +// objective: test various characters that should be escaped +// check: indexpage.xml +/** +\mainpage +Dollar \$ +At \@ +Backslash \\ +Amphasand \& +Less \< +Greater \> +Hash \# +Percent \% +Quote \" +Dot \. +Double colon \:: +Pipe \| + +*/ diff --git a/testing/052/indexpage.xml b/testing/052/indexpage.xml new file mode 100644 index 0000000..792bee4 --- /dev/null +++ b/testing/052/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>This is English. Output for all languages. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/052_tilde.dox b/testing/052_tilde.dox new file mode 100644 index 0000000..81a8c9b --- /dev/null +++ b/testing/052_tilde.dox @@ -0,0 +1,9 @@ +// objective: test \~ command +// check: indexpage.xml +/** +\mainpage +\~english This is English. +\~dutch Dit is Nederlands. +\~german Dies ist Deutsch. +\~ Output for all languages. +*/ diff --git a/testing/053/indexpage.xml b/testing/053/indexpage.xml new file mode 100644 index 0000000..828fe96 --- /dev/null +++ b/testing/053/indexpage.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Dit is Nederlands. Output for all languages. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/053_tilde.dox b/testing/053_tilde.dox new file mode 100644 index 0000000..73cafa3 --- /dev/null +++ b/testing/053_tilde.dox @@ -0,0 +1,10 @@ +// objective: test \~ command with non default OUTPUT_LANGUAGE +// check: indexpage.xml +// config: OUTPUT_LANGUAGE = Dutch +/** +\mainpage +\~english This is English. +\~dutch Dit is Nederlands. +\~german Dies ist Deutsch. +\~ Output for all languages. +*/ diff --git a/testing/Doxyfile b/testing/Doxyfile new file mode 100644 index 0000000..f478ab3 --- /dev/null +++ b/testing/Doxyfile @@ -0,0 +1,6 @@ +# start with defaults +QUIET = YES +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_XML = YES +XML_PROGRAMLISTING = NO diff --git a/testing/README b/testing/README new file mode 100644 index 0000000..993ff48 --- /dev/null +++ b/testing/README @@ -0,0 +1,48 @@ +Doxygen regession test suite +============================ + +This directory contains a set of regression tests. Each test consists of a +file starting with a 3 digit number and a corresponding directory whose name +has the same 3 digit number. The directory contains one or more reference +files that are compared against the XML output produced by doxygen. If the +result is the same, there is no regression and the test passes. If there is a +difference the test fails and the difference (in diff -u format) will be shown. + +The runtest.pl script responsible for running the tests takes a number of +optional parameters: +-id n: run test with number n only (the option may be specified + multiple times) default is to run all tests. +-updateref: update the reference files. Should be used in combination + with -id to update the reference file(s) for the given test. +-all: can be used in combination with -updateref to update the + reference files for all tests. +-doxygen exe: run the specified doxygen executable. +-xmllint exe: run the specified xmllint executable. + +The runtest.pl has the following dependenies on 3rd party tools: +- perl to run the script +- xmllint to normalize the XML output +- diff to show the differences in case a test fails + +Each test file can have a number of special comment lines that are extracted by +the runtest.pl script and take the form: +// <identifier>: 'argument' +Where <identifier> can be one of: +- objective: 'argument' provides the objective for the test (i.e. its purpose) +- check: 'argument' names a file that is generated by doxygen, which should + be compared against the reference. +- config: 'argument' is a line that is added to the default Doxyfile used to + run doxygen on the test file. + +Example to run all tests: + perl runtest.pl + +Example to run a test + perl runtest.pl -id 10 + +Example to update the reference files for a test + perl runtest.pl -updateref -id 10 + +There is also a Makefile, which can be used to run all tests by simply +invoking make. + diff --git a/testing/example_test.cpp b/testing/example_test.cpp new file mode 100644 index 0000000..f589023 --- /dev/null +++ b/testing/example_test.cpp @@ -0,0 +1,6 @@ +void main() +{ + Test t; + t.example(); +} + diff --git a/testing/runtests.pl b/testing/runtests.pl new file mode 100755 index 0000000..bbbd1be --- /dev/null +++ b/testing/runtests.pl @@ -0,0 +1,252 @@ +#!/usr/bin/perl + +# perl script to execute doxygen's regression test suite. +# +# Copyright (C) 1997-2013 by Dimitri van Heesch. +# +# Permission to use, copy, modify, and distribute this software and its +# documentation under the terms of the GNU General Public License is hereby +# granted. No representations are made about the suitability of this software +# for any purpose. It is provided "as is" without express or implied warranty. +# See the GNU General Public License for more details. +# +# Documents produced by Doxygen are derivative works derived from the +# input used in their production; they are not affected by this license. + +use strict; +use warnings; + +use Getopt::Long; +use Test::More; +use File::Path qw(make_path remove_tree); +use File::Copy qw(copy); + +my $Test = Test::Builder->new; +my $opt_doxygen_exe = 'doxygen'; +my $opt_xmllint_exe = 'xmllint'; +my $opt_updateref = ''; +my @opt_test_ids; +my $opt_all = ''; + +GetOptions( 'updateref' => \$opt_updateref, + 'doxygen=s' => \$opt_doxygen_exe, + 'xmllint=s' => \$opt_xmllint_exe, + 'id=i' => \@opt_test_ids, + 'all' => \$opt_all + ); + +sub read_two_files { + my $first = shift; + my $second = shift; + my $filter = shift; + my $success = 1; + my @errors; + + unless (open FIRST, "$first") { + $success = 0; + push @errors, "$first absent"; + } + unless (open SECOND, "$second") { + $success = 0; + push @errors, "$second absent"; + } + return ($success, @errors) unless $success; + + my $first_lines = join "",<FIRST>; + my $second_lines = join "",<SECOND>; + + close FIRST; + close SECOND; + + return ($success, $first_lines, $second_lines); +} + +sub compare_ok { + my $got_file = shift; + my $expected_file = shift; + my $name = shift; + my @read_result = read_two_files($got_file, $expected_file); + my $files_exist = shift @read_result; + + if ($files_exist) { + my ($got, $expected) = @read_result; + my $diff = `diff -u $got_file $expected_file`; + my $failed = length $diff; + return ($failed,"Difference between generated output and reference:\n$diff"); + } + else { + return (1,join "\n", @read_result); + } +} + +sub chop_volatile { + my $line = shift; + $line =~ s/version="\d\.\d.\d+"/version=""/g; # strip version + $line =~ s/file=".*\/(.*)"/file="$1"/g; # strip location + return $line; +} + +sub get_config { + my $file = shift; + my %config; + open F,"<$file"; + while (<F>) { + if (/\/\/\s*(\S+):\s*(.*)$/) { + my $key = $1; + my $val = $2; + chomp $val; + $config{$key} = [] unless defined $config{$key}; + push @{$config{$key}},$val; + } + } + return %config; +} + +sub perform_test { + my $test_file = shift; + my %config = get_config($test_file); + my $test_name = "[$test_file]: $config{'objective'}[0]"; + my $test_id = $test_file; + $test_id =~ s/^(\d+).*$/$1/; + my $test_out = "test_output_${test_id}"; + + if (scalar($config{'check'})==0) { + $Test->ok(0, $test_name); + $Test->diag("Test doesn't specify any files to check"); + return; + } + + # prepare test environment + remove_tree("$test_out"); + make_path("$test_out"); + copy("Doxyfile","$test_out"); + open(F,">>$test_out/Doxyfile"); + print F "INPUT = $test_file\n"; + print F "XML_OUTPUT = $test_out/out\n"; + foreach my $cfg (@{$config{'config'}}) { + print F "$cfg\n"; + } + close(F); + + # run doxygen + if (system("$opt_doxygen_exe $test_out/Doxyfile")!=0) { + $Test->ok(0, $test_name); + $Test->diag("Failed to run doxygen"); + return; + } + + # look for files to check against the reference + foreach my $fn (@{$config{'check'}}) { + if (!-f "$test_out/out/$fn") { + $Test->ok(0, $test_name); + $Test->diag("Non-existing file $test_out/out/$fn after 'check:' statement"); + return; + } + # run xmllint on the output file + my @lines = `$opt_xmllint_exe --format --noblanks --nowarning $test_out/out/$fn`; + if (scalar(@lines)>0 && open(F,">$test_out/$fn")) { + foreach my $line (@lines) { + print F chop_volatile($line); + } + close(F); + } else { + $Test->ok(0, $test_name); + $Test->diag("Failed to run xmllint on the doxygen output file $test_out/out/$fn"); + } + my ($failed,$msg) = compare_ok("$test_out/$fn","$test_id/$fn",$test_name); + if ($failed) { + $Test->ok(0, $test_name); + $Test->diag($msg); + return; + } + } + + # test passed + remove_tree("$test_out"); + $Test->ok(1, $test_name); +} + +sub update_test { + my $test_file = shift; + my %config = get_config($test_file); + my $test_name = "[$test_file]: $config{'objective'}[0]"; + my $test_id = $test_file; + $test_id =~ s/^(\d+).*$/$1/; + my $test_out = $test_id; + + # prepare reference environment + remove_tree("$test_out"); + make_path("$test_out"); + copy("Doxyfile","$test_out"); + open(F,">>$test_out/Doxyfile"); + print F "INPUT = $test_file\n"; + print F "XML_OUTPUT = $test_out/out\n"; + foreach my $cfg (@{$config{'config'}}) { + print F "$cfg\n"; + } + close(F); + + print "Updating reference for $test_name\n"; + + # run doxygen + if (system("$opt_doxygen_exe $test_out/Doxyfile")!=0) { + print("Error: failed to run doxygen"); + return; + } + my $err=0; + + # look for files to prepare as reference + foreach my $fn (@{$config{'check'}}) { + if (!-f "$test_out/out/$fn") { + printf("Error: Non-existing file $test_out/out/$fn after 'check:' statement\n"); + $err=1; + } + # run xmllint on the output file + if (!$err) { + my @lines = `$opt_xmllint_exe --format --noblanks --nowarning $test_out/out/$fn`; + if (scalar(@lines)>0 && open(F,">$test_out/$fn")) { + foreach my $line (@lines) { + print F chop_volatile($line); + } + close(F); + } else { + printf("Error: Failed to run xmllint on the doxygen output file $test_out/out/$fn\n"); + $err=1; + } + } + } + + if (!$err) { + # clean-up + remove_tree("$test_out/out"); + unlink("$test_out/Doxyfile"); + } +} + +# get the tests +my @tests; +if (scalar(@opt_test_ids)==0 && $opt_updateref && !$opt_all) { + printf("Error: updateref option requires -id to update a test or -all to update all\n"); + exit(1); +} +if (scalar(@opt_test_ids)>0) { + foreach my $t (@opt_test_ids) { + push @tests, glob("${t}_* 0${t}_* 00${t}_*"); + } +} else { + @tests = glob('[0-9][0-9][0-9]_*'); +} + +if ($opt_updateref) { + # update reference + foreach my $test (@tests) { + update_test($test); + } +} else { + # run tests + plan tests => scalar(@tests); + foreach my $test (@tests) { + perform_test($test); + } +} + diff --git a/testing/sample.bib b/testing/sample.bib new file mode 100644 index 0000000..436e8cd --- /dev/null +++ b/testing/sample.bib @@ -0,0 +1,7 @@ +@book{knuth79, + author = "Donald E. Knuth", + title = "Tex and Metafont, New Directions in Typesetting", + year = "1979", + publisher = "American Mathematical Society and Digital Press", + address = "Stanford" +} diff --git a/testing/sample.html b/testing/sample.html new file mode 100644 index 0000000..159202e --- /dev/null +++ b/testing/sample.html @@ -0,0 +1 @@ +<h1>Hello world</h1> diff --git a/testing/sample.png b/testing/sample.png Binary files differnew file mode 100644 index 0000000..3ff17d8 --- /dev/null +++ b/testing/sample.png diff --git a/testing/snippet_test.cpp b/testing/snippet_test.cpp new file mode 100644 index 0000000..763f6be --- /dev/null +++ b/testing/snippet_test.cpp @@ -0,0 +1,41 @@ +#include <stdio.h> +#include <stdlib.h> + +void main() +{ + int i,n,temp,j,arr[25]; + printf("Enter the number of elements in the Array: "); + scanf("%d",&n); + printf("\nEnter the elements:\n\n"); + + /* [input] */ + for(i=0 ; i<n ; i++) + { + printf(" Array[%d] = ",i); + scanf("%d",&arr[i]); + } + /* [input] */ + + // [bubble] + for(i=0 ; i<n ; i++) + { + for(j=0 ; j<n-i-1 ; j++) + { + if(arr[j]>arr[j+1]) //Swapping Condition is Checked + { + temp=arr[j]; + arr[j]=arr[j+1]; + arr[j+1]=temp; + } + } + } + // [bubble] + + printf("\nThe Sorted Array is:\n\n"); + /* [output] */ + for(i=0 ; i<n ; i++) + { + printf(" %4d",arr[i]); + } + /* [output] */ +} |