MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestUserAgentParser_Parse

Function TestUserAgentParser_Parse

internal/stats/user_agent_parser_test.go:17–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15)
16
17func TestUserAgentParser_Parse(t *testing.T) {
18 var parser = stats.NewUserAgentParser()
19 for i := 0; i < 4; i++ {
20 t.Log(parser.Parse("Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Test/1"))
21 t.Log(parser.Parse("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"))
22 }
23}
24
25func TestUserAgentParser_Parse_Unknown(t *testing.T) {
26 var parser = stats.NewUserAgentParser()

Callers

nothing calls this directly

Calls 3

NewUserAgentParserFunction · 0.92
LogMethod · 0.80
ParseMethod · 0.80

Tested by

no test coverage detected