Skip to content

Commit 6fef5ed

Browse files
committed
Add test for breathe integration, add test build scripts
1 parent 072f2bf commit 6fef5ed

File tree

10 files changed

+2720
-1
lines changed

10 files changed

+2720
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
build
22
_build/
3-
test/_build/
43
dist
54
test-output
65
*.egg-info
6+
_doxygen/

test/basic/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
sphinx-build . _build
File renamed without changes.

test/index.rst renamed to test/basic/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,5 @@ More Tests
200200
.. function:: private List < MyInterface<int, float> > GenericsGaloreFunc <T, U> (ref List <T> a = default, List < MyInterface<int, float> > b = default)
201201

202202
.. function:: private T ReturnGeneric < T, U > (int a = 0)
203+
204+
.. function:: (MyStruct, MyClass2) tupleFunc((MyStruct, MyClass2) a)

test/breathe/Doxyfile

Lines changed: 2582 additions & 0 deletions
Large diffs are not rendered by default.

test/breathe/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
doxygen
4+
echo ""
5+
echo "--- Running spinx-build ---"
6+
sphinx-build . _build

test/breathe/conf.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
project = 'Breathe Test'
2+
version = ''
3+
4+
master_doc = 'index'
5+
source_suffix = '.rst'
6+
extensions = ['sphinx_csharp', 'breathe']
7+
8+
breathe_default_project = 'test-project'
9+
breathe_projects = {'test-project': "_doxygen/xml"}
10+
11+
pygments_style = 'sphinx'
12+
13+
# Debug options
14+
sphinx_csharp_debug = False
15+
sphinx_csharp_debug_parse = False
16+
sphinx_csharp_debug_parse_func = False
17+
sphinx_csharp_debug_parse_var = False
18+
sphinx_csharp_debug_parse_prop = False
19+
sphinx_csharp_debug_parse_attr = False
20+
sphinx_csharp_debug_parse_idxr = False
21+
sphinx_csharp_debug_parse_type = False
22+
sphinx_csharp_debug_xref = False
23+
sphinx_csharp_debug_ext_links = False

test/breathe/cs/A.cs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
using System;
2+
using UI;
3+
using UnityEngine;
4+
using XrInput;
5+
using Object = UnityEngine.Object;
6+
7+
namespace MyNamespace
8+
{
9+
/// <summary>
10+
/// This is a <c>partial</c> class, meaning it is split between several files.
11+
/// </summary>
12+
/// <remarks>See also <see cref="OtherNamespace.B"/>.</remarks>
13+
public unsafe partial class MyClass : IDisposable
14+
{
15+
public GameObject* gameObject;
16+
17+
public readonly LibiglMesh Mesh;
18+
19+
/// <summary>
20+
/// Create a behaviour for the <see cref="MonoBehaviour"/> component.
21+
/// Every Mesh has one behaviour.
22+
/// </summary>
23+
public MyClass(GameObject other)
24+
{
25+
26+
}
27+
28+
/// <summary>
29+
/// Called every frame, the normal Unity Update.
30+
/// </summary>
31+
public void Update()
32+
{
33+
34+
}
35+
36+
/// <summary>
37+
/// Called on the main thread.
38+
/// </summary>
39+
public void PreExecute()
40+
{
41+
42+
}
43+
}
44+
}

test/breathe/cs/B.cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System;
2+
using UnityEngine;
3+
4+
namespace OtherNamespace
5+
{
6+
/// <summary>
7+
/// Some text here
8+
/// </summary>
9+
/// <remarks>See also <see cref="MyNamespace.MyClass"/>.</remarks>
10+
public unsafe partial class B : IDisposable
11+
{
12+
public GameObject* gameObject;
13+
14+
public readonly LibiglMesh Mesh;
15+
16+
/// <summary>
17+
/// Create a behaviour for the <see cref="MonoBehaviour"/> component.
18+
/// Every Mesh has one behaviour.
19+
/// </summary>
20+
public B(GameObject other)
21+
{
22+
23+
}
24+
25+
/// <summary>
26+
/// Called every frame, the normal Unity Update.
27+
/// </summary>
28+
public Tuple<MyClass, MyClass> Update(ref B b, int a = 0)
29+
{
30+
31+
}
32+
33+
/// <summary>
34+
/// Called on the main thread.
35+
/// </summary>
36+
public void PreExecute()
37+
{
38+
39+
}
40+
}
41+
}

test/breathe/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Namespaces
2+
==========
3+
4+
.. doxygennamespace:: MyNamespace
5+
6+
.. doxygennamespace:: OtherNamespace
7+
8+
.. doxygenclass:: MyNamespace::MyClass
9+
:members:
10+
:protected-members:
11+
:private-members:
12+
:undoc-members:
13+
14+
.. doxygenclass:: OtherNamespace::B
15+
:members:
16+
:protected-members:
17+
:private-members:
18+
:undoc-members:

0 commit comments

Comments
 (0)