diff options
| author | Jakob Lykke Andersen <Jakob@caput.dk> | 2020-03-15 00:36:46 +0100 |
|---|---|---|
| committer | Jakob Lykke Andersen <Jakob@caput.dk> | 2020-03-15 19:49:16 +0100 |
| commit | 815a9c657d235ec3476dd45871adc52034d81aba (patch) | |
| tree | a1533859ea5f7f44b6c3e1c4af56d76e2e65e196 /tests/test_domain_c.py | |
| parent | 0f49e30c51b5cc5055cda5b4b294c2dd9d1df573 (diff) | |
| download | sphinx-git-815a9c657d235ec3476dd45871adc52034d81aba.tar.gz | |
C, add new directives, fix xref lookup
Diffstat (limited to 'tests/test_domain_c.py')
| -rw-r--r-- | tests/test_domain_c.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/tests/test_domain_c.py b/tests/test_domain_c.py index efbf332b4..1c42ca967 100644 --- a/tests/test_domain_c.py +++ b/tests/test_domain_c.py @@ -246,9 +246,6 @@ def test_expressions(): def test_type_definitions(): check('type', "T", {1: "T"}) - check('type', "struct T", {1: 'T'}) - check('type', "enum T", {1: 'T'}) - check('type', "union T", {1: 'T'}) check('type', "bool *b", {1: 'b'}) check('type', "bool *const b", {1: 'b'}) @@ -301,9 +298,6 @@ def test_member_definitions(): check('member', 'restrict volatile const int a', {1: 'a'}) check('member', 'T t', {1: 't'}) - check('member', 'struct T t', {1: 't'}) - check('member', 'enum T t', {1: 't'}) - check('member', 'union T t', {1: 't'}) check('member', 'int a[]', {1: 'a'}) @@ -376,20 +370,18 @@ def test_function_definitions(): def test_union_definitions(): - return # TODO - check('union', 'A', {2: "1A"}) + check('struct', 'A', {1: 'A'}) + + +def test_union_definitions(): + check('union', 'A', {1: 'A'}) def test_enum_definitions(): - return # TODO - check('enum', 'A', {2: "1A"}) - check('enum', 'A : std::underlying_type<B>::type', {2: "1A"}) - check('enum', 'A : unsigned int', {2: "1A"}) - check('enum', 'public A', {2: "1A"}, output='A') - check('enum', 'private A', {2: "1A"}) + check('enum', 'A', {1: 'A'}) - check('enumerator', 'A', {2: "1A"}) - check('enumerator', 'A = std::numeric_limits<unsigned long>::max()', {2: "1A"}) + check('enumerator', 'A', {1: 'A'}) + check('enumerator', 'A = 42', {1: 'A'}) def test_anon_definitions(): |
