Skip to content

Commit 93ae699

Browse files
Fix failing unit test due to wrong key ordering
1 parent 92ac29a commit 93ae699

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

FirebaseAI/Tests/Unit/Types/SchemaTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ final class SchemaTests: XCTestCase {
5757
let json = try XCTUnwrap(String(data: jsonData, encoding: .utf8))
5858
XCTAssertEqual(json, """
5959
{
60-
"title": "\(title)",
6160
"description" : "\(description)",
6261
"format" : "date-time",
6362
"nullable" : true,
63+
"title": "\(title)",
6464
"type" : "STRING"
6565
}
6666
""")
@@ -105,7 +105,6 @@ final class SchemaTests: XCTestCase {
105105
let json = try XCTUnwrap(String(data: jsonData, encoding: .utf8))
106106
XCTAssertEqual(json, """
107107
{
108-
"title": "\(title)",
109108
"description" : "\(description)",
110109
"enum" : [
111110
"NORTH",
@@ -115,6 +114,7 @@ final class SchemaTests: XCTestCase {
115114
],
116115
"format" : "enum",
117116
"nullable" : true,
117+
"title": "\(title)",
118118
"type" : "STRING"
119119
}
120120
""")
@@ -155,12 +155,12 @@ final class SchemaTests: XCTestCase {
155155
let json = try XCTUnwrap(String(data: jsonData, encoding: .utf8))
156156
XCTAssertEqual(json, """
157157
{
158-
"title": "\(title)",
159158
"description" : "\(description)",
160159
"format" : "float",
161160
"maximum" : \(maximum),
162161
"minimum" : \(minimum),
163162
"nullable" : true,
163+
"title": "\(title)",
164164
"type" : "NUMBER"
165165
}
166166
""")
@@ -200,11 +200,11 @@ final class SchemaTests: XCTestCase {
200200
let json = try XCTUnwrap(String(data: jsonData, encoding: .utf8))
201201
XCTAssertEqual(json, """
202202
{
203-
"title": "\(title)",
204203
"description" : "\(description)",
205204
"maximum" : \(maximum),
206205
"minimum" : \(minimum),
207206
"nullable" : true,
207+
"title": "\(title)",
208208
"type" : "NUMBER"
209209
}
210210
""")
@@ -246,12 +246,12 @@ final class SchemaTests: XCTestCase {
246246
let json = try XCTUnwrap(String(data: jsonData, encoding: .utf8))
247247
XCTAssertEqual(json, """
248248
{
249-
"title": "\(title)",
250249
"description" : "\(description)",
251250
"format" : "int32",
252251
"maximum" : \(maximum),
253252
"minimum" : \(minimum),
254253
"nullable" : true,
254+
"title": "\(title)",
255255
"type" : "INTEGER"
256256
}
257257
""")
@@ -283,9 +283,9 @@ final class SchemaTests: XCTestCase {
283283
let json = try XCTUnwrap(String(data: jsonData, encoding: .utf8))
284284
XCTAssertEqual(json, """
285285
{
286-
"title": "\(title)",
287286
"description" : "\(description)",
288287
"nullable" : true,
288+
"title": "\(title)",
289289
"type" : "BOOLEAN"
290290
}
291291
""")
@@ -332,7 +332,6 @@ final class SchemaTests: XCTestCase {
332332
let json = try XCTUnwrap(String(data: jsonData, encoding: .utf8))
333333
XCTAssertEqual(json, """
334334
{
335-
"title": "\(title)",
336335
"description" : "\(description)",
337336
"items" : {
338337
"format" : "int64",
@@ -342,6 +341,7 @@ final class SchemaTests: XCTestCase {
342341
"maxItems" : \(maxItems),
343342
"minItems" : \(minItems),
344343
"nullable" : true,
344+
"title": "\(title)",
345345
"type" : "ARRAY"
346346
}
347347
""")

0 commit comments

Comments
 (0)