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:
@@ -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
|
||||
|
Reference in New Issue
Block a user