From 810a0725ecc268d3e320ae15ea93084af8daff9c Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 12 Apr 2020 17:49:31 +0200 Subject: [PATCH] tests: fix fmt tests --- vlib/v/checker/checker.v | 6 +++--- vlib/v/fmt/tests/import_multiple_expected.vv | 3 +++ vlib/v/fmt/tests/import_multiple_input.vv | 3 +++ vlib/v/fmt/tests/import_multiple_with_alias_expected.vv | 3 +++ vlib/v/fmt/tests/import_multiple_with_alias_input.vv | 3 +++ vlib/v/fmt/tests/import_single_expected.vv | 3 +++ vlib/v/fmt/tests/import_single_input.vv | 3 +++ 7 files changed, 21 insertions(+), 3 deletions(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index a5e275904c..3c8b254fa6 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -348,9 +348,9 @@ pub fn (c mut Checker) call_fn(call_expr mut ast.CallExpr) table.Type { // TODO: impl typeof properly (probably not going to be a fn call) return table.string_type } - //if c.fileis('json_test.v') { - //println(fn_name) - //} + // if c.fileis('json_test.v') { + // println(fn_name) + // } if fn_name == 'json.encode' { } // look for function in format `mod.fn` or `fn` (main/builtin) diff --git a/vlib/v/fmt/tests/import_multiple_expected.vv b/vlib/v/fmt/tests/import_multiple_expected.vv index aa054cfc47..2bb2bf691a 100644 --- a/vlib/v/fmt/tests/import_multiple_expected.vv +++ b/vlib/v/fmt/tests/import_multiple_expected.vv @@ -2,3 +2,6 @@ import ( math os ) + +fn main() { +} diff --git a/vlib/v/fmt/tests/import_multiple_input.vv b/vlib/v/fmt/tests/import_multiple_input.vv index 5911b4e04f..eccd1049e2 100644 --- a/vlib/v/fmt/tests/import_multiple_input.vv +++ b/vlib/v/fmt/tests/import_multiple_input.vv @@ -1,2 +1,5 @@ import math import os + +fn main() { +} diff --git a/vlib/v/fmt/tests/import_multiple_with_alias_expected.vv b/vlib/v/fmt/tests/import_multiple_with_alias_expected.vv index 57dee5b720..55f87b91bb 100644 --- a/vlib/v/fmt/tests/import_multiple_with_alias_expected.vv +++ b/vlib/v/fmt/tests/import_multiple_with_alias_expected.vv @@ -3,3 +3,6 @@ import ( os math.complex as c ) + +fn main() { +} diff --git a/vlib/v/fmt/tests/import_multiple_with_alias_input.vv b/vlib/v/fmt/tests/import_multiple_with_alias_input.vv index 84d4a347a8..dec354c660 100644 --- a/vlib/v/fmt/tests/import_multiple_with_alias_input.vv +++ b/vlib/v/fmt/tests/import_multiple_with_alias_input.vv @@ -1,3 +1,6 @@ import math as m import os import math.complex as c + +fn main() { +} diff --git a/vlib/v/fmt/tests/import_single_expected.vv b/vlib/v/fmt/tests/import_single_expected.vv index 21b405d8c2..6dd15c16de 100644 --- a/vlib/v/fmt/tests/import_single_expected.vv +++ b/vlib/v/fmt/tests/import_single_expected.vv @@ -1 +1,4 @@ import os + +fn main() { +} diff --git a/vlib/v/fmt/tests/import_single_input.vv b/vlib/v/fmt/tests/import_single_input.vv index 21b405d8c2..6dd15c16de 100644 --- a/vlib/v/fmt/tests/import_single_input.vv +++ b/vlib/v/fmt/tests/import_single_input.vv @@ -1 +1,4 @@ import os + +fn main() { +}