summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-domain-c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:31:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:31:33 +0000
commite863fd965dd6253243c3342bd6f0adc4fc8aec4d (patch)
treea4c1b6491a82593950043c3f8b2530e80664d768 /tests/roots/test-domain-c
parentInitial commit. (diff)
downloadsphinx-e863fd965dd6253243c3342bd6f0adc4fc8aec4d.tar.xz
sphinx-e863fd965dd6253243c3342bd6f0adc4fc8aec4d.zip
Adding upstream version 5.3.0.upstream/5.3.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/roots/test-domain-c')
-rw-r--r--tests/roots/test-domain-c/anon-dup-decl.rst7
-rw-r--r--tests/roots/test-domain-c/conf.py1
-rw-r--r--tests/roots/test-domain-c/field-role.rst4
-rw-r--r--tests/roots/test-domain-c/function_param_target.rst7
-rw-r--r--tests/roots/test-domain-c/index.rst54
-rw-r--r--tests/roots/test-domain-c/namespace.rst21
-rw-r--r--tests/roots/test-domain-c/ns_lookup.rst13
7 files changed, 107 insertions, 0 deletions
diff --git a/tests/roots/test-domain-c/anon-dup-decl.rst b/tests/roots/test-domain-c/anon-dup-decl.rst
new file mode 100644
index 0000000..743ae2f
--- /dev/null
+++ b/tests/roots/test-domain-c/anon-dup-decl.rst
@@ -0,0 +1,7 @@
+.. c:namespace:: anon_dup_decl_ns
+
+.. c:struct:: anon_dup_decl
+
+ .. c:struct:: @a.A
+ .. c:struct:: @b.A
+ .. c:struct:: A
diff --git a/tests/roots/test-domain-c/conf.py b/tests/roots/test-domain-c/conf.py
new file mode 100644
index 0000000..a45d22e
--- /dev/null
+++ b/tests/roots/test-domain-c/conf.py
@@ -0,0 +1 @@
+exclude_patterns = ['_build']
diff --git a/tests/roots/test-domain-c/field-role.rst b/tests/roots/test-domain-c/field-role.rst
new file mode 100644
index 0000000..5452db5
--- /dev/null
+++ b/tests/roots/test-domain-c/field-role.rst
@@ -0,0 +1,4 @@
+.. c:function:: void f(int a, int *b)
+
+ :param int a:
+ :param int* b:
diff --git a/tests/roots/test-domain-c/function_param_target.rst b/tests/roots/test-domain-c/function_param_target.rst
new file mode 100644
index 0000000..d316d7b
--- /dev/null
+++ b/tests/roots/test-domain-c/function_param_target.rst
@@ -0,0 +1,7 @@
+.. c:namespace:: function_param_target
+
+.. c:function:: void f(int i)
+
+ - :c:var:`i`
+
+- :c:var:`f.i`
diff --git a/tests/roots/test-domain-c/index.rst b/tests/roots/test-domain-c/index.rst
new file mode 100644
index 0000000..4febd63
--- /dev/null
+++ b/tests/roots/test-domain-c/index.rst
@@ -0,0 +1,54 @@
+.. c:namespace:: index
+
+test-domain-c
+=============
+
+directives
+----------
+
+.. c:function:: int hello(const char *name)
+
+ :rtype: int
+
+.. c:function:: MyStruct hello2(char *name)
+
+ :rtype: MyStruct
+
+.. c:member:: float Sphinx.version
+.. c:var:: int version
+
+.. c:macro:: IS_SPHINX
+.. c:macro:: SPHINX(arg1, arg2)
+
+.. c:struct:: MyStruct
+.. c:union:: MyUnion
+.. c:enum:: MyEnum
+
+ .. c:enumerator:: MyEnumerator
+
+ :c:enumerator:`MyEnumerator`
+
+ :c:enumerator:`MyEnumerator`
+
+:c:enumerator:`MyEnumerator`
+
+.. c:type:: Sphinx
+.. c:type:: int SphinxVersionNum
+
+
+.. c:struct:: A
+
+ .. c:union:: @data
+
+ .. c:member:: int a
+
+- :c:member:`A.@data.a`
+- :c:member:`A.a`
+
+- :c:expr:`unsigned int`
+- :c:texpr:`unsigned int`
+
+.. c:var:: A a
+
+- :c:expr:`a->b`
+- :c:texpr:`a->b`
diff --git a/tests/roots/test-domain-c/namespace.rst b/tests/roots/test-domain-c/namespace.rst
new file mode 100644
index 0000000..c220d38
--- /dev/null
+++ b/tests/roots/test-domain-c/namespace.rst
@@ -0,0 +1,21 @@
+.. c:namespace:: NS
+
+.. c:var:: int NSVar
+
+.. c:namespace:: NULL
+
+.. c:var:: int NULLVar
+
+.. c:namespace:: NSDummy
+
+.. c:namespace:: 0
+
+.. c:var:: int ZeroVar
+
+.. c:namespace-push:: NS2.NS3
+
+.. c:var:: int NS2NS3Var
+
+.. c:namespace-pop::
+
+.. c:var:: int PopVar
diff --git a/tests/roots/test-domain-c/ns_lookup.rst b/tests/roots/test-domain-c/ns_lookup.rst
new file mode 100644
index 0000000..87f9d68
--- /dev/null
+++ b/tests/roots/test-domain-c/ns_lookup.rst
@@ -0,0 +1,13 @@
+.. c:namespace:: ns_lookup
+
+.. c:var:: int i
+
+.. c:function:: void f(int j)
+
+ - :c:var:`i`
+ - :c:var:`j`
+ - :c:expr:`i`
+ - :c:expr:`j`
+
+- :c:var:`i`
+- :c:expr:`i`