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

tests: make error handling the same as the main function (#15825)

This commit is contained in:
yuyi
2022-09-22 00:45:43 +08:00
committed by GitHub
parent 391ac12fe2
commit 41dbd12bc4
69 changed files with 193 additions and 192 deletions

View File

@@ -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