diff --git a/test/c/autostruct.rst b/test/c/autostruct.rst index af8f9c22..617c30d8 100644 --- a/test/c/autostruct.rst +++ b/test/c/autostruct.rst @@ -29,7 +29,7 @@ Named struct. - .. c:struct:: @anonymous_0a4d6f0b47cde0e9872b6dbde2ad1c1a + .. c:struct:: @anonymous_a63d10331be1a527625db63b8ace540f Anonymous sub-struct. @@ -39,7 +39,7 @@ Member foo. - .. c:union:: @anonymous_22cf17aa0fa6d83246282a58013db249 + .. c:union:: @anonymous_69382278a84175c1cbff40d522114b38 Anonymous sub-union. diff --git a/test/c/bool.c b/test/c/bool.c new file mode 100644 index 00000000..e62719ba --- /dev/null +++ b/test/c/bool.c @@ -0,0 +1,32 @@ +#include + +/** + * Retain bool instead of using _Bool. + */ +static bool convert_bool; + +/** + * Also convert _Bool to bool. + */ +static _Bool convert_Bool; + +/** + * Bool function. + */ +bool boolean(bool bar, _Bool baz); + +/** + * This is a sample struct + * + * Woohoo. + */ +struct sample_struct { + /** + * bool member + */ + bool bool_member; + /** + * _Bool member + */ + _Bool _Bool_member; +}; diff --git a/test/c/bool.rst b/test/c/bool.rst new file mode 100644 index 00000000..91332b5c --- /dev/null +++ b/test/c/bool.rst @@ -0,0 +1,32 @@ + +.. c:var:: static bool convert_bool + + Retain bool instead of using _Bool. + + +.. c:var:: static bool convert_Bool + + Also convert _Bool to bool. + + +.. c:function:: bool boolean(bool bar, bool baz) + + Bool function. + + +.. c:struct:: sample_struct + + This is a sample struct + + Woohoo. + + + .. c:member:: bool bool_member + + bool member + + + .. c:member:: bool _Bool_member + + _Bool member + diff --git a/test/c/bool.yaml b/test/c/bool.yaml new file mode 100644 index 00000000..5144885b --- /dev/null +++ b/test/c/bool.yaml @@ -0,0 +1,6 @@ +directives: +- domain: c + directive: autodoc + arguments: + - bool.c +expected: bool.rst diff --git a/test/c/function.c b/test/c/function.c index a41052ea..efb30b7d 100644 --- a/test/c/function.c +++ b/test/c/function.c @@ -1,15 +1,8 @@ -#include - /** * Foo function. */ static inline int foo(int bar, int baz); -/** - * Bool function. - */ -bool boolean(bool bar, _Bool baz); - /** * No parameters. */ diff --git a/test/c/function.rst b/test/c/function.rst index 855fa486..2c9ac6f0 100644 --- a/test/c/function.rst +++ b/test/c/function.rst @@ -4,11 +4,6 @@ Foo function. -.. c:function:: bool boolean(bool bar, bool baz) - - Bool function. - - .. c:function:: int no_parameters(void) No parameters. diff --git a/test/c/struct.c b/test/c/struct.c index 18e092d2..c70bd14f 100644 --- a/test/c/struct.c +++ b/test/c/struct.c @@ -1,5 +1,3 @@ -#include - /** * This is a sample struct * @@ -10,14 +8,6 @@ struct sample_struct { * member */ int jesh; - /** - * bool member - */ - bool bool_member; - /** - * _Bool member - */ - _Bool _Bool_member; /** * array member */ diff --git a/test/c/struct.rst b/test/c/struct.rst index 57ab2f4e..508e9627 100644 --- a/test/c/struct.rst +++ b/test/c/struct.rst @@ -11,16 +11,6 @@ member - .. c:member:: bool bool_member - - bool member - - - .. c:member:: bool _Bool_member - - _Bool member - - .. c:member:: int array_member[5] array member @@ -49,7 +39,7 @@ foo next -.. c:struct:: @anonymous_a6168a23d6840e8919ade5661a307607 +.. c:struct:: @anonymous_7bf120438d254a91e1275b973de6a0eb Anonymous struct documentation. @@ -64,7 +54,7 @@ Named struct. - .. c:struct:: @anonymous_0a4d6f0b47cde0e9872b6dbde2ad1c1a + .. c:struct:: @anonymous_a63d10331be1a527625db63b8ace540f Anonymous sub-struct. @@ -74,7 +64,7 @@ Member foo. - .. c:union:: @anonymous_22cf17aa0fa6d83246282a58013db249 + .. c:union:: @anonymous_69382278a84175c1cbff40d522114b38 Anonymous sub-union. diff --git a/test/c/variable.c b/test/c/variable.c index ae154c2c..3a5360a7 100644 --- a/test/c/variable.c +++ b/test/c/variable.c @@ -1,20 +1,8 @@ -#include - /** * This is a variable document. */ static int sheesh; -/** - * Retain bool instead of using _Bool. - */ -static bool convert_bool; - -/** - * Also convert _Bool to bool. - */ -static _Bool convert_Bool; - /** * function pointer variable */ diff --git a/test/c/variable.rst b/test/c/variable.rst index 9229053a..9b7dc9fd 100644 --- a/test/c/variable.rst +++ b/test/c/variable.rst @@ -4,16 +4,6 @@ This is a variable document. -.. c:var:: static bool convert_bool - - Retain bool instead of using _Bool. - - -.. c:var:: static bool convert_Bool - - Also convert _Bool to bool. - - .. c:var:: int (*function_pointer_variable)(int *param_name_ignored) function pointer variable diff --git a/test/cpp/function.rst b/test/cpp/function.rst index 09304423..48f3059c 100644 --- a/test/cpp/function.rst +++ b/test/cpp/function.rst @@ -4,11 +4,6 @@ Foo function. -.. cpp:function:: bool boolean(bool bar, bool baz) - - Bool function. - - .. cpp:function:: int no_parameters(void) No parameters. diff --git a/test/cpp/struct.rst b/test/cpp/struct.rst index 659efffc..6c1aeac7 100644 --- a/test/cpp/struct.rst +++ b/test/cpp/struct.rst @@ -11,16 +11,6 @@ member - .. cpp:member:: public bool bool_member - - bool member - - - .. cpp:member:: public bool _Bool_member - - _Bool member - - .. cpp:member:: public int array_member[5] array member @@ -49,7 +39,7 @@ foo next -.. cpp:struct:: @anonymous_a6168a23d6840e8919ade5661a307607 +.. cpp:struct:: @anonymous_7bf120438d254a91e1275b973de6a0eb Anonymous struct documentation. @@ -64,7 +54,7 @@ Named struct. - .. cpp:struct:: @anonymous_0a4d6f0b47cde0e9872b6dbde2ad1c1a + .. cpp:struct:: @anonymous_a63d10331be1a527625db63b8ace540f Anonymous sub-struct. @@ -74,7 +64,7 @@ Member foo. - .. cpp:union:: @anonymous_22cf17aa0fa6d83246282a58013db249 + .. cpp:union:: @anonymous_69382278a84175c1cbff40d522114b38 Anonymous sub-union. diff --git a/test/cpp/variable.rst b/test/cpp/variable.rst index 1a87c777..426c7342 100644 --- a/test/cpp/variable.rst +++ b/test/cpp/variable.rst @@ -4,16 +4,6 @@ This is a variable document. -.. cpp:var:: static bool convert_bool - - Retain bool instead of using _Bool. - - -.. cpp:var:: static bool convert_Bool - - Also convert _Bool to bool. - - .. cpp:var:: int (*function_pointer_variable)(int *param_name_ignored) function pointer variable