@@ -25,41 +25,41 @@ func TestNamespace(t *testing.T) {
2525
2626 ns .RegisterDirectiveExecutor ("foo" , DirectiveExecutorFunc (exeFoo ))
2727 assert .Equal (ns .LookupExecutor ("foo" ).Execute (nil ), errFoo )
28- assert .PanicsWithError (duplicateExecutor ("foo" ).Error (), func () {
28+ assert .PanicsWithError ("owl: " + duplicateExecutor ("foo" ).Error (), func () {
2929 ns .RegisterDirectiveExecutor ("foo" , DirectiveExecutorFunc (exeFoo ))
3030 })
3131
3232 ns .RegisterDirectiveExecutor ("bar" , DirectiveExecutorFunc (exeBar ))
3333 assert .Equal (ns .LookupExecutor ("bar" ).Execute (nil ), errBar )
34- assert .PanicsWithError (duplicateExecutor ("bar" ).Error (), func () {
34+ assert .PanicsWithError ("owl: " + duplicateExecutor ("bar" ).Error (), func () {
3535 ns .RegisterDirectiveExecutor ("bar" , DirectiveExecutorFunc (exeBar ))
3636 })
3737
38- ns .ReplaceDirectiveExecutor ("foo" , DirectiveExecutorFunc (exeFoo ))
38+ ns .RegisterDirectiveExecutor ("foo" , DirectiveExecutorFunc (exeFoo ), true )
3939 assert .Equal (ns .LookupExecutor ("foo" ).Execute (nil ), errFoo )
40- ns .ReplaceDirectiveExecutor ("foo" , DirectiveExecutorFunc (exeBar ))
40+ ns .RegisterDirectiveExecutor ("foo" , DirectiveExecutorFunc (exeBar ), true )
4141 assert .Equal (ns .LookupExecutor ("foo" ).Execute (nil ), errBar )
4242}
4343
4444func TestNamespace_RegisterNilExecutor (t * testing.T ) {
45- assert .PanicsWithError (t , nilExecutor ("foo" ).Error (), func () {
45+ assert .PanicsWithError (t , "owl: " + nilExecutor ("foo" ).Error (), func () {
4646 NewNamespace ().RegisterDirectiveExecutor ("foo" , nil )
4747 })
4848}
4949
5050func TestNamespace_RegisterInvalidName (t * testing.T ) {
51- assert .PanicsWithError (t , invalidDirectiveName (".foo" ).Error (), func () {
51+ assert .PanicsWithError (t , "owl: " + invalidDirectiveName (".foo" ).Error (), func () {
5252 NewNamespace ().RegisterDirectiveExecutor (".foo" , DirectiveExecutorFunc (exeFoo ))
5353 })
5454}
5555
5656func TestDefaultNamespace (t * testing.T ) {
5757 RegisterDirectiveExecutor ("foo" , DirectiveExecutorFunc (exeFoo ))
5858 assert .Equal (t , LookupExecutor ("foo" ).Execute (nil ), errFoo )
59- assert .PanicsWithError (t , duplicateExecutor ("foo" ).Error (), func () {
59+ assert .PanicsWithError (t , "owl: " + duplicateExecutor ("foo" ).Error (), func () {
6060 RegisterDirectiveExecutor ("foo" , DirectiveExecutorFunc (exeFoo ))
6161 })
6262
63- ReplaceDirectiveExecutor ("foo" , DirectiveExecutorFunc (exeBar ))
63+ RegisterDirectiveExecutor ("foo" , DirectiveExecutorFunc (exeBar ), true )
6464 assert .Equal (t , LookupExecutor ("foo" ).Execute (nil ), errBar )
6565}
0 commit comments