@@ -322,7 +322,7 @@ func TestEndToEnd(t *testing.T) {
322
322
} {
323
323
rres , err := cs .ReadResource (ctx , & ReadResourceParams {URI : tt .uri })
324
324
if err != nil {
325
- if code := errorCode (err ); code == CodeResourceNotFound {
325
+ if code := errorCode (err ); code == codeResourceNotFound {
326
326
if tt .mimeType != "" {
327
327
t .Errorf ("%s: not found but expected it to be" , tt .uri )
328
328
}
@@ -994,8 +994,8 @@ func TestElicitationUnsupportedMethod(t *testing.T) {
994
994
if err == nil {
995
995
t .Error ("expected error when ElicitationHandler is not provided, got nil" )
996
996
}
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 )
999
999
}
1000
1000
if ! strings .Contains (err .Error (), "does not support elicitation" ) {
1001
1001
t .Errorf ("error should mention unsupported elicitation, got: %v" , err )
@@ -1342,8 +1342,8 @@ func TestElicitationSchemaValidation(t *testing.T) {
1342
1342
t .Errorf ("expected error for invalid schema %q, got nil" , tc .name )
1343
1343
return
1344
1344
}
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 )
1347
1347
}
1348
1348
if ! strings .Contains (err .Error (), tc .expectedError ) {
1349
1349
t .Errorf ("error message %q does not contain expected text %q" , err .Error (), tc .expectedError )
@@ -1462,8 +1462,8 @@ func TestElicitationCapabilityDeclaration(t *testing.T) {
1462
1462
if err == nil {
1463
1463
t .Error ("expected UnsupportedMethod error when no capability declared" )
1464
1464
}
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 )
1467
1467
}
1468
1468
})
1469
1469
}
0 commit comments