diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-16 19:17:52 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-21 03:06:27 +0200 |
| commit | 325ffb76f6a02f81a27fafe94e863aa8cc71b25a (patch) | |
| tree | 1fac1f4a4a8222ef3b1860b6903bc90b8b270509 /validation/doc | |
| parent | a6c549b2e17333a385e6d9eb3962a05471b56985 (diff) | |
| download | sparse-dev-325ffb76f6a02f81a27fafe94e863aa8cc71b25a.tar.gz | |
autodoc: add autodoc tests in the testsuite
It's certainly worth to have some tests but to not
slow down the testsuite and to not create a dependency
on python this test need to be run explicitely with:
./test-suite doc/cdoc.cdoc
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/doc')
| -rw-r--r-- | validation/doc/cdoc.cdoc | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/validation/doc/cdoc.cdoc b/validation/doc/cdoc.cdoc new file mode 100644 index 00000000..f2d99ab9 --- /dev/null +++ b/validation/doc/cdoc.cdoc @@ -0,0 +1,177 @@ +/// +// Title +// ----- + +/// +// short description +int a(int param, int arg); + +/// +// short description +// longer description +int b(int param, int arg); + +/// +// short description +// +// longer description with empty line +int c(int param, int arg); + +/// +// short description +// longer description +// which needs two lines +int d(int param, int arg); + +/// +// short description +// +// longer description with empty line +// which needs two lines +int e(int param, int arg); + +/// +// condensed format +// @param: desc param +// @arg: desc arg +// @return: desc return +// longer description +int f(int param, int arg); + +/// +// more airy format +// +// @param: desc param +// @arg: desc arg +// @return: desc return +// +// longer description +int g(int param, int arg); + +/// +// short description +// @return: ``1`` if @param is zero, +// ``0`` otherwise. +int h(int param, int arg); + +/// +// short description +// @return: +// * ``1`` if @param is zero, +// * ``0`` otherwise. +int i(int param, int arg); + +/// +// short description +int m(int param, int arg) +{ return 0; } + +/// +// short description +int n(int param, + int arg) +{ return 0; } + +/// +// short description +int o(int param, int arg); + +/// +// short description +int p(int param, + int arg); + + +/* + * check-name: cdoc + * check-command: Documentation/sphinx/cdoc.py < $file + * + * check-output-start + 2: Title + 3: ----- + 4: + 4: + 5: + 7: .. c:function:: int a(int param, int arg) + 8: + 6: Short description. + 7: + 12: .. c:function:: int b(int param, int arg) + 13: + 10: Short description. + 11: + 11: longer description + 12: + 18: .. c:function:: int c(int param, int arg) + 19: + 15: Short description. + 16: + 17: longer description with empty line + 18: + 24: .. c:function:: int d(int param, int arg) + 25: + 21: Short description. + 22: + 22: longer description + 23: which needs two lines + 24: + 31: .. c:function:: int e(int param, int arg) + 32: + 27: Short description. + 28: + 29: longer description with empty line + 30: which needs two lines + 31: + 39: .. c:function:: int f(int param, int arg) + 40: + 34: Condensed format. + 35: + 35: :param param: desc param + 36: :param arg: desc arg + 37: :return: desc return + 38: + 38: longer description + 39: + 49: .. c:function:: int g(int param, int arg) + 50: + 42: More airy format. + 43: + 44: :param param: desc param + 45: :param arg: desc arg + 46: :return: desc return + 47: + 48: longer description + 49: + 55: .. c:function:: int h(int param, int arg) + 56: + 52: Short description. + 53: + 53: :return: ``1`` if **param** is zero, + 54: ``0`` otherwise. + 54: + 62: .. c:function:: int i(int param, int arg) + 63: + 58: Short description. + 59: + 59: :return: + 60: * ``1`` if **param** is zero, + 61: * ``0`` otherwise. + 60: + 66: .. c:function:: int m(int param, int arg) + 67: + 65: Short description. + 66: + 71: .. c:function:: int n(int param, int arg) + 72: + 70: Short description. + 71: + 77: .. c:function:: int o(int param, int arg) + 78: + 76: Short description. + 77: + 81: .. c:function:: int p(int param, int arg) + 82: + 80: Short description. + 81: + * check-output-end + */ |
