diff --git a/Tests/GRDBTests/DatabaseAggregateTests.swift b/Tests/GRDBTests/DatabaseAggregateTests.swift index 5ae2a732e..078a1d253 100644 --- a/Tests/GRDBTests/DatabaseAggregateTests.swift +++ b/Tests/GRDBTests/DatabaseAggregateTests.swift @@ -411,7 +411,7 @@ class DatabaseAggregateTests: GRDBTestCase { func testAggregateStepThrowingCustomError() throws { struct Aggregate : DatabaseAggregate { func step(_ dbValues: [DatabaseValue]) throws { - throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSString(string: NSLocalizedDescriptionKey): "custom error message"]) + throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSLocalizedDescriptionKey: "custom error message"]) } func finalize() -> DatabaseValueConvertible? { fatalError() @@ -502,7 +502,7 @@ class DatabaseAggregateTests: GRDBTestCase { struct Aggregate : DatabaseAggregate { func step(_ dbValues: [DatabaseValue]) { } func finalize() throws -> DatabaseValueConvertible? { - throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSString(string: NSLocalizedDescriptionKey): "custom error message"]) + throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSLocalizedDescriptionKey: "custom error message"]) } } let dbQueue = try makeDatabaseQueue() diff --git a/Tests/GRDBTests/DatabaseFunctionTests.swift b/Tests/GRDBTests/DatabaseFunctionTests.swift index cb263ee5e..05c38a252 100644 --- a/Tests/GRDBTests/DatabaseFunctionTests.swift +++ b/Tests/GRDBTests/DatabaseFunctionTests.swift @@ -335,7 +335,7 @@ class DatabaseFunctionTests: GRDBTestCase { func testFunctionThrowingCustomError() throws { let dbQueue = try makeDatabaseQueue() let fn = DatabaseFunction("f") { dbValues in - throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSString(string: NSLocalizedDescriptionKey): "custom error message"]) + throw NSError(domain: "CustomErrorDomain", code: 123, userInfo: [NSLocalizedDescriptionKey: "custom error message"]) } dbQueue.add(function: fn) try dbQueue.inDatabase { db in