From 43eaec325dd0e700b3fd3ddf8ad4a7755e4fc494 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 23 May 2020 12:05:21 +0300 Subject: [PATCH] fmt: add keep tests for struct init, fix warnings --- vlib/v/fmt/tests/import_single_expected.vv | 1 + vlib/v/fmt/tests/import_single_input.vv | 1 + vlib/v/fmt/tests/struct_init_keep.vv | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 vlib/v/fmt/tests/struct_init_keep.vv diff --git a/vlib/v/fmt/tests/import_single_expected.vv b/vlib/v/fmt/tests/import_single_expected.vv index 6dd15c16de..29d4d36294 100644 --- a/vlib/v/fmt/tests/import_single_expected.vv +++ b/vlib/v/fmt/tests/import_single_expected.vv @@ -1,4 +1,5 @@ import os fn main() { + os.system('echo hi') } diff --git a/vlib/v/fmt/tests/import_single_input.vv b/vlib/v/fmt/tests/import_single_input.vv index 6dd15c16de..29d4d36294 100644 --- a/vlib/v/fmt/tests/import_single_input.vv +++ b/vlib/v/fmt/tests/import_single_input.vv @@ -1,4 +1,5 @@ import os fn main() { + os.system('echo hi') } diff --git a/vlib/v/fmt/tests/struct_init_keep.vv b/vlib/v/fmt/tests/struct_init_keep.vv new file mode 100644 index 0000000000..d996b93286 --- /dev/null +++ b/vlib/v/fmt/tests/struct_init_keep.vv @@ -0,0 +1,11 @@ +struct User { + age int + name string +} + +fn main() { + u := User{ + age: 54 + } + println(u) +}