Skip to content

Commit 12890d9

Browse files
committed
Update to DevTesting 1.0.0-beta.9
1 parent 70d4867 commit 12890d9

11 files changed

Lines changed: 26 additions & 26 deletions

File tree

App/DevKeychain.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
};
181181
};
182182
};
183-
buildConfigurationList = 4C135EBE2E088223008CE477 /* Build configuration list for PBXProject "DevKeychainApp" */;
183+
buildConfigurationList = 4C135EBE2E088223008CE477 /* Build configuration list for PBXProject "DevKeychain" */;
184184
developmentRegion = en;
185185
hasScannedForEncodings = 0;
186186
knownRegions = (
@@ -487,7 +487,7 @@
487487
/* End XCBuildConfiguration section */
488488

489489
/* Begin XCConfigurationList section */
490-
4C135EBE2E088223008CE477 /* Build configuration list for PBXProject "DevKeychainApp" */ = {
490+
4C135EBE2E088223008CE477 /* Build configuration list for PBXProject "DevKeychain" */ = {
491491
isa = XCConfigurationList;
492492
buildConfigurations = (
493493
4C135EE32E088224008CE477 /* Debug */,
@@ -530,7 +530,7 @@
530530
requirement = {
531531
kind = versionRange;
532532
maximumVersion = 2.0.0;
533-
minimumVersion = "1.0.0-beta.8";
533+
minimumVersion = "1.0.0-beta.9";
534534
};
535535
};
536536
/* End XCRemoteSwiftPackageReference section */

App/DevKeychain.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

App/Tests/DevKeychainAppTests/GenericPasswordIntegrationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct GenericPasswordIntegrationTests: RandomValueGenerating {
1919
mutating func addQueryAndDeleteItems() throws {
2020
let service = randomAlphanumericString(count: 64)
2121
let accounts = Array(
22-
Set(count: random(Int.self, in: 3 ... 5)) {
22+
Set(count: randomInt(in: 3 ... 5)) {
2323
randomAlphanumericString()
2424
}
2525
)

App/Tests/DevKeychainAppTests/InternetPasswordIntegrationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct InternetPasswordIntegrationTests: RandomValueGenerating {
1919
mutating func addQueryAndDeleteItems() throws {
2020
let server = randomAlphanumericString(count: 64)
2121
let accounts = Array(
22-
Set(count: random(Int.self, in: 3 ... 5)) {
22+
Set(count: randomInt(in: 3 ... 5)) {
2323
randomAlphanumericString()
2424
}
2525
)

App/Tests/DevKeychainAppTests/StandardKeychainServicesTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct StandardKeychainServicesTests: RandomValueGenerating {
1919
mutating func addQueryAndDeleteItemsSucceeds() throws {
2020
let service = randomAlphanumericString(count: 64)
2121
let accounts = Array(
22-
Set(count: random(Int.self, in: 3 ... 5)) {
22+
Set(count: randomInt(in: 3 ... 5)) {
2323
randomAlphanumericString()
2424
}
2525
)

Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let package = Package(
2222
)
2323
],
2424
dependencies: [
25-
.package(url: "https://github.com/DevKitOrganization/DevTesting", from: "1.0.0-beta.7")
25+
.package(url: "https://github.com/DevKitOrganization/DevTesting", from: "1.0.0-beta.9")
2626
],
2727
targets: [
2828
.target(

Tests/DevKeychainTests/Core/KeychainTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ struct KeychainTests: RandomValueGenerating {
164164

165165
// Create some overlap between query dictionary and return dictionary
166166
var attributesDictionary = randomKeychainDictionary() as [CFString: Any]
167-
attributesDictionary[kSecMatchLimit] = random(Float64.self, in: -10 ... 0)
168-
attributesDictionary[kSecMatchCaseInsensitive] = random(Int.self, in: 2 ... .max)
167+
attributesDictionary[kSecMatchLimit] = randomFloat64(in: -10 ... 0)
168+
attributesDictionary[kSecMatchCaseInsensitive] = randomInt(in: 2 ... .max)
169169

170170
var returnDictionary = randomKeychainDictionary() as [CFString: Any]
171171
returnDictionary[attributesDictionary.keys.randomElement()!] = randomAlphanumericString()
172-
returnDictionary[kSecMatchLimit] = random(Float64.self, in: -10 ... 0)
173-
returnDictionary[kSecMatchCaseInsensitive] = random(Int.self, in: 2 ... .max)
172+
returnDictionary[kSecMatchLimit] = randomFloat64(in: -10 ... 0)
173+
returnDictionary[kSecMatchCaseInsensitive] = randomInt(in: 2 ... .max)
174174

175175
let keychainService = MockKeychainServices()
176176
keychainService.itemsStub = ThrowingStub(defaultResult: .success(expectedObject))
@@ -181,7 +181,7 @@ struct KeychainTests: RandomValueGenerating {
181181
query.returnDictionaryStub = Stub(defaultReturnValue: returnDictionary)
182182

183183
var options = randomKeychainQueryOptions()
184-
options.limit = isLimitNil ? nil : random(Int.self, in: 1 ... .max)
184+
options.limit = isLimitNil ? nil : randomInt(in: 1 ... .max)
185185

186186
let convertedValue = randomUUID()
187187
query.mapStub = ThrowingStub(defaultResult: .success([convertedValue]))
@@ -244,7 +244,7 @@ struct Keychain_QueryOptionsTests: RandomValueGenerating {
244244
@Test
245245
mutating func initSetsValues() {
246246
let isCaseInsensitive = randomBool()
247-
let limit = randomOptional(random(Int.self, in: .min ... .max))
247+
let limit = randomOptional(randomInt(in: .min ... .max))
248248
let options = Keychain.QueryOptions(isCaseInsensitive: isCaseInsensitive, limit: limit)
249249
#expect(options.isCaseInsensitive == isCaseInsensitive)
250250
#expect(options.limit == limit)
@@ -254,7 +254,7 @@ struct Keychain_QueryOptionsTests: RandomValueGenerating {
254254
@Test(arguments: [false, true])
255255
mutating func oteamptionDictionaryIsCorrect(isLimitNil: Bool) {
256256
let isCaseInsensitive = randomBool()
257-
let limit = isLimitNil ? nil : random(Int.self, in: .min ... .max)
257+
let limit = isLimitNil ? nil : randomInt(in: .min ... .max)
258258
let options = Keychain.QueryOptions(isCaseInsensitive: isCaseInsensitive, limit: limit)
259259

260260
let expected: [CFString: Any] = [

Tests/DevKeychainTests/Keychain Items/GenericPasswordTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ struct GenericPasswordTests: RandomValueGenerating {
8787

8888
for (key, type) in keysAndTypes {
8989
var attributes = dictionary
90-
attributes[key] = random(Int.self, in: .min ... .max)
90+
attributes[key] = randomInt(in: .min ... .max)
9191

9292
#expect(throws: KeychainItemMappingError.attributeTypeMismatch(attribute: key as String, type: type)) {
9393
_ = try GenericPassword(attributes: attributes)
@@ -327,7 +327,7 @@ struct GenericPassword_QueryTests: RandomValueGenerating {
327327
account: randomOptional(randomAlphanumericString())
328328
)
329329

330-
let expectedItems = Array(count: random(Int.self, in: 3 ... 5)) {
330+
let expectedItems = Array(count: randomInt(in: 3 ... 5)) {
331331
GenericPassword(
332332
service: randomAlphanumericString(),
333333
account: randomAlphanumericString(),

Tests/DevKeychainTests/Keychain Items/InternetPasswordTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ struct InternetPasswordTests: RandomValueGenerating {
8787

8888
for (key, type) in keysAndTypes {
8989
var attributes = dictionary
90-
attributes[key] = random(Int.self, in: .min ... .max)
90+
attributes[key] = randomInt(in: .min ... .max)
9191

9292
#expect(throws: KeychainItemMappingError.attributeTypeMismatch(attribute: key as String, type: type)) {
9393
_ = try InternetPassword(attributes: attributes)
@@ -327,7 +327,7 @@ struct InternetPassword_QueryTests: RandomValueGenerating {
327327
account: randomOptional(randomAlphanumericString())
328328
)
329329

330-
let expectedItems = Array(count: random(Int.self, in: 3 ... 5)) {
330+
let expectedItems = Array(count: randomInt(in: 3 ... 5)) {
331331
InternetPassword(
332332
server: randomAlphanumericString(),
333333
account: randomAlphanumericString(),

0 commit comments

Comments
 (0)