mirror of
https://github.com/vlang/v.git
synced 2025-09-16 16:02:29 +03:00
tests: make error handling the same as the main function (#15825)
This commit is contained in:
parent
391ac12fe2
commit
41dbd12bc4
69 changed files with 193 additions and 192 deletions
|
@ -1,7 +1,7 @@
|
|||
import net.http
|
||||
import time
|
||||
|
||||
fn test_server_stop() ? {
|
||||
fn test_server_stop() {
|
||||
mut server := &http.Server{
|
||||
accept_timeout: 1 * time.second
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ fn test_server_stop() ? {
|
|||
assert watch.elapsed() < 999 * time.millisecond
|
||||
}
|
||||
|
||||
fn test_server_close() ? {
|
||||
fn test_server_close() {
|
||||
mut server := &http.Server{
|
||||
accept_timeout: 1 * time.second
|
||||
handler: MyHttpHandler{}
|
||||
|
@ -60,7 +60,7 @@ fn (mut handler MyHttpHandler) handle(req http.Request) http.Response {
|
|||
|
||||
const cport = 8198
|
||||
|
||||
fn test_server_custom_handler() ? {
|
||||
fn test_server_custom_handler() {
|
||||
mut handler := MyHttpHandler{}
|
||||
mut server := &http.Server{
|
||||
accept_timeout: 1 * time.second
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue