File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -239,16 +239,20 @@ func TestConsistentPlaceholderName(t *testing.T) {
239
239
trie .AddRoute ("GET" , "/r/:id" , "oneph" )
240
240
err := trie .AddRoute ("GET" , "/r/:rid/other" , "twoph" )
241
241
if err == nil {
242
- t .Error ("Should have died on adding second route " )
242
+ t .Error ("Should have died on inconsistent placeholder name " )
243
243
}
244
244
245
245
trie .AddRoute ("GET" , "/r/#id" , "oneph" )
246
246
err = trie .AddRoute ("GET" , "/r/#rid/other" , "twoph" )
247
247
if err == nil {
248
- t .Error ("Should have died on adding second route " )
248
+ t .Error ("Should have died on inconsistent placeholder name " )
249
249
}
250
250
251
- // TODO *param
251
+ trie .AddRoute ("GET" , "/r/*id" , "oneph" )
252
+ err = trie .AddRoute ("GET" , "/r/*rid" , "twoph" )
253
+ if err == nil {
254
+ t .Error ("Should have died on duplicated route" )
255
+ }
252
256
}
253
257
254
258
func TestDuplicateName (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments