mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
testing: support for internal module testing
This commit is contained in:
committed by
Alexander Medvednikov
parent
3a2c46a1ce
commit
1cd5fab21d
@@ -778,13 +778,14 @@ fn (t &Table) main_exists() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
fn (t &Table) has_at_least_one_test_fn() bool {
|
||||
fn (t &Table) all_test_function_names() []string {
|
||||
mut res := []string
|
||||
for _, f in t.fns {
|
||||
if f.name.starts_with('main__test_') {
|
||||
return true
|
||||
if f.name.contains('__test_') {
|
||||
res << f.name
|
||||
}
|
||||
}
|
||||
return false
|
||||
return res
|
||||
}
|
||||
|
||||
fn (t &Table) find_const(name string) ?Var {
|
||||
|
||||
Reference in New Issue
Block a user