1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fmt: force empty lines after struct declarations and most functions (#9096)

This commit is contained in:
Lukas Neubert
2021-03-03 23:56:40 +01:00
committed by GitHub
parent 3e5a0dfc94
commit 0f8f8bd90d
4 changed files with 17 additions and 7 deletions

View File

@@ -10,13 +10,16 @@ fn (rp RoutePair) test() ?[]string {
route := rp.route.split('/').filter(it != '')
return route_matches(url, route)
}
fn (rp RoutePair) test_match() {
rp.test() or { panic('should match: $rp') }
}
fn (rp RoutePair) test_no_match() {
rp.test() or { return }
panic('should not match: $rp')
}
fn (rp RoutePair) test_param(expected []string) {
res := rp.test() or { panic('should match: $rp') }
assert res == expected