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

Function TestPanicOnCapturingGroups

mux_test.go:1762–1769  ·  view source on GitHub ↗

See: https://github.com/gorilla/mux/issues/200

(t *testing.T)

Source from the content-addressed store, hash-verified

1760
1761// See: https://github.com/gorilla/mux/issues/200
1762func TestPanicOnCapturingGroups(t *testing.T) {
1763 defer func() {
1764 if recover() == nil {
1765 t.Errorf("(Test that capturing groups now fail fast) Expected panic, however test completed successfully.\n")
1766 }
1767 }()
1768 NewRouter().NewRoute().Path("/{type:(promo|special)}/{promoId}.json")
1769}
1770
1771// ----------------------------------------------------------------------------
1772// Helpers

Callers

nothing calls this directly

Calls 3

NewRouterFunction · 0.85
NewRouteMethod · 0.80
PathMethod · 0.45

Tested by

no test coverage detected