[vala/staging] tests: Add "nested namespace" girwriter test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] tests: Add "nested namespace" girwriter test to increase coverage
- Date: Mon, 10 Aug 2020 11:58:50 +0000 (UTC)
commit af33c83741a231437b9eab6b6cc19ce8fe24a80c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Aug 10 13:18:08 2020 +0200
tests: Add "nested namespace" girwriter test to increase coverage
See https://gitlab.gnome.org/GNOME/vala/issues/1059
tests/girwriter/GirTest-1.0.gir-expected | 5 +++++
tests/girwriter/girtest.vala | 5 +++++
tests/girwriter/girtest.vapi-expected | 4 ++++
3 files changed, 14 insertions(+)
---
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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]