Skip to content

Commit 6e9aee0

Browse files
authored
Merge pull request #653 from eyeplum/attributedstring-test-fix
2 parents 155b43e + 0fcbecc commit 6e9aee0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Foundation/NSSwiftRuntime.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ internal func __CFInitializeSwift() {
9191
_CFRuntimeBridgeTypeToClass(_CFKeyedArchiverUIDGetTypeID(), unsafeBitCast(_NSKeyedArchiverUID.self, to: UnsafeRawPointer.self))
9292

9393
// _CFRuntimeBridgeTypeToClass(CFErrorGetTypeID(), unsafeBitCast(NSError.self, UnsafeRawPointer.self))
94-
// _CFRuntimeBridgeTypeToClass(CFAttributedStringGetTypeID(), unsafeBitCast(NSMutableAttributedString.self, UnsafeRawPointer.self))
94+
_CFRuntimeBridgeTypeToClass(CFAttributedStringGetTypeID(), unsafeBitCast(NSMutableAttributedString.self, to: UnsafeRawPointer.self))
9595
// _CFRuntimeBridgeTypeToClass(CFReadStreamGetTypeID(), unsafeBitCast(InputStream.self, UnsafeRawPointer.self))
9696
// _CFRuntimeBridgeTypeToClass(CFWriteStreamGetTypeID(), unsafeBitCast(OutputStream.self, UnsafeRawPointer.self))
9797
_CFRuntimeBridgeTypeToClass(CFRunLoopTimerGetTypeID(), unsafeBitCast(Timer.self, to: UnsafeRawPointer.self))

TestFoundation/TestNSAttributedString.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class TestNSAttributedString : XCTestCase {
2424
static var allTests: [(String, (TestNSAttributedString) -> () throws -> Void)] {
2525
return [
2626
("test_initWithString", test_initWithString),
27-
("test_initWithStringAndAttributes", test_initWithStringAndAttributes)
27+
("test_initWithStringAndAttributes", test_initWithStringAndAttributes),
28+
("test_longestEffectiveRange", test_longestEffectiveRange),
2829
]
2930
}
3031

@@ -97,11 +98,11 @@ class TestNSAttributedString : XCTestCase {
9798

9899
_ = attrString.attribute(attrKey, at: 0, longestEffectiveRange: &range, in: searchRange)
99100
XCTAssertEqual(range.location, 0)
100-
XCTAssertEqual(range.length, 29)
101+
XCTAssertEqual(range.length, 28)
101102

102103
_ = attrString.attributes(at: 0, longestEffectiveRange: &range, in: searchRange)
103104
XCTAssertEqual(range.location, 0)
104-
XCTAssertEqual(range.length, 29)
105+
XCTAssertEqual(range.length, 28)
105106
}
106107

107108
}

0 commit comments

Comments
 (0)