parent
90af2100b2
commit
674fde4974
|
@ -7,7 +7,7 @@ Pod::Spec.new do |s|
|
|||
s.social_media_url = 'https://twitter.com/sindresorhus'
|
||||
s.authors = { 'Sindre Sorhus' => 'sindresorhus@gmail.com' }
|
||||
s.source = { :git => 'https://github.com/sindresorhus/Defaults.git', :tag => "v#{s.version}" }
|
||||
s.source_files = 'Sources/*.swift'
|
||||
s.source_files = 'Sources/**/*.swift'
|
||||
s.swift_version = '5.0'
|
||||
s.macos.deployment_target = '10.12'
|
||||
s.ios.deployment_target = '10.0'
|
||||
|
|
|
@ -160,9 +160,7 @@
|
|||
8933C7811EB5B7E0000D00A4 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8933C7841EB5B820000D00A4 /* Defaults.swift */,
|
||||
E3EB3E34216507AE0033B089 /* Observation.swift */,
|
||||
E3EB3E32216505920033B089 /* util.swift */,
|
||||
E30E93D822E9425E00530C8F /* Defaults */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
|
@ -192,6 +190,16 @@
|
|||
name = Tests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E30E93D822E9425E00530C8F /* Defaults */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8933C7841EB5B820000D00A4 /* Defaults.swift */,
|
||||
E3EB3E34216507AE0033B089 /* Observation.swift */,
|
||||
E3EB3E32216505920033B089 /* util.swift */,
|
||||
);
|
||||
path = Defaults;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
|
|
|
@ -17,7 +17,7 @@ extension Defaults.Keys {
|
|||
static let key = Key<Bool>("key", default: false)
|
||||
static let url = Key<URL>("url", default: fixtureURL)
|
||||
static let `enum` = Key<FixtureEnum>("enum", default: .oneHour)
|
||||
static let data = Key<Data>("data", default: Data(bytes: []))
|
||||
static let data = Key<Data>("data", default: Data([]))
|
||||
static let date = Key<Date>("date", default: fixtureDate)
|
||||
}
|
||||
|
||||
|
@ -88,9 +88,9 @@ final class DefaultsTests: XCTestCase {
|
|||
}
|
||||
|
||||
func testDataType() {
|
||||
XCTAssertEqual(defaults[.data], Data(bytes: []))
|
||||
XCTAssertEqual(defaults[.data], Data([]))
|
||||
|
||||
let newData = Data(bytes: [0xFF])
|
||||
let newData = Data([0xFF])
|
||||
defaults[.data] = newData
|
||||
XCTAssertEqual(defaults[.data], newData)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue