fmt: fix tests

pull/4134/head
Alexander Medvednikov 2020-03-27 15:19:13 +01:00
parent 473d9fef55
commit 7369cb7b86
3 changed files with 5 additions and 3 deletions

View File

@ -5,6 +5,7 @@ import (
v.fmt v.fmt
v.parser v.parser
v.table v.table
v.pref
) )
const ( const (
@ -43,7 +44,7 @@ fn test_fmt() {
continue continue
} }
table := table.new_table() 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) result_ocontent := fmt.fmt(file_ast, table)
if expected_ocontent != result_ocontent { if expected_ocontent != result_ocontent {
fmt_bench.fail() fmt_bench.fail()

View File

@ -5,6 +5,7 @@ import (
v.fmt v.fmt
v.parser v.parser
v.table v.table
v.pref
) )
const ( const (
@ -45,7 +46,7 @@ fn test_fmt() {
continue continue
} }
table := table.new_table() 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) result_ocontent := fmt.fmt(file_ast, table)
if expected_ocontent != result_ocontent { if expected_ocontent != result_ocontent {
fmt_bench.fail() fmt_bench.fail()

View File

@ -76,7 +76,7 @@ x := 10
8+4 8+4
' '
table := &table.Table{} 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) mut checker := checker.new_checker(table)
checker.check(prog) checker.check(prog)
res := gen.cgen([prog], table) res := gen.cgen([prog], table)