[vala/0.40] libvaladoc: Actually assign type_id of Api.Structs



commit 86f5a8c6937bd8eb2b57170b76ece59148662856
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Nov 14 15:44:43 2018 +0100

    libvaladoc: Actually assign type_id of Api.Structs

 libvaladoc/api/struct.vala                  | 1 +
 valadoc/tests/drivers/generic-api-test.vala | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libvaladoc/api/struct.vala b/libvaladoc/api/struct.vala
index 93bbce778..50595a018 100644
--- a/libvaladoc/api/struct.vala
+++ b/libvaladoc/api/struct.vala
@@ -49,6 +49,7 @@ public class Valadoc.Api.Struct : TypeSymbol {
                this.destroy_function_cname = destroy_function_cname;
 
                this.cname = cname;
+               this.type_id = type_id;
        }
 
        /**
diff --git a/valadoc/tests/drivers/generic-api-test.vala b/valadoc/tests/drivers/generic-api-test.vala
index 9292c0722..3650e72de 100644
--- a/valadoc/tests/drivers/generic-api-test.vala
+++ b/valadoc/tests/drivers/generic-api-test.vala
@@ -808,7 +808,7 @@ public static void test_class_global (Api.Class? cl, Api.Package pkg, Api.Namesp
        assert (substru.get_cname () == "TestClassGlobalInnerStruct");
        assert (substru.get_free_function_cname () == null);
        assert (substru.get_dup_function_cname () == null);
-       assert (substru.get_type_id () == null);
+       assert (substru.get_type_id () == "TEST_CLASS_GLOBAL_TYPE_INNER_STRUCT");
        // (.Symbol check)
        assert (substru.is_deprecated == false);
        assert (substru.accessibility == Api.SymbolAccessibility.PUBLIC);
@@ -1169,7 +1169,7 @@ public static void test_struct_global (Api.Struct? stru, Api.Package pkg, Api.Na
        assert (stru.get_cname () == "TestStructGlobal");
        assert (stru.get_free_function_cname () == null);
        assert (stru.get_dup_function_cname () == null);
-       assert (stru.get_type_id () == null);
+       assert (stru.get_type_id () == "TYPE_TEST_STRUCT_GLOBAL");
        // (.Symbol check)
        assert (stru.is_deprecated == false);
        assert (stru.accessibility == Api.SymbolAccessibility.PUBLIC);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]