[REJECTED] [test] attribute replacing fn test_f()
igotfr opened this issue · 4 comments
igotfr commented
[test]
fn f() {
assert 2 == 2
}
// instead
fn test_f() {
assert 2 == 2
}
igotfr commented
related:
vlang/v#11924
elimisteve commented
Having 2 functions with the same name seems worse than what we have now, doesn't it?
igotfr 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
spytheman 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.