From 7369cb7b862f57d8e75d33cd73c6ea83cedc9aa1 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Fri, 27 Mar 2020 15:19:13 +0100 Subject: [PATCH] fmt: fix tests --- vlib/v/fmt/fmt_keep_test.v | 3 ++- vlib/v/fmt/fmt_test.v | 3 ++- vlib/v/parser/parser_test.v | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vlib/v/fmt/fmt_keep_test.v b/vlib/v/fmt/fmt_keep_test.v index 8f75912c8a..8ec0972489 100644 --- a/vlib/v/fmt/fmt_keep_test.v +++ b/vlib/v/fmt/fmt_keep_test.v @@ -5,6 +5,7 @@ import ( v.fmt v.parser v.table + v.pref ) const ( @@ -43,7 +44,7 @@ fn test_fmt() { continue } table := table.new_table() - file_ast := parser.parse_file(ipath, table, .parse_comments) + file_ast := parser.parse_file(ipath, table, .parse_comments, &pref.Preferences{}) result_ocontent := fmt.fmt(file_ast, table) if expected_ocontent != result_ocontent { fmt_bench.fail() diff --git a/vlib/v/fmt/fmt_test.v b/vlib/v/fmt/fmt_test.v index eb442d8c0b..88ac6fd7f3 100644 --- a/vlib/v/fmt/fmt_test.v +++ b/vlib/v/fmt/fmt_test.v @@ -5,6 +5,7 @@ import ( v.fmt v.parser v.table + v.pref ) const ( @@ -45,7 +46,7 @@ fn test_fmt() { continue } table := table.new_table() - file_ast := parser.parse_file(ipath, table, .parse_comments) + file_ast := parser.parse_file(ipath, table, .parse_comments, &pref.Preferences{}) result_ocontent := fmt.fmt(file_ast, table) if expected_ocontent != result_ocontent { fmt_bench.fail() diff --git a/vlib/v/parser/parser_test.v b/vlib/v/parser/parser_test.v index 59d1b98dd6..4d1f4f2b26 100644 --- a/vlib/v/parser/parser_test.v +++ b/vlib/v/parser/parser_test.v @@ -76,7 +76,7 @@ x := 10 8+4 ' table := &table.Table{} - prog := parse_file(s, table, .skip_comments) + prog := parse_file(s, table, .skip_comments, &pref.Preferences{}) mut checker := checker.new_checker(table) checker.check(prog) res := gen.cgen([prog], table)