[REJECTED] [test] attribute replacing fn test_f()
igotfr opened this issue · comments
Igor Ferreira commented
[test]
fn f() {
assert 2 == 2
}
// instead
fn test_f() {
assert 2 == 2
}
Igor Ferreira commented
related:
vlang/v#11924
Steve Phillips commented
Having 2 functions with the same name seems worse than what we have now, doesn't it?
Igor Ferreira commented
Having 2 functions with the same name seems worse than what we have now, doesn't it?
it's easier to find quickly in the middle of the code and to differentiate too
Delyan Angelov commented
The test_ prefix for test functions is preferable - it is easier and simpler to find such functions for both humans and for the test framework too.