]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Actually assign type_id of Api.Structs
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 14 Nov 2018 14:44:43 +0000 (15:44 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 26 Nov 2018 08:35:32 +0000 (09:35 +0100)
libvaladoc/api/struct.vala
valadoc/tests/drivers/generic-api-test.vala

index d35d5ff9333525cb0074ad7dc3bb83f024056095..a379b191b56b4b23a716d7794abd4893fc5f2835 100644 (file)
@@ -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;
        }
 
        /**
index 6e3b4cbb5c71928f93e9896b60c423a18b61044d..2e36d8faf1edcd71463b2d637e69a3160323b738 100644 (file)
@@ -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);