(t *testing.T)
| 1468 | } |
| 1469 | |
| 1470 | func TestMountingExistingPath(t *testing.T) { |
| 1471 | handler := func(w http.ResponseWriter, r *http.Request) {} |
| 1472 | |
| 1473 | defer func() { |
| 1474 | if recover() == nil { |
| 1475 | t.Error("expected panic()") |
| 1476 | } |
| 1477 | }() |
| 1478 | |
| 1479 | r := NewRouter() |
| 1480 | r.Get("/", handler) |
| 1481 | r.Mount("/hi", http.HandlerFunc(handler)) |
| 1482 | r.Mount("/hi", http.HandlerFunc(handler)) |
| 1483 | } |
| 1484 | |
| 1485 | func TestMountingSimilarPattern(t *testing.T) { |
| 1486 | r := NewRouter() |
nothing calls this directly
no test coverage detected
searching dependent graphs…