v.parser: do not treat test_ functions specially outside of _test.v files
parent
000790b112
commit
3dc4d13160
|
@ -341,7 +341,8 @@ fn (mut p Parser) fn_decl() ast.FnDecl {
|
||||||
end_pos := p.prev_tok.position()
|
end_pos := p.prev_tok.position()
|
||||||
short_fn_name := name
|
short_fn_name := name
|
||||||
is_main := short_fn_name == 'main' && p.mod == 'main'
|
is_main := short_fn_name == 'main' && p.mod == 'main'
|
||||||
is_test := short_fn_name.starts_with('test_') || short_fn_name.starts_with('testsuite_')
|
mut is_test := (short_fn_name.starts_with('test_') || short_fn_name.starts_with('testsuite_'))
|
||||||
|
&& (p.file_base.ends_with('_test.v') || p.file_base.ends_with('_test.vv'))
|
||||||
|
|
||||||
// Register
|
// Register
|
||||||
if is_method {
|
if is_method {
|
||||||
|
|
Loading…
Reference in New Issue