@@ -109,17 +109,17 @@ final class GenerativeModelTests: XCTestCase {
109
109
XCTAssertEqual ( citationSource1. uri, " https://www.example.com/some-citation-1 " )
110
110
XCTAssertEqual ( citationSource1. startIndex, 0 )
111
111
XCTAssertEqual ( citationSource1. endIndex, 128 )
112
- XCTAssertEqual ( citationSource1. license, " " )
112
+ XCTAssertNil ( citationSource1. license)
113
113
let citationSource2 = try XCTUnwrap ( citationMetadata. citationSources [ 1 ] )
114
114
XCTAssertEqual ( citationSource2. uri, " https://www.example.com/some-citation-2 " )
115
115
XCTAssertEqual ( citationSource2. startIndex, 130 )
116
116
XCTAssertEqual ( citationSource2. endIndex, 265 )
117
- XCTAssertEqual ( citationSource2. license, " " )
117
+ XCTAssertNil ( citationSource2. license)
118
118
let citationSource3 = try XCTUnwrap ( citationMetadata. citationSources [ 2 ] )
119
119
XCTAssertEqual ( citationSource3. uri, " https://www.example.com/some-citation-3 " )
120
120
XCTAssertEqual ( citationSource3. startIndex, 272 )
121
121
XCTAssertEqual ( citationSource3. endIndex, 431 )
122
- XCTAssertEqual ( citationSource3. license, " " )
122
+ XCTAssertNil ( citationSource3. license)
123
123
let citationSource4 = try XCTUnwrap ( citationMetadata. citationSources [ 3 ] )
124
124
XCTAssertEqual ( citationSource4. uri, " https://www.example.com/some-citation-4 " )
125
125
XCTAssertEqual ( citationSource4. startIndex, 444 )
@@ -740,15 +740,15 @@ final class GenerativeModelTests: XCTestCase {
740
740
XCTAssertEqual ( citations. count, 8 )
741
741
XCTAssertTrue ( citations
742
742
. contains ( where: {
743
- $0. startIndex == 0 && $0. endIndex == 128 && !$0. uri. isEmpty && $0. license. isEmpty
743
+ $0. startIndex == 0 && $0. endIndex == 128 && !$0. uri. isEmpty && $0. license == nil
744
744
} ) )
745
745
XCTAssertTrue ( citations
746
746
. contains ( where: {
747
- $0. startIndex == 130 && $0. endIndex == 265 && !$0. uri. isEmpty && $0. license. isEmpty
747
+ $0. startIndex == 130 && $0. endIndex == 265 && !$0. uri. isEmpty && $0. license == nil
748
748
} ) )
749
749
XCTAssertTrue ( citations
750
750
. contains ( where: {
751
- $0. startIndex == 272 && $0. endIndex == 431 && !$0. uri. isEmpty && $0. license. isEmpty
751
+ $0. startIndex == 272 && $0. endIndex == 431 && !$0. uri. isEmpty && $0. license == nil
752
752
} ) )
753
753
XCTAssertTrue ( citations
754
754
. contains ( where: {
0 commit comments