From 5875da6cae352bbcbe64f537ccfcfab08ad98b3f Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Fri, 19 Jul 2013 21:46:35 +0200 Subject: Added regression test suite --- testing/001/indexpage.xml | 10 + testing/001_a.dox | 5 + testing/002/indexpage.xml | 15 ++ testing/002_addindex.dox | 5 + testing/003/indexpage.xml | 10 + testing/003_anchor.dox | 8 + testing/004/indexpage.xml | 13 ++ testing/004_arg.dox | 15 ++ testing/005/indexpage.xml | 35 +++ testing/005_attention.dox | 14 ++ testing/006/indexpage.xml | 25 +++ testing/006_author.dox | 9 + testing/007/indexpage.xml | 10 + testing/007_b.dox | 5 + testing/008/008__brief_8c.xml | 13 ++ testing/008_brief.c | 7 + testing/009/bug.xml | 26 +++ testing/009/class_bug.xml | 43 ++++ testing/009/class_deprecated.xml | 41 ++++ testing/009/class_reminder.xml | 48 +++++ testing/009/class_test.xml | 48 +++++ testing/009/class_todo.xml | 48 +++++ testing/009/deprecated.xml | 25 +++ testing/009/reminders.xml | 25 +++ testing/009/test.xml | 25 +++ testing/009/todo.xml | 25 +++ testing/009_bug.cpp | 62 ++++++ testing/010/indexpage.xml | 11 + testing/010_c.dox | 7 + testing/011/category_integer_07_arithmetic_08.xml | 60 ++++++ testing/011/interface_integer.xml | 99 +++++++++ testing/011_category.m | 30 +++ testing/012/citelist.xml | 20 ++ testing/012/indexpage.xml | 10 + testing/012_cite.dox | 7 + testing/013/class_t1.xml | 15 ++ testing/013/class_t2.xml | 15 ++ testing/013/class_t3.xml | 15 ++ testing/013/class_t4.xml | 15 ++ testing/013_class.h | 37 ++++ testing/014/indexpage.xml | 48 +++++ testing/014_code.dox | 14 ++ testing/015/015__cond_8c.xml | 26 +++ testing/015_cond.c | 30 +++ testing/016/016__copydoc_8c.xml | 76 +++++++ testing/016_copydoc.c | 23 ++ testing/017/indexpage.xml | 17 ++ testing/017_copyright.dox | 6 + testing/018/018__def_8c.xml | 125 +++++++++++ testing/018_def.c | 37 ++++ testing/019/group__g1.xml | 28 +++ testing/019/group__g2.xml | 29 +++ testing/019/group__g3.xml | 42 ++++ testing/019_defgroup.c | 48 +++++ testing/020/indexpage.xml | 22 ++ testing/020_only.dox | 24 +++ testing/021/indexpage.xml | 10 + testing/021_dontinclude.cpp | 24 +++ testing/022/indexpage.xml | 17 ++ testing/022_dot.cpp | 22 ++ testing/023/indexpage.xml | 10 + testing/023_e.dox | 5 + testing/024/indexpage.xml | 10 + testing/024_if.dox | 21 ++ testing/025/class_test.xml | 36 ++++ testing/025/example_test_8cpp-example.xml | 10 + testing/025_example.cpp | 26 +++ testing/026/class_test.xml | 52 +++++ testing/026_exception.cpp | 21 ++ testing/027/struct_car.xml | 95 ++++++++ testing/027/struct_object.xml | 105 +++++++++ testing/027/struct_truck.xml | 95 ++++++++ testing/027/struct_vehicle.xml | 132 ++++++++++++ testing/027_extends.c | 93 ++++++++ testing/028/indexpage.xml | 11 + testing/028_formula.c | 17 ++ testing/029/029__hideinit_8c.xml | 42 ++++ testing/029_hideinit.c | 12 ++ testing/030/indexpage.xml | 11 + testing/030_htmlinclude.dox | 8 + testing/031/indexpage.xml | 12 ++ testing/031_image.dox | 9 + testing/032/indexpage.xml | 10 + testing/032_include.cpp | 11 + testing/033/indexpage.xml | 11 + testing/033_internal.dox | 12 ++ testing/034/indexpage.xml | 29 +++ testing/034_internal.dox | 21 ++ testing/035/035__invariant_8c.xml | 45 ++++ testing/035_invariant.c | 15 ++ testing/036/036__link_8c.xml | 33 +++ testing/036_link.c | 16 ++ testing/037/class_receiver.xml | 42 ++++ testing/037/class_sender.xml | 42 ++++ testing/037_msc.cpp | 33 +++ testing/038/indexpage.xml | 12 ++ testing/038_n.dox | 7 + testing/039/class_test.xml | 74 +++++++ testing/039_name.cpp | 25 +++ testing/040/namespace_n_s.xml | 12 ++ testing/040_namespace.cpp | 10 + testing/041/class_test.xml | 100 +++++++++ testing/041_overload.cpp | 33 +++ testing/042/namespaceorg_1_1doxygen_1_1_test.xml | 12 ++ testing/042_package.java | 8 + testing/043/another.xml | 10 + testing/043/mypage.xml | 34 +++ testing/043_page.dox | 22 ++ testing/044/struct_s.xml | 129 +++++++++++ testing/044_section.h | 28 +++ testing/045/indexpage.xml | 21 ++ testing/045_refitem.dox | 20 ++ testing/046/046__related_8cpp.xml | 28 +++ testing/046/class_test.xml | 80 +++++++ testing/046_related.cpp | 28 +++ testing/047/047__return_8cpp.xml | 58 +++++ testing/047_return.cpp | 20 ++ testing/048/048__showinit_8c.xml | 42 ++++ testing/048_showinit.c | 13 ++ testing/049/indexpage.xml | 10 + testing/049_snippet.cpp | 13 ++ testing/050/indexpage.xml | 18 ++ testing/050_verbatim.dox | 14 ++ testing/051/indexpage.xml | 10 + testing/051_escape.dox | 18 ++ testing/052/indexpage.xml | 10 + testing/052_tilde.dox | 9 + testing/053/indexpage.xml | 10 + testing/053_tilde.dox | 10 + testing/Doxyfile | 6 + testing/README | 48 +++++ testing/example_test.cpp | 6 + testing/runtests.pl | 252 ++++++++++++++++++++++ testing/sample.bib | 7 + testing/sample.html | 1 + testing/sample.png | Bin 0 -> 3779 bytes testing/snippet_test.cpp | 41 ++++ 137 files changed, 4086 insertions(+) create mode 100644 testing/001/indexpage.xml create mode 100644 testing/001_a.dox create mode 100644 testing/002/indexpage.xml create mode 100644 testing/002_addindex.dox create mode 100644 testing/003/indexpage.xml create mode 100644 testing/003_anchor.dox create mode 100644 testing/004/indexpage.xml create mode 100644 testing/004_arg.dox create mode 100644 testing/005/indexpage.xml create mode 100644 testing/005_attention.dox create mode 100644 testing/006/indexpage.xml create mode 100644 testing/006_author.dox create mode 100644 testing/007/indexpage.xml create mode 100644 testing/007_b.dox create mode 100644 testing/008/008__brief_8c.xml create mode 100644 testing/008_brief.c create mode 100644 testing/009/bug.xml create mode 100644 testing/009/class_bug.xml create mode 100644 testing/009/class_deprecated.xml create mode 100644 testing/009/class_reminder.xml create mode 100644 testing/009/class_test.xml create mode 100644 testing/009/class_todo.xml create mode 100644 testing/009/deprecated.xml create mode 100644 testing/009/reminders.xml create mode 100644 testing/009/test.xml create mode 100644 testing/009/todo.xml create mode 100644 testing/009_bug.cpp create mode 100644 testing/010/indexpage.xml create mode 100644 testing/010_c.dox create mode 100644 testing/011/category_integer_07_arithmetic_08.xml create mode 100644 testing/011/interface_integer.xml create mode 100644 testing/011_category.m create mode 100644 testing/012/citelist.xml create mode 100644 testing/012/indexpage.xml create mode 100644 testing/012_cite.dox create mode 100644 testing/013/class_t1.xml create mode 100644 testing/013/class_t2.xml create mode 100644 testing/013/class_t3.xml create mode 100644 testing/013/class_t4.xml create mode 100644 testing/013_class.h create mode 100644 testing/014/indexpage.xml create mode 100644 testing/014_code.dox create mode 100644 testing/015/015__cond_8c.xml create mode 100644 testing/015_cond.c create mode 100644 testing/016/016__copydoc_8c.xml create mode 100644 testing/016_copydoc.c create mode 100644 testing/017/indexpage.xml create mode 100644 testing/017_copyright.dox create mode 100644 testing/018/018__def_8c.xml create mode 100644 testing/018_def.c create mode 100644 testing/019/group__g1.xml create mode 100644 testing/019/group__g2.xml create mode 100644 testing/019/group__g3.xml create mode 100644 testing/019_defgroup.c create mode 100644 testing/020/indexpage.xml create mode 100644 testing/020_only.dox create mode 100644 testing/021/indexpage.xml create mode 100644 testing/021_dontinclude.cpp create mode 100644 testing/022/indexpage.xml create mode 100644 testing/022_dot.cpp create mode 100644 testing/023/indexpage.xml create mode 100644 testing/023_e.dox create mode 100644 testing/024/indexpage.xml create mode 100644 testing/024_if.dox create mode 100644 testing/025/class_test.xml create mode 100644 testing/025/example_test_8cpp-example.xml create mode 100644 testing/025_example.cpp create mode 100644 testing/026/class_test.xml create mode 100644 testing/026_exception.cpp create mode 100644 testing/027/struct_car.xml create mode 100644 testing/027/struct_object.xml create mode 100644 testing/027/struct_truck.xml create mode 100644 testing/027/struct_vehicle.xml create mode 100644 testing/027_extends.c create mode 100644 testing/028/indexpage.xml create mode 100644 testing/028_formula.c create mode 100644 testing/029/029__hideinit_8c.xml create mode 100644 testing/029_hideinit.c create mode 100644 testing/030/indexpage.xml create mode 100644 testing/030_htmlinclude.dox create mode 100644 testing/031/indexpage.xml create mode 100644 testing/031_image.dox create mode 100644 testing/032/indexpage.xml create mode 100644 testing/032_include.cpp create mode 100644 testing/033/indexpage.xml create mode 100644 testing/033_internal.dox create mode 100644 testing/034/indexpage.xml create mode 100644 testing/034_internal.dox create mode 100644 testing/035/035__invariant_8c.xml create mode 100644 testing/035_invariant.c create mode 100644 testing/036/036__link_8c.xml create mode 100644 testing/036_link.c create mode 100644 testing/037/class_receiver.xml create mode 100644 testing/037/class_sender.xml create mode 100644 testing/037_msc.cpp create mode 100644 testing/038/indexpage.xml create mode 100644 testing/038_n.dox create mode 100644 testing/039/class_test.xml create mode 100644 testing/039_name.cpp create mode 100644 testing/040/namespace_n_s.xml create mode 100644 testing/040_namespace.cpp create mode 100644 testing/041/class_test.xml create mode 100644 testing/041_overload.cpp create mode 100644 testing/042/namespaceorg_1_1doxygen_1_1_test.xml create mode 100644 testing/042_package.java create mode 100644 testing/043/another.xml create mode 100644 testing/043/mypage.xml create mode 100644 testing/043_page.dox create mode 100644 testing/044/struct_s.xml create mode 100644 testing/044_section.h create mode 100644 testing/045/indexpage.xml create mode 100644 testing/045_refitem.dox create mode 100644 testing/046/046__related_8cpp.xml create mode 100644 testing/046/class_test.xml create mode 100644 testing/046_related.cpp create mode 100644 testing/047/047__return_8cpp.xml create mode 100644 testing/047_return.cpp create mode 100644 testing/048/048__showinit_8c.xml create mode 100644 testing/048_showinit.c create mode 100644 testing/049/indexpage.xml create mode 100644 testing/049_snippet.cpp create mode 100644 testing/050/indexpage.xml create mode 100644 testing/050_verbatim.dox create mode 100644 testing/051/indexpage.xml create mode 100644 testing/051_escape.dox create mode 100644 testing/052/indexpage.xml create mode 100644 testing/052_tilde.dox create mode 100644 testing/053/indexpage.xml create mode 100644 testing/053_tilde.dox create mode 100644 testing/Doxyfile create mode 100644 testing/README create mode 100644 testing/example_test.cpp create mode 100755 testing/runtests.pl create mode 100644 testing/sample.bib create mode 100644 testing/sample.html create mode 100644 testing/sample.png create mode 100644 testing/snippet_test.cpp 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 @@ + + + + index + My Project + + Text argument more text. + + + 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 @@ + + + + index + My Project + + + + keyword + + + + + + 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 @@ + + + + index + My Project + + See Anchor Some text. More text. + + + 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 @@ + + + + index + My Project + + AlignLeft left alignment. AlignCenter center alignment. AlignRight right alignment +No other types of alignment are supported. + AlignLeft left alignment. AlignCenter center alignment. AlignRight right alignment +No other types of alignment are supported. + + + 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 @@ + + + + index + My Project + + + + Attention message. + + + Something to note. + + + A remark. + + + A warning message. + + + + <para>Second paragraph </para> + </simplesect> + <simplesect kind="par"> + <title>User defined paragraph. + Contents of paragraph. + + + + <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 + + + + John Doe + + Jane Doe + + + David, Steven + + + version 1.2 + + + 1.8-beta2 + + + + + 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 @@ + + + + index + My Project + + Text bold normal text. + + + 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 @@ + + + + 008_brief.c + + A brief description. + + + More details. + + + + 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 @@ + + + + bug + Bug List + + + + + Class Bug + + + Class bug. + + + Member Bug::foo () + + + Function buglist item 1 in buglist item 2 in bug + + + + + + + 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 @@ + + + + Bug + + + void + void Bug::foo + () + foo + + + + Description BugFunction buglist item 1 in buglist item 2 in bug + + More text. + + + + + + + + + + + + Bug + + Class bug. + + + + + + + + Bug + foo + + + + 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 @@ + + + + Deprecated + + + void + void Deprecated::deprecated + () + deprecated + + + + Do deprecated things. DeprecatedNo not use this function anymore. + + + + + + + + + + + + Deprecated + + This class is deprecated + + + + + + + + Deprecated + deprecated + + + + 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 @@ + + + + Reminder + + + void + void Reminder::reminder + () + reminder + + + + + + Reminder + + Need to rework this before the next release. + + + + + + + + + + + + + + + Reminder + + A reminder + + + + + + + + Reminder + reminder + + + + 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 @@ + + + + Test + + + void + void Test::test + () + test + + + + + + Test + + more things to test. + + + + + + + + + + + + + + + Test + + This is part of testing + + + + + + + + Test + test + + + + 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 @@ + + + + Todo + + + void + void Todo::todo + () + todo + + + + + + Todo + + more things to do here + + + + + + + + + + + + + + + Todo + + This still needs to be done. + + + + + + + + Todo + todo + + + + 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 @@ + + + + deprecated + Deprecated List + + + + + Class Deprecated + + + This class is deprecated + + + Member Deprecated::deprecated () + + + No not use this function anymore. + + + + + + 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 @@ + + + + reminders + Reminders + + + + + Class Reminder + + + A reminder + + + Member Reminder::reminder () + + + Need to rework this before the next release. + + + + + + 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 @@ + + + + test + Test List + + + + + Class Test + + + This is part of testing + + + Member Test::test () + + + more things to test. + + + + + + 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 @@ + + + + todo + Todo List + + + + + Class Todo + + + This still needs to be done. + + + Member Todo::todo () + + + more things to do here + + + + + + 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 @@ + + + + index + My Project + + Text code normal text. + Text code normal text. + + + 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 @@ + + + + Integer(Arithmetic) + + + id + id Integer(Arithmetic)::add: + (Integer *addend) + add: + + Integer * + addend + + + + + add operation + + + + + + + id + id Integer(Arithmetic)::sub: + (Integer *subtrahend) + sub: + + Integer * + subtrahend + + + + + substract operation + + + + + + + + + + A category + + + + + Integer(Arithmetic) + add: + + + Integer(Arithmetic) + sub: + + + + 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 @@ + + + + Integer + Object + + + int + int Integer::integer + + integer + + + + data member + + + + + + + + + int + int Integer::integer + () + integer + + + + getter + + + + + + + id + id Integer::integer: + (int _integer) + integer: + + int + _integer + + + + + setter + + + + + + + + + + An interface + + + + + + + + + + + + + + + + + + + + + + + + + + + Integer + integer + + + Integer + integer + + + Integer + integer: + + + + 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 + +@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 @@ + + + + citelist + Bibliographic References + + + + + [1] + + + DonaldE. Knuth. Tex and Metafont, New Directions in Typesetting. American Mathematical Society and Digital Press, Stanford, 1979. + + + + + + + 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 @@ + + + + index + My Project + + See [1] for more info. + + + 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 @@ + + + + T1 + inc/013_class.h + + + + A class + + + + + + 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 @@ + + + + T2 + 013_class.h + + + + class T2 + + + + + + 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 @@ + + + + T3 + 013_class.h + + + + class T3 + + + + + + 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 @@ + + + + T4 + inc/013_class.h + + + + class T4 + + + + + + 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 @@ + + + + index + My Project + + + + + * + #commentinPython + + + + * + class + Python: + + + * + pass + + + + * + + + + + + + * + //commentinacodeblock + + + + * + class + Cpp{}; + + + * + + + + + + 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 @@ + + + + 015_cond.c + + + void + void cond_enabled + () + cond_enabled + + + + + + + + + + + + + + + + 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 @@ + + + + 016_copydoc.c + + + void + void func + (int i) + func + + int + i + + + Brief description. + + + Detailed description. + + + + + + + void + void func_brief + () + func_brief + + Brief description. + + + + + + + + + void + void func_details + () + func_details + + + + Detailed description. + + + + + + + void + void func_doc + () + func_doc + + Brief description. + + + Detailed description. More text. + + + + + + + + + + Text argument more text. + + + + 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 @@ + + + + index + My Project + + + + Dimitri van Heesch + + + July 13 2013 + + + + + 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 @@ + + + + 018_def.c + + + MACRO + 42 + + + + A macro definition + + + + + + + + + E + + E1 + + + + + + + E2 + + + + + + + + + An enum + + + + + + + + + int + Type + + Type + + + + A type definition. + + + + + + + + + int + var + + var + = 10 + + + + A variable + + + + + + + + + void + func + (int) + func + + int + + + + + A function with one parameter. + + + + + + + void + func + (int, const char *) + func + + int + + + const char * + + + + + A function with two parameters + + + + + + + + + + Text argument more text. + + + + 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 @@ + + + + g1 + First Group + + + void + void func_g1 + () + func_g1 + + + + A function in the first group. + + + + + + + + + + Text for first group. + + + 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 @@ + + + + g2 + Second Group + Third Group + + + void + void func_g2 + () + func_g2 + + + + A function in the second group + + + + + + + + + + Text for second group. + + + 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 @@ + + + + g3 + Third Group + + + void + void func_g3 + () + func_g3 + + + + A function in the third group + + + + + + + void + void func_g3_add + () + func_g3_add + + + + Another function added to the third group + + + + + + + + + + Text for third group. + + + 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 @@ + + + + index + My Project + + Text. +HTML + +RTF + +Man + +LaTeX + +XML + +DocBook + More text. + + + 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 @@ + + + + index + My Project + + Our main function starts like this: First we create a object t of the Test class. *Firstwecreateaobject\ctoftheTestclass. Then we call the example member function After that our little test routine ends. + + + 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 @@ + + + + index + My Project + + Class relations expressed via an inline dot graph: +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" ]; +} + + + + 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 @@ + + + + index + My Project + + Normal emphasis and more emphasis back to normal. + + + 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 @@ + + + + index + My Project + + Unconditional (start) Enabled (if). Enabled (else). Unconditional (middle) Enabled (else). Unconditional (end) + + + 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 @@ + + + + Test + + + void + void Test::example + () + example + + An example member function. + + + More details about this function. + + + + + + + + A Test class. + + + More details about this class. + + + + + Test + example + + + + 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 @@ + + + + example_test.cpp + + This is an example of how to use the Test class. + More details about this example. voidmain(){Testt;t.example();} + + + 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 @@ + + + + Test + + + class T + + + + + int + int Test< T >::example + (int p1, int p2) + example + + int + p1 + + + int + p2 + + throw (std::out_of_range) + + + + An example member function. p1First parameter. p2Second parameter. +std::out_of_rangeparameter is out of range. +0if p1 and p2 are equal -1if p1 is smaller than p2 1if p1 is bigger than p2 + + + + + + + + + + + A Test class. More details about this class. TA template parameter. + + + + + + Test + example + + + + 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 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 @@ + + + + Car + Vehicle + + + + Vehicle + + Vehicle Car::base + + base + + Base class. + + + + + + + + + + + + Car class. + + + + + + + + + + + + + + + + + + + + + + + + + + + base + + + + + + + + + + + + + base + + + + + + + Car + base + + + Car + objRef + + + Car + objUnref + + + Car + vehicleStart + + + Car + vehicleStop + + + + 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 @@ + + + + Object + Vehicle + + + int + int Object::ref + + ref + + Reference count. + + + + + + + + + + + Object * + static Object * objRef + (Object *obj) + objRef + + Object * + obj + + + + + Increments object reference count by one. + + + + + + + Object * + static Object * objUnref + (Object *obj) + objUnref + + Object * + obj + + + + + Decrements object reference count by one. + + + + + + + + + + Base object class. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Object + objRef + + + Object + objUnref + + + Object + ref + + + + 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 @@ + + + + Truck + Vehicle + + + + Vehicle + + Vehicle Truck::base + + base + + Base class. + + + + + + + + + + + + Truck class. + + + + + + + + + + + + + + + + + + + + + + + + + + + base + + + + + + + + + base + + + + + + + + + + + Truck + base + + + Truck + objRef + + + Truck + objUnref + + + Truck + vehicleStart + + + Truck + vehicleStop + + + + 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 @@ + + + + Vehicle + Object + Car + Truck + + + + Object + + Object Vehicle::base + + base + + Base class. + + + + + + + + + + + void + void vehicleStart + (Vehicle *obj) + vehicleStart + + Vehicle * + obj + + + + + Starts the vehicle. + + + + + + + void + void vehicleStop + (Vehicle *obj) + vehicleStop + + Vehicle * + obj + + + + + Stops the vehicle. + + + + + + + + + + Vehicle class. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + base + + + + + + + + + + + Vehicle + base + + + Vehicle + objRef + + + Vehicle + objUnref + + + Vehicle + vehicleStart + + + Vehicle + vehicleStop + + + + 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 @@ + + + + index + My Project + + Here are some formulas:The distance between $(x_1,y_1)$ and $(x_2,y_2)$ is $\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$.Unnumbered formula: \[ |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 in different environment \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*} + + + + 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 @@ + + + + 029_hideinit.c + + + int + int var1 + + var1 + = 10 + + + + a variable with initializer visible + + + + + + + int + int var2 + + var2 + + + + a variable without initializer visible + + + + + + + + + + + + + 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 @@ + + + + index + My Project + + Some text. <h1>Hello world</h1> + More text. + + + 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 @@ + + + + index + My Project + + Some text. + Doxygen logo + More text. + + + 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 @@ + + + + index + My Project + + Some text. voidmain(){Testt;t.example();} More text. voidmain(){Testt;t.example();} End. + + + 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 @@ + + + + index + My Project + + Some text. + More visible text. + + + 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 @@ + + + + index + My Project + + Some text. + + Internal text. + + + A Section + Some text in the section 1. + + Internal text. + + A Subsection + Some text in the subsection. + + + Visible text in section 1. + + + Another Section + Visible text. + + + + 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 @@ + + + + 035_invariant.c + + + void + void func + (int p, int *q) + func + + int + p + + + int * + q + + + + + + + i+j=p + + + p>=0 + + + *q=2^(p+1) + + + + + + + + + + + + + + + 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 @@ + + + + 036_link.c + Test + + + void + void func + (int p) + func + + int + p + + + + + A function + + + + + + + + + + See the function for more info. See the test class. + + + + 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 @@ + + + + Receiver + + + void + void Receiver::Command + (int commandId) + Command + + int + commandId + + + + + Executable a command on the server + + + + + + + + + + Receiver class. Can be used to receive and execute commands. After execution of a command, the receiver will send an acknowledgement + Receiver,Sender; + Receiver<-Sender [label="Command()", URL="\ref Command()"]; + Receiver->Sender [label="Ack()", URL="\ref Sender::Ack()", ID="1"]; + + + + + + Receiver + Command + + + + 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 @@ + + + + Sender + + + void + void Sender::Ack + (bool ok) + Ack + + bool + ok + + + + + Acknowledgement from server + + + + + + + + + + Sender class. Can be used to send a command to the server. The receiver will acknowledge the command by calling Ack(). + Sender,Receiver; + Sender->Receiver [label="Command()", URL="\ref Receiver::Command()"]; + Sender<-Receiver [label="Ack()", URL="\ref Ack()", ID="1"]; + + + + + + Sender + Ack + + + + 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 @@ + + + + index + My Project + + Text +New line +Another line + + + 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 @@ + + + + Test + +
A group of functions.
+ + void + void Test::foo + () + foo + + + + foo function + + + + + + + void + void Test::bar + () + bar + + + + bar function + + + + + +
+ + + void + void Test::ungrouped + () + ungrouped + + + + ungrouped function + + + + + + + + A Test class. + + + More details about this class. + + + + + Test + bar + + + Test + foo + + + Test + ungrouped + + +
+
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 @@ + + + + NS + + + + A namespace + + + + 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 @@ + + + + Test + + + void + void Test::drawRect + (int, int, int, int) + drawRect + + int + x + + + int + y + + + int + w + + + int + h + + + + + This command draws a rectangle with a left upper corner at ( x , y ), width w and height h. + + + + + + + void + void Test::drawRect + (const Rect &r) + drawRect + + const Rect & + r + + + + + This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. + + + + + + + void + void Test::drawRect + (const Point &topLeft, const Point &bottomRight) + drawRect + + const Point & + topLeft + + + const Point & + bottomRight + + + + + This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. + More text. + + + + + + + + A short description. + + + More text. + + + + + Test + drawRect + + + Test + drawRect + + + Test + drawRect + + + + 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 @@ + + + + org::doxygen::Test + + + + A test package. + + + + 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 @@ + + + + another + Another Page + + Another page's text. + + + 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 @@ + + + + mypage + Page Title + Another Page + + Text at page level. See Section Title. for more. + + Section Title. + Text at section level. See Subsection Title. for more. + + Subsection Title. + Text at subsection level. see Subsubsection Title. for more. + + Subsubsection Title. + Text at subsubsection level. Paragraph Title. for more. + + Paragraph Title. + Text at paragraph level. Another Section Title. for more. + + + + + + Another Section Title. + Text at section level. + + Another Page + + + + + 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 @@ + + + + S + 044_section.h + + + int + int S::pub1 + + pub1 + + + + public field + + + + + + + int + int S::pub2 + + pub2 + + + + another public field + + + + + + + + + int + int S::pro1 + + pro1 + + + + protected field + + + + + + + int + int S::pro2 + + pro2 + + + + another protected field + + + + + + + + + int + int S::pri1 + + pri1 + + + + private field + + + + + + + int + int S::pri2 + + pri2 + + + + another private field + + + + + + + + + + A struct + + + + + S + pri1 + + + S + pri2 + + + S + pro1 + + + S + pro2 + + + S + pub1 + + + S + pub2 + + + + 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 @@ + + + + index + My Project + + + + First Item + Second Item + Third Item + + + Some filler text. + + First Section + Section 1 text. + + + + 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 @@ + + + + 046_related.cpp + Test + + + void + void another + () + another + + + + Another function + + + + + + + + + + + + + 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 @@ + + + + Test + + + void + void Test::method + () + method + + + + A method + + + + + + + + + void + void function + () + function + + + + A function. + + + + another() + + + + + + + + + + void + void another + () + another + + + + Another function + + + + + + + + + + A test class Test::method() + + + + + + Test + another + + + Test + function + + + Test + method + + + + 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 @@ + + + + 047_return.cpp + + + int + int func1 + () + func1 + + + + Test function 1. A integer. + + + + + + + + int + int func2 + () + func2 + + + + Test function 2. A integer. + + + + + + + + int + int func3 + () + func3 + + + + Test function 3. A integer. + + + + + + + + + + + + + + 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 @@ + + + + 048_showinit.c + + + int + int var1 + + var1 + + + + a variable with initializer hidden due to MAX_INITIALIZER_LINES + + + + + + + int + int var2 + + var2 + = 20 + + + + a variable with initializer visible + + + + + + + + + + + + + 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 @@ + + + + index + My Project + + A bubble sort algoritm First get the inputs for(i=0;i<n;i++){printf("Array[%d]=",i);scanf("%d",&arr[i]);}Then do the bubbling for(i=0;i<n;i++){for(j=0;j<n-i-1;j++){if(arr[j]>arr[j+1])//SwappingConditionisChecked{temp=arr[j];arr[j]=arr[j+1];arr[j+1]=temp;}}}Then write the result for(i=0;i<n;i++){printf("%4d",arr[i]);} + + + 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 @@ + + + + index + My Project + + Some normal text. A verbatim section with a /* C comment */ in it + Showing a file as 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" +} + More text after the verbatim section. + + + 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 @@ + + + + index + My Project + + Dollar $ At @ Backslash \ Amphasand & Less < Greater > Hash # Percent % Quote " Dot . Double colon :: Pipe | + + + 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 @@ + + + + index + My Project + + This is English. Output for all languages. + + + 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 @@ + + + + index + My Project + + Dit is Nederlands. Output for all languages. + + + 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: +// : 'argument' +Where 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 "",; + my $second_lines = join "",; + + 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 () { + 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 @@ +

Hello world

diff --git a/testing/sample.png b/testing/sample.png new file mode 100644 index 0000000..3ff17d8 Binary files /dev/null and b/testing/sample.png differ 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 +#include + +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 ; iarr[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