MCPcopy
hub / github.com/gorilla/mux / testRegexp

Function testRegexp

mux_test.go:1919–1925  ·  view source on GitHub ↗
(t *testing.T, test routeTest)

Source from the content-addressed store, hash-verified

1917}
1918
1919func testRegexp(t *testing.T, test routeTest) {
1920 route := test.route
1921 routePathRegexp, regexpErr := route.GetPathRegexp()
1922 if test.pathRegexp != "" && regexpErr == nil && routePathRegexp != test.pathRegexp {
1923 t.Errorf("(%v) GetPathRegexp not equal: expected %v, got %v", test.title, test.pathRegexp, routePathRegexp)
1924 }
1925}
1926
1927func testQueriesRegexp(t *testing.T, test routeTest) {
1928 route := test.route

Callers 1

TestPathFunction · 0.85

Calls 1

GetPathRegexpMethod · 0.80

Tested by

no test coverage detected