[vala/wip/682_array_methods_refactor: 11/18] Adjustments




commit 8ef08420c87e70fc0bcc4353ed109bdff5c77707
Author: Vladyslav Stovmanenko <flaviusglamfenix gmail com>
Date:   Sat May 7 19:40:01 2022 +0000

    Adjustments

 codegen/valaccodemethodcallmodule.vala | 2 +-
 tests/basic-types/arrays.c-expected    | 3 +++
 tests/basic-types/arrays.vala          | 6 +++---
 tests/posix/arrays.c-expected          | 3 +++
 4 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index 2b4a6d66f..825b9c7c6 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -338,7 +338,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                        csizeof.add_argument (new CCodeIdentifier (get_ccode_name (array_type.element_type)));
                        in_arg_map.set (get_param_pos (0.1), csizeof);
 
-                       CCodeExpression? free_func_expr = new CCodeIdentifier("NULL");
+                       CCodeExpression free_func_expr = new CCodeIdentifier("NULL");
                        if (array_type.element_type.value_owned) {
                                free_func_expr = get_destroy_func_expression(array_type.element_type);
                        }
diff --git a/tests/basic-types/arrays.c-expected b/tests/basic-types/arrays.c-expected
index 7839707a6..6ffe7bb00 100644
--- a/tests/basic-types/arrays.c-expected
+++ b/tests/basic-types/arrays.c-expected
@@ -1763,6 +1763,9 @@ _vala_main (void)
        test_void_array ();
        test_explicit_copying ();
        test_array_with_primitives_move ();
+       test_array_with_struct_move (0, 2, 3, 1);
+       test_array_with_struct_move (2, 0, 3, 2);
+       test_array_with_struct_move (0, 3, 1, 1);
        test_array_resize ();
        test_struct_array ();
        test_fixed_array ();
diff --git a/tests/basic-types/arrays.vala b/tests/basic-types/arrays.vala
index 0a94a6acb..b269ce8ac 100644
--- a/tests/basic-types/arrays.vala
+++ b/tests/basic-types/arrays.vala
@@ -322,9 +322,9 @@ void main () {
        test_void_array ();
        test_explicit_copying ();
        test_array_with_primitives_move ();
-       //test_array_with_struct_move(0, 2, 3, 1);
-       //test_array_with_struct_move(2, 0, 3, 2);
-       //test_array_with_struct_move(0, 3, 1, 1);
+       test_array_with_struct_move(0, 2, 3, 1);
+       test_array_with_struct_move(2, 0, 3, 2);
+       test_array_with_struct_move(0, 3, 1, 1);
        test_array_resize ();
        test_struct_array ();
        test_fixed_array ();
diff --git a/tests/posix/arrays.c-expected b/tests/posix/arrays.c-expected
index 47710c9cf..6f3b664f3 100644
--- a/tests/posix/arrays.c-expected
+++ b/tests/posix/arrays.c-expected
@@ -1718,6 +1718,9 @@ _vala_main (void)
        test_void_array ();
        test_explicit_copying ();
        test_array_with_primitives_move ();
+       test_array_with_struct_move (0, 2, 3, 1);
+       test_array_with_struct_move (2, 0, 3, 2);
+       test_array_with_struct_move (0, 3, 1, 1);
        test_array_resize ();
        test_struct_array ();
        test_fixed_array ();


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