MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / TestSetServerAddress

Function TestSetServerAddress

internal/util/util_test.go:45–57  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestSetServerAddress(t *testing.T) {
46 // Reset global in case other tests changed it
47 SetServerAddress("")
48 if GetServerAddress() != "" {
49 t.Fatalf("Expected empty address, got %q", GetServerAddress())
50 }
51
52 testAddr := "127.0.0.1:8080"
53 SetServerAddress(testAddr)
54 if addr := GetServerAddress(); addr != testAddr {
55 t.Fatalf("Expected serverAddr to be %q, got %q", testAddr, addr)
56 }
57}
58
59func TestRoundCount(t *testing.T) {
60 // Reset roundCount for test isolation

Callers

nothing calls this directly

Calls 2

SetServerAddressFunction · 0.85
GetServerAddressFunction · 0.85

Tested by

no test coverage detected