@@ -322,7 +322,7 @@ func TestEndToEnd(t *testing.T) {
322322 } {
323323 rres , err := cs .ReadResource (ctx , & ReadResourceParams {URI : tt .uri })
324324 if err != nil {
325- if code := errorCode (err ); code == CodeResourceNotFound {
325+ if code := errorCode (err ); code == codeResourceNotFound {
326326 if tt .mimeType != "" {
327327 t .Errorf ("%s: not found but expected it to be" , tt .uri )
328328 }
@@ -994,8 +994,8 @@ func TestElicitationUnsupportedMethod(t *testing.T) {
994994 if err == nil {
995995 t .Error ("expected error when ElicitationHandler is not provided, got nil" )
996996 }
997- if code := errorCode (err ); code != CodeUnsupportedMethod {
998- t .Errorf ("got error code %d, want %d (CodeUnsupportedMethod)" , code , CodeUnsupportedMethod )
997+ if code := errorCode (err ); code != codeUnsupportedMethod {
998+ t .Errorf ("got error code %d, want %d (CodeUnsupportedMethod)" , code , codeUnsupportedMethod )
999999 }
10001000 if ! strings .Contains (err .Error (), "does not support elicitation" ) {
10011001 t .Errorf ("error should mention unsupported elicitation, got: %v" , err )
@@ -1342,8 +1342,8 @@ func TestElicitationSchemaValidation(t *testing.T) {
13421342 t .Errorf ("expected error for invalid schema %q, got nil" , tc .name )
13431343 return
13441344 }
1345- if code := errorCode (err ); code != CodeInvalidParams {
1346- t .Errorf ("got error code %d, want %d (CodeInvalidParams)" , code , CodeInvalidParams )
1345+ if code := errorCode (err ); code != codeInvalidParams {
1346+ t .Errorf ("got error code %d, want %d (CodeInvalidParams)" , code , codeInvalidParams )
13471347 }
13481348 if ! strings .Contains (err .Error (), tc .expectedError ) {
13491349 t .Errorf ("error message %q does not contain expected text %q" , err .Error (), tc .expectedError )
@@ -1462,8 +1462,8 @@ func TestElicitationCapabilityDeclaration(t *testing.T) {
14621462 if err == nil {
14631463 t .Error ("expected UnsupportedMethod error when no capability declared" )
14641464 }
1465- if code := errorCode (err ); code != CodeUnsupportedMethod {
1466- t .Errorf ("got error code %d, want %d (CodeUnsupportedMethod)" , code , CodeUnsupportedMethod )
1465+ if code := errorCode (err ); code != codeUnsupportedMethod {
1466+ t .Errorf ("got error code %d, want %d (CodeUnsupportedMethod)" , code , codeUnsupportedMethod )
14671467 }
14681468 })
14691469}
0 commit comments