From e1798e6f7bf61f01d0ddae38785e0113cd285d4a Mon Sep 17 00:00:00 2001 From: Aidan Lee Date: Sun, 16 Jun 2024 21:21:08 +0100 Subject: [PATCH] Split up localhost and resolve tests (#1115) --- test/std/Test.hx | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/test/std/Test.hx b/test/std/Test.hx index 0df5a7256..4abfb25fc 100644 --- a/test/std/Test.hx +++ b/test/std/Test.hx @@ -420,17 +420,30 @@ class Test } - public static function testHost() + public static function testLocalhost() { log("Test Host"); try { var localhost = Host.localhost(); v('localhost :$localhost'); - var host = new Host(localhost); + if (localhost == null || localhost.length == 0) + return error("null or empty localhost"); + return ok(); + } + catch(e:Dynamic) + { + return error("Unexpected error in testHost: " + e); + } + } + + public static function testHost() + { + log("Test Host"); + try + { + var host = new Host("github.com"); v('host :$host'); - // var reverse = host.reverse(); - // v('reverse :$reverse'); return ok(); } catch(e:Dynamic)