@@ -808,11 +808,11 @@ final class GenerativeModelVertexAITests: XCTestCase {
808
808
} catch let GenerateContentError
809
809
. internalError( underlying: invalidCandidateError as InvalidCandidateError ) {
810
810
guard case let . emptyContent( underlyingError) = invalidCandidateError else {
811
- XCTFail ( " Not an InvalidCandidateError.emptyContent error: \( invalidCandidateError) " )
811
+ XCTFail ( " Should be an InvalidCandidateError.emptyContent error: \( invalidCandidateError) " )
812
812
return
813
813
}
814
814
_ = try XCTUnwrap ( underlyingError as? Candidate . EmptyContentError ,
815
- " Not an empty content error: \( underlyingError) " )
815
+ " Should be an empty content error: \( underlyingError) " )
816
816
} catch {
817
817
XCTFail ( " Should throw GenerateContentError.internalError; error thrown: \( error) " )
818
818
}
@@ -997,7 +997,7 @@ final class GenerativeModelVertexAITests: XCTestCase {
997
997
XCTAssertNotNil ( responseError)
998
998
let generateContentError = try XCTUnwrap ( responseError as? GenerateContentError )
999
999
guard case let . internalError( underlyingError) = generateContentError else {
1000
- XCTFail ( " Not an internal error: \( generateContentError) " )
1000
+ XCTFail ( " Should be an internal error: \( generateContentError) " )
1001
1001
return
1002
1002
}
1003
1003
XCTAssertEqual ( underlyingError. localizedDescription, " Response was not an HTTP response. " )
@@ -1025,12 +1025,12 @@ final class GenerativeModelVertexAITests: XCTestCase {
1025
1025
XCTAssertNotNil ( responseError)
1026
1026
let generateContentError = try XCTUnwrap ( responseError as? GenerateContentError )
1027
1027
guard case let . internalError( underlyingError) = generateContentError else {
1028
- XCTFail ( " Not an internal error: \( generateContentError) " )
1028
+ XCTFail ( " Should be an internal error: \( generateContentError) " )
1029
1029
return
1030
1030
}
1031
1031
let decodingError = try XCTUnwrap ( underlyingError as? DecodingError )
1032
1032
guard case let . dataCorrupted( context) = decodingError else {
1033
- XCTFail ( " Not a data corrupted error: \( decodingError) " )
1033
+ XCTFail ( " Should be a data corrupted error: \( decodingError) " )
1034
1034
return
1035
1035
}
1036
1036
XCTAssert ( context. debugDescription. hasPrefix ( " Failed to decode GenerateContentResponse " ) )
@@ -1059,17 +1059,17 @@ final class GenerativeModelVertexAITests: XCTestCase {
1059
1059
XCTAssertNotNil ( responseError)
1060
1060
let generateContentError = try XCTUnwrap ( responseError as? GenerateContentError )
1061
1061
guard case let . internalError( underlyingError) = generateContentError else {
1062
- XCTFail ( " Not an internal error: \( generateContentError) " )
1062
+ XCTFail ( " Should be an internal error: \( generateContentError) " )
1063
1063
return
1064
1064
}
1065
1065
let invalidCandidateError = try XCTUnwrap ( underlyingError as? InvalidCandidateError )
1066
1066
guard case let . emptyContent( emptyContentUnderlyingError) = invalidCandidateError else {
1067
- XCTFail ( " Not an empty content error: \( invalidCandidateError) " )
1067
+ XCTFail ( " Should be an empty content error: \( invalidCandidateError) " )
1068
1068
return
1069
1069
}
1070
1070
_ = try XCTUnwrap (
1071
1071
emptyContentUnderlyingError as? Candidate . EmptyContentError ,
1072
- " Not an empty content error: \( emptyContentUnderlyingError) "
1072
+ " Should be an empty content error: \( emptyContentUnderlyingError) "
1073
1073
)
1074
1074
}
1075
1075
@@ -1584,7 +1584,7 @@ final class GenerativeModelVertexAITests: XCTestCase {
1584
1584
}
1585
1585
} catch let GenerateContentError . internalError( underlying as DecodingError ) {
1586
1586
guard case let . dataCorrupted( context) = underlying else {
1587
- XCTFail ( " Not a data corrupted error: \( underlying) " )
1587
+ XCTFail ( " Should be a data corrupted error: \( underlying) " )
1588
1588
return
1589
1589
}
1590
1590
XCTAssert ( context. debugDescription. hasPrefix ( " Failed to decode GenerateContentResponse " ) )
@@ -1612,7 +1612,7 @@ final class GenerativeModelVertexAITests: XCTestCase {
1612
1612
}
1613
1613
} catch let GenerateContentError . internalError( underlyingError as InvalidCandidateError ) {
1614
1614
guard case let . emptyContent( contentError) = underlyingError else {
1615
- XCTFail ( " Not an empty content error: \( underlyingError) " )
1615
+ XCTFail ( " Should be an empty content error: \( underlyingError) " )
1616
1616
return
1617
1617
}
1618
1618
0 commit comments