diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-08-10 13:18:08 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-08-10 13:49:45 +0200 |
commit | af33c83741a231437b9eab6b6cc19ce8fe24a80c (patch) | |
tree | f70fe242ae62719db5261ca15131439c053e48db /tests/girwriter | |
parent | eff666b4d337e7d91b31462c48d438db2c7170ce (diff) | |
download | vala-af33c83741a231437b9eab6b6cc19ce8fe24a80c.tar.gz |
tests: Add "nested namespace" girwriter test to increase coverage
See https://gitlab.gnome.org/GNOME/vala/issues/1059
Diffstat (limited to 'tests/girwriter')
-rw-r--r-- | tests/girwriter/GirTest-1.0.gir-expected | 5 | ||||
-rw-r--r-- | tests/girwriter/girtest.vala | 5 | ||||
-rw-r--r-- | tests/girwriter/girtest.vapi-expected | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/tests/girwriter/GirTest-1.0.gir-expected b/tests/girwriter/GirTest-1.0.gir-expected index d7521ddcc..abac75dbd 100644 --- a/tests/girwriter/GirTest-1.0.gir-expected +++ b/tests/girwriter/GirTest-1.0.gir-expected @@ -5,6 +5,11 @@ <package name="girtest"/> <c:include name="girtest.h"/> <namespace name="GirTest" version="1.0" shared-library="girtest" c:prefix="GirTest" c:identifier-prefixes="GirTest" c:symbol-prefix="gir_test"> + <function name="nested_function" c:identifier="gir_test_nested_function"> + <return-value transfer-ownership="full"> + <type name="none" c:type="void"/> + </return-value> + </function> <enumeration name="EnumTest" c:type="GirTestEnumTest" glib:type-name="GirTestEnumTest" glib:get-type="gir_test_enum_test_get_type"> <member name="value1" c:identifier="GIR_TEST_ENUM_TEST_VALUE1" value="0"/> <member name="value2" c:identifier="GIR_TEST_ENUM_TEST_VALUE2" value="1"/> diff --git a/tests/girwriter/girtest.vala b/tests/girwriter/girtest.vala index cd284b5c6..18c3ba80e 100644 --- a/tests/girwriter/girtest.vala +++ b/tests/girwriter/girtest.vala @@ -336,6 +336,11 @@ namespace GirTest { public void method<K> (K[] param) { } } + + namespace Nested { + public void function () { + } + } } public enum InvalidEnum { diff --git a/tests/girwriter/girtest.vapi-expected b/tests/girwriter/girtest.vapi-expected index da076711d..7e78a87c0 100644 --- a/tests/girwriter/girtest.vapi-expected +++ b/tests/girwriter/girtest.vapi-expected @@ -1,5 +1,9 @@ [CCode (gir_namespace = "GirTest", gir_version = "1.0")] namespace GirTest { + namespace Nested { + [CCode (cheader_filename = "girtest.h")] + public static void function (); + } [CCode (cheader_filename = "girtest.h")] public abstract class AbstractObjectTest : GLib.Object { protected AbstractObjectTest (); |