         }
     }
 
+    func testNoKern() throws {
+        let styled = "abcd".styled(with: .color(.red))
+
+        let rangesToValuesLine = #line; let rangesToValues: [(NSRange, KernCheckingType)] = [
+            (NSRange(location: 0, length: 4), .none),
+            ]
+
+        checkKerningValues(rangesToValues, startingOnLine: rangesToValuesLine, in: styled)
+    }
+
     func testEffectOfAlignmentOnKerningForOneOffStrings() throws {
         let styled = "abcd".styled(with: .tracking(.point(5)))
 
-        let rangesToValuesLine = #line; let rangesToValues: [(NSRange, Double?)] = [
-            (NSRange(location: 0, length: 3), 5),
-            (NSRange(location: 3, length: 1), nil),
+        let rangesToValuesLine = #line; let rangesToValues: [(NSRange, KernCheckingType)] = [
+            (NSRange(location: 0, length: 3), .kern(5)),
+            (NSRange(location: 3, length: 1), .kernRemoved(5)),
             ]
 
         checkKerningValues(rangesToValues, startingOnLine: rangesToValuesLine, in: styled)


private extension StringStyleTests {

    func checkKerningValues(_ rangesToValues: [(NSRange, Double?)], startingOnLine rangesToValuesLine: Int, in string: NSAttributedString) {
        for (index, rangeToValue) in rangesToValues.enumerated() {

            let line = UInt(rangesToValuesLine + index + 1)

            let (controlRange, controlValue) = rangeToValue
            let trackingEffectiveRange: NSRangePointer = NSRangePointer.allocate(capacity: MemoryLayout<NSRange>.size)
            let trackingValue = string.attribute(.kern, at: controlRange.location, effectiveRange: trackingEffectiveRange)
            guard let trackingAsNumber = trackingValue as? NSNumber? else {
                XCTFail("Unable to convert \(String(describing: trackingValue)) to \((NSNumber?).self)", line: line)
                return
            }

            if let controlValue = controlValue {
                XCTAssertEqual(trackingAsNumber!.doubleValue, controlValue, accuracy: 0.0001, line: line)
                XCTAssertNotNil(trackingEffectiveRange, line: line)
                XCTAssertEqual(trackingEffectiveRange.pointee.location, controlRange.location, line: line)
                XCTAssertEqual(trackingEffectiveRange.pointee.length, controlRange.length, line: line)
            }
            else {
                XCTAssertNil(trackingAsNumber, line: line)
            }

        }
    }


        let cdDefault = "cd".styled(with: .tracking(.point(10)))
        let styled = NSAttributedString.composed(of: [abDefault, cdDefault])

        let rangesToValuesLine = #line; let rangesToValues: [(NSRange, KernCheckingType)] = [
            (NSRange(location: 0, length: 2), .kern(5)),
            (NSRange(location: 2, length: 1), .kern(10)),
            (NSRange(location: 3, length: 1), .kernRemoved(10)),
            ]

        checkKerningValues(rangesToValues, startingOnLine: rangesToValuesLine, in: styled)
