fmt: fix tests

pull/6622/head
Alexander Medvednikov 2020-10-15 12:45:34 +02:00
parent 3d4ab7de1e
commit 8b13f3b53f
9 changed files with 12 additions and 12 deletions

View File

@ -116,10 +116,10 @@ jobs:
tcc -version tcc -version
./v -cg -o v cmd/v # Make sure vtcc can build itself twice ./v -cg -o v cmd/v # Make sure vtcc can build itself twice
# ./v -silent test-compiler # ./v -silent test-compiler
- name: Fixed tests
run: ./v test-fixed
- name: v self compilation - name: v self compilation
run: ./v -o v2 cmd/v && ./v2 -o v3 cmd/v && ./v3 -o v4 cmd/v run: ./v -o v2 cmd/v && ./v2 -o v3 cmd/v && ./v3 -o v4 cmd/v
- name: Fixed tests
run: ./v test-fixed
- name: Test building v tools - name: Test building v tools
run: ./v build-tools run: ./v build-tools
- name: v doctor - name: v doctor

View File

@ -5,7 +5,7 @@ fn has_anon_fn() {
an_fn_w_param := fn (s string) { an_fn_w_param := fn (s string) {
println('I received $s') println('I received $s')
} }
an_fn_w_multi_params := fn (s1, s2, s3 string) { an_fn_w_multi_params := fn (s1 string, s2 string, s3 string) {
println('I received $s1, $s2, $s3') println('I received $s1, $s2, $s3')
} }
an_fn_w_multi_params2 := fn (s string, i int) { an_fn_w_multi_params2 := fn (s string, i int) {

View File

@ -6,7 +6,7 @@ fn has_anon_fn() {
{ {
println('I received $s') println('I received $s')
} }
an_fn_w_multi_params := fn (s1, s2, s3 string) { an_fn_w_multi_params := fn (s1 string, s2 string, s3 string) {
println('I received $s1, $s2, $s3') println('I received $s1, $s2, $s3')
} }
an_fn_w_multi_params2 :=fn (s string, i int) { an_fn_w_multi_params2 :=fn (s string, i int) {

View File

@ -1,4 +1,4 @@
fn make_flag(a, b, c string) string { fn make_flag(a string, b string, c string) string {
return '' return ''
} }

View File

@ -36,7 +36,7 @@ fn string_inter_lit(mut c checker.Checker, mut node ast.StringInterLiteral) tabl
return table.string_type return table.string_type
} }
fn get_some_val(a_test, b_test, c_test, d_test, e_test, f_test f64) f64 { fn get_some_val(a_test f64, b_test f64, c_test f64, d_test f64, e_test f64, f_test f64) f64 {
return a_test * b_test * c_test * d_test + return a_test * b_test * c_test * d_test +
e_test * f_test * a_test * d_test + a_test * b_test * c_test e_test * f_test * a_test * d_test + a_test * b_test * c_test
} }
@ -59,7 +59,7 @@ fn main() {
} }
} }
fn gen_str_for_multi_return(mut g gen.Gen, info table.MultiReturn, styp, str_fn_name string) { fn gen_str_for_multi_return(mut g gen.Gen, info table.MultiReturn, styp string, str_fn_name string) {
for i, _ in info.types { for i, _ in info.types {
println('\tstrings__Builder_write(&sb, _STR("\'%.*s\\000\'", 2, a.arg$i));') println('\tstrings__Builder_write(&sb, _STR("\'%.*s\\000\'", 2, a.arg$i));')
} }

View File

@ -20,11 +20,11 @@ fn fn_with_1_arg(arg int) int {
return 0 return 0
} }
fn fn_with_2a_args(arg1, arg2 int) int { fn fn_with_2a_args(arg1 int, arg2 int) int {
return 0 return 0
} }
fn fn_with_2_args_to_be_shorten(arg1, arg2 int) int { fn fn_with_2_args_to_be_shorten(arg1 int, arg2 int) int {
return 0 return 0
} }

View File

@ -20,7 +20,7 @@ fn fn_with_1_arg(arg int) int {
return 0 return 0
} }
fn fn_with_2a_args(arg1, arg2 int) int { fn fn_with_2a_args(arg1 int, arg2 int) int {
return 0 return 0
} }

View File

@ -14,7 +14,7 @@ fn (c &Cc) f() int {
return c.a[0].xy return c.a[0].xy
} }
fn (c &Cc) g(k, l int) int { fn (c &Cc) g(k int, l int) int {
return c.a[k].xy + l return c.a[k].xy + l
} }

View File

@ -14,7 +14,7 @@ fn (c &Cc) f() int {
return c.a[0].xy return c.a[0].xy
} }
fn (c &Cc) g(k, l int) int { fn (c &Cc) g(k int, l int) int {
return c.a[k].xy+l return c.a[k].xy+l
} }