checker,builder: rename `details:` to `Details:`
parent
30e0c478d7
commit
948f63b507
|
@ -313,7 +313,7 @@ fn (b &Builder) print_warnings_and_errors() {
|
||||||
ferror := util.formatted_error(kind, err.message, err.file_path, err.pos)
|
ferror := util.formatted_error(kind, err.message, err.file_path, err.pos)
|
||||||
eprintln(ferror)
|
eprintln(ferror)
|
||||||
if err.details.len > 0 {
|
if err.details.len > 0 {
|
||||||
eprintln('details: $err.details')
|
eprintln('Details: $err.details')
|
||||||
}
|
}
|
||||||
// eprintln('')
|
// eprintln('')
|
||||||
if i > b.max_nr_errors {
|
if i > b.max_nr_errors {
|
||||||
|
@ -335,7 +335,7 @@ fn (b &Builder) print_warnings_and_errors() {
|
||||||
ferror := util.formatted_error(kind, err.message, err.file_path, err.pos)
|
ferror := util.formatted_error(kind, err.message, err.file_path, err.pos)
|
||||||
eprintln(ferror)
|
eprintln(ferror)
|
||||||
if err.details.len > 0 {
|
if err.details.len > 0 {
|
||||||
eprintln('details: $err.details')
|
eprintln('Details: $err.details')
|
||||||
}
|
}
|
||||||
// eprintln('')
|
// eprintln('')
|
||||||
if i > b.max_nr_errors {
|
if i > b.max_nr_errors {
|
||||||
|
|
|
@ -16,4 +16,4 @@ vlib/v/checker/tests/fn_args.vv:8:5: error: cannot use `fn (&int)` as `fn (int)`
|
||||||
7 | arr([5]!)
|
7 | arr([5]!)
|
||||||
8 | fun(fn(i &int){})
|
8 | fun(fn(i &int){})
|
||||||
| ~~~~~~~~~~~~
|
| ~~~~~~~~~~~~
|
||||||
details: ``'s expected fn argument: `` is NOT a pointer, but the passed fn argument: `i` is a pointer
|
Details: ``'s expected fn argument: `` is NOT a pointer, but the passed fn argument: `i` is a pointer
|
||||||
|
|
|
@ -5,7 +5,7 @@ vlib/v/checker/tests/non_matching_functional_args.vv:27:6: error: cannot use `fn
|
||||||
| ~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~~~~~~~~
|
||||||
28 | t.rename()
|
28 | t.rename()
|
||||||
29 | println(t.name)
|
29 | println(t.name)
|
||||||
details: `main.MyFn`'s expected fn argument: `zzzz` is NOT a pointer, but the passed fn argument: `t` is a pointer
|
Details: `main.MyFn`'s expected fn argument: `zzzz` is NOT a pointer, but the passed fn argument: `t` is a pointer
|
||||||
vlib/v/checker/tests/non_matching_functional_args.vv:31:6: error: cannot use `fn (mut Table)` as `fn (Table)` in argument 1 to `sum`
|
vlib/v/checker/tests/non_matching_functional_args.vv:31:6: error: cannot use `fn (mut Table)` as `fn (Table)` in argument 1 to `sum`
|
||||||
29 | println(t.name)
|
29 | println(t.name)
|
||||||
30 | })
|
30 | })
|
||||||
|
@ -13,4 +13,4 @@ vlib/v/checker/tests/non_matching_functional_args.vv:31:6: error: cannot use `fn
|
||||||
| ~~~
|
| ~~~
|
||||||
32 | sum(yyy)
|
32 | sum(yyy)
|
||||||
33 | }
|
33 | }
|
||||||
details: `main.MyFn`'s expected fn argument: `zzzz` is NOT a pointer, but the passed fn argument: `mytable` is a pointer
|
Details: `main.MyFn`'s expected fn argument: `zzzz` is NOT a pointer, but the passed fn argument: `mytable` is a pointer
|
||||||
|
|
|
@ -4,4 +4,4 @@ vlib/v/checker/tests/unimplemented_interface_b.vv:13:6: error: `Cat` incorrectly
|
||||||
13 | foo(c)
|
13 | foo(c)
|
||||||
| ^
|
| ^
|
||||||
14 | }
|
14 | }
|
||||||
details: main.Animal has `name() string`
|
Details: main.Animal has `name() string`
|
||||||
|
|
|
@ -4,4 +4,4 @@ vlib/v/checker/tests/unimplemented_interface_c.vv:12:6: error: `Cat` incorrectly
|
||||||
12 | foo(Cat{})
|
12 | foo(Cat{})
|
||||||
| ~~~~~
|
| ~~~~~
|
||||||
13 | }
|
13 | }
|
||||||
details: main.Animal has `name()`
|
Details: main.Animal has `name()`
|
||||||
|
|
|
@ -4,4 +4,4 @@ vlib/v/checker/tests/unimplemented_interface_d.vv:12:6: error: `Cat` incorrectly
|
||||||
12 | foo(Cat{})
|
12 | foo(Cat{})
|
||||||
| ~~~~~
|
| ~~~~~
|
||||||
13 | }
|
13 | }
|
||||||
details: main.Animal has `speak(s string)`
|
Details: main.Animal has `speak(s string)`
|
||||||
|
|
|
@ -5,11 +5,11 @@ vlib/v/checker/tests/unimplemented_interface_e.vv:12:6: error: `Cat` incorrectly
|
||||||
| ~~~~~
|
| ~~~~~
|
||||||
13 | _ = Animal(Cat{})
|
13 | _ = Animal(Cat{})
|
||||||
14 | }
|
14 | }
|
||||||
details: main.Animal has `speak(s string)`
|
Details: main.Animal has `speak(s string)`
|
||||||
vlib/v/checker/tests/unimplemented_interface_e.vv:13:6: error: `Cat` incorrectly implements method `speak` of interface `Animal`: expected `string`, not `&string` for parameter 1
|
vlib/v/checker/tests/unimplemented_interface_e.vv:13:6: error: `Cat` incorrectly implements method `speak` of interface `Animal`: expected `string`, not `&string` for parameter 1
|
||||||
11 | fn main() {
|
11 | fn main() {
|
||||||
12 | foo(Cat{})
|
12 | foo(Cat{})
|
||||||
13 | _ = Animal(Cat{})
|
13 | _ = Animal(Cat{})
|
||||||
| ~~~~~~~~~~~~~
|
| ~~~~~~~~~~~~~
|
||||||
14 | }
|
14 | }
|
||||||
details: main.Animal has `speak(s string)`
|
Details: main.Animal has `speak(s string)`
|
||||||
|
|
|
@ -4,4 +4,4 @@ vlib/v/checker/tests/unimplemented_interface_f.vv:11:13: error: `Cat` incorrectl
|
||||||
11 | animals << Cat{}
|
11 | animals << Cat{}
|
||||||
| ~~~~~
|
| ~~~~~
|
||||||
12 | }
|
12 | }
|
||||||
details: main.Animal has `speak(s string)`
|
Details: main.Animal has `speak(s string)`
|
||||||
|
|
|
@ -5632,28 +5632,14 @@ fn (g &Gen) get_all_test_function_names() []string {
|
||||||
mut tsuite_begin := ''
|
mut tsuite_begin := ''
|
||||||
mut tsuite_end := ''
|
mut tsuite_end := ''
|
||||||
for _, f in g.table.fns {
|
for _, f in g.table.fns {
|
||||||
if f.name == 'testsuite_begin' {
|
|
||||||
tsuite_begin = f.name
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if f.name == 'testsuite_end' {
|
|
||||||
tsuite_end = f.name
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if f.name.starts_with('test_') {
|
|
||||||
tfuncs << f.name
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
// What follows is for internal module tests
|
|
||||||
// (they are part of a V module, NOT in main)
|
|
||||||
if f.name.contains('.test_') {
|
|
||||||
tfuncs << f.name
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if f.name.ends_with('.testsuite_begin') {
|
if f.name.ends_with('.testsuite_begin') {
|
||||||
tsuite_begin = f.name
|
tsuite_begin = f.name
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if f.name.contains('.test_') {
|
||||||
|
tfuncs << f.name
|
||||||
|
continue
|
||||||
|
}
|
||||||
if f.name.ends_with('.testsuite_end') {
|
if f.name.ends_with('.testsuite_end') {
|
||||||
tsuite_end = f.name
|
tsuite_end = f.name
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue