@@ -63,6 +63,7 @@ final class GenerativeModelTests: XCTestCase {
63
63
let promptFeedback = try XCTUnwrap ( response. promptFeedback)
64
64
XCTAssertNil ( promptFeedback. blockReason)
65
65
XCTAssertEqual ( promptFeedback. safetyRatings, safetyRatingsNegligible)
66
+ XCTAssertEqual ( response. functionCalls, [ ] )
66
67
}
67
68
68
69
func testGenerateContent_success_basicReplyShort( ) async throws {
@@ -86,6 +87,7 @@ final class GenerativeModelTests: XCTestCase {
86
87
let promptFeedback = try XCTUnwrap ( response. promptFeedback)
87
88
XCTAssertNil ( promptFeedback. blockReason)
88
89
XCTAssertEqual ( promptFeedback. safetyRatings, safetyRatingsNegligible)
90
+ XCTAssertEqual ( response. functionCalls, [ ] )
89
91
}
90
92
91
93
func testGenerateContent_success_citations( ) async throws {
@@ -188,6 +190,7 @@ final class GenerativeModelTests: XCTestCase {
188
190
}
189
191
XCTAssertEqual ( functionCall. name, " current_time " )
190
192
XCTAssertTrue ( functionCall. args. isEmpty)
193
+ XCTAssertEqual ( response. functionCalls, [ functionCall] )
191
194
}
192
195
193
196
func testGenerateContent_success_functionCall_noArguments( ) async throws {
@@ -209,6 +212,7 @@ final class GenerativeModelTests: XCTestCase {
209
212
}
210
213
XCTAssertEqual ( functionCall. name, " current_time " )
211
214
XCTAssertTrue ( functionCall. args. isEmpty)
215
+ XCTAssertEqual ( response. functionCalls, [ functionCall] )
212
216
}
213
217
214
218
func testGenerateContent_success_functionCall_withArguments( ) async throws {
@@ -234,6 +238,7 @@ final class GenerativeModelTests: XCTestCase {
234
238
XCTAssertEqual ( argX, . number( 4 ) )
235
239
let argY = try XCTUnwrap ( functionCall. args [ " y " ] )
236
240
XCTAssertEqual ( argY, . number( 5 ) )
241
+ XCTAssertEqual ( response. functionCalls, [ functionCall] )
237
242
}
238
243
239
244
func testGenerateContent_failure_invalidAPIKey( ) async throws {
0 commit comments