mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net: vfmt everything
This commit is contained in:
@@ -15,9 +15,7 @@ fn test_http_get_from_vlang_utc_now() {
|
||||
urls := ['http://vlang.io/utc_now', 'https://vlang.io/utc_now']
|
||||
for url in urls {
|
||||
println('Test getting current time from $url by http.get')
|
||||
res := http.get(url) or {
|
||||
panic(err)
|
||||
}
|
||||
res := http.get(url) or { panic(err) }
|
||||
assert 200 == res.status_code
|
||||
assert res.text.len > 0
|
||||
assert res.text.int() > 1566403696
|
||||
@@ -39,9 +37,7 @@ fn test_public_servers() {
|
||||
]
|
||||
for url in urls {
|
||||
println('Testing http.get on public url: $url ')
|
||||
res := http.get(url) or {
|
||||
panic(err)
|
||||
}
|
||||
res := http.get(url) or { panic(err) }
|
||||
assert 200 == res.status_code
|
||||
assert res.text.len > 0
|
||||
}
|
||||
@@ -53,9 +49,7 @@ fn test_relative_redirects() {
|
||||
} $else {
|
||||
return
|
||||
} // tempfix periodic: httpbin relative redirects are broken
|
||||
res := http.get('https://httpbin.org/relative-redirect/3?abc=xyz') or {
|
||||
panic(err)
|
||||
}
|
||||
res := http.get('https://httpbin.org/relative-redirect/3?abc=xyz') or { panic(err) }
|
||||
assert 200 == res.status_code
|
||||
assert res.text.len > 0
|
||||
assert res.text.contains('"abc": "xyz"')
|
||||
|
||||
Reference in New Issue
Block a user