From ee72474971fa9d60c3cb9f2e3ea2b8c7ae764bfc Mon Sep 17 00:00:00 2001 From: Joe Conigliaro Date: Tue, 10 Mar 2020 22:26:13 +1100 Subject: [PATCH] v: add multi assign cgen test --- vlib/v/gen/tests/4.c | 8 +++++--- vlib/v/gen/tests/4.vv | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/vlib/v/gen/tests/4.c b/vlib/v/gen/tests/4.c index 426b1f1f2e..a45cd600b3 100644 --- a/vlib/v/gen/tests/4.c +++ b/vlib/v/gen/tests/4.c @@ -54,9 +54,11 @@ int main() { string foo_a = af_idx_el.a; map_string_string m1 = new_map(1, sizeof(string)); map_string_int m2 = new_map_init(2, sizeof(int), (string[2]){tos3("v"), tos3("lang"), }, (int[2]){1, 2, }); - multi_return_int_string mr_548 = mr_test(); - int mr1 = mr_548->arg[0]; - string mr2 = mr_548->arg[1]; + string ma1 = tos3("hello"); + string ma2 = tos3("vlang"); + multi_return_int_string mr_578 = mr_test(); + int mr1 = mr_578->arg[0]; + string mr2 = mr_578->arg[1]; return 0; } diff --git a/vlib/v/gen/tests/4.vv b/vlib/v/gen/tests/4.vv index c3c874b73d..ec5555fc74 100644 --- a/vlib/v/gen/tests/4.vv +++ b/vlib/v/gen/tests/4.vv @@ -40,6 +40,7 @@ fn main() { mut m1 := map[string]string mut m2 := {'v': 1, 'lang': 2} + ma1, ma2 := 'hello', 'vlang' mr1, mr2 := mr_test() }