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) {
239239 trie .AddRoute ("GET" , "/r/:id" , "oneph" )
240240 err := trie .AddRoute ("GET" , "/r/:rid/other" , "twoph" )
241241 if err == nil {
242- t .Error ("Should have died on adding second route " )
242+ t .Error ("Should have died on inconsistent placeholder name " )
243243 }
244244
245245 trie .AddRoute ("GET" , "/r/#id" , "oneph" )
246246 err = trie .AddRoute ("GET" , "/r/#rid/other" , "twoph" )
247247 if err == nil {
248- t .Error ("Should have died on adding second route " )
248+ t .Error ("Should have died on inconsistent placeholder name " )
249249 }
250250
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+ }
252256}
253257
254258func TestDuplicateName (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments