diff --git a/Sources/TimecodeKitCore/API Evolution/TimecodeKitCore-API-2.3.1.swift b/Sources/TimecodeKitCore/API Evolution/TimecodeKitCore-API-2.3.1.swift index f1aabb19..8ef69f8a 100644 --- a/Sources/TimecodeKitCore/API Evolution/TimecodeKitCore-API-2.3.1.swift +++ b/Sources/TimecodeKitCore/API Evolution/TimecodeKitCore-API-2.3.1.swift @@ -15,3 +15,8 @@ extension Timecode { stringValueVerbose } } + +extension Timecode.StringFormat { + @available(*, deprecated, message: "Use [.showSubFrames] instead.") + public static let showSubFrames: Self = [.showSubFrames] +} diff --git a/Sources/TimecodeKitCore/Timecode/StringFormat/StringFormat.swift b/Sources/TimecodeKitCore/Timecode/StringFormat/StringFormat.swift index cd8acb93..fff73fe9 100644 --- a/Sources/TimecodeKitCore/Timecode/StringFormat/StringFormat.swift +++ b/Sources/TimecodeKitCore/Timecode/StringFormat/StringFormat.swift @@ -14,9 +14,6 @@ extension Timecode.StringFormat { public static func `default`() -> Self { [] } - - /// Initialize with Show Subframes option enabled. - public static let showSubFrames: Self = [.showSubFrames] } extension Timecode.StringFormat { diff --git a/Tests/TimecodeKitCoreTests/Timecode/Source/Timecode String Tests.swift b/Tests/TimecodeKitCoreTests/Timecode/Source/Timecode String Tests.swift index 2fc26672..e21c810b 100644 --- a/Tests/TimecodeKitCoreTests/Timecode/Source/Timecode String Tests.swift +++ b/Tests/TimecodeKitCoreTests/Timecode/Source/Timecode String Tests.swift @@ -227,12 +227,12 @@ final class Timecode_Source_String_Tests: XCTestCase { let t = item.numberOfDigits == 2 ? "" : "0" // still produces days since we have not clamped it yet - var sv = tc.stringValue(format: .showSubFrames) + var sv = tc.stringValue(format: [.showSubFrames]) XCTAssertEqual(sv, "2 01:02:03:\(t)04.12", "for \(item)") // now omits days since our limit is 24hr and clamped tc.clampComponents() - sv = tc.stringValue(format: .showSubFrames) + sv = tc.stringValue(format: [.showSubFrames]) XCTAssertEqual(sv, "01:02:03:\(t)04.12", "for \(item)") } @@ -245,12 +245,12 @@ final class Timecode_Source_String_Tests: XCTestCase { let t = item.numberOfDigits == 2 ? "" : "0" // still produces days since we have not clamped it yet - var sv = tc.stringValue(format: .showSubFrames) + var sv = tc.stringValue(format: [.showSubFrames]) XCTAssertEqual(sv, "2 01:02:03;\(t)04.12", "for \(item)") // now omits days since our limit is 24hr and clamped tc.clampComponents() - sv = tc.stringValue(format: .showSubFrames) + sv = tc.stringValue(format: [.showSubFrames]) XCTAssertEqual(sv, "01:02:03;\(t)04.12", "for \(item)") } @@ -263,7 +263,7 @@ final class Timecode_Source_String_Tests: XCTestCase { let t = item.numberOfDigits == 2 ? "" : "0" - let sv = tc.stringValue(format: .showSubFrames) + let sv = tc.stringValue(format: [.showSubFrames]) XCTAssertEqual(sv, "2 01:02:03:\(t)04.12", "for \(item)") } @@ -274,7 +274,7 @@ final class Timecode_Source_String_Tests: XCTestCase { let t = item.numberOfDigits == 2 ? "" : "0" - let sv = tc.stringValue(format: .showSubFrames) + let sv = tc.stringValue(format: [.showSubFrames]) XCTAssertEqual(sv, "2 01:02:03;\(t)04.12", "for \(item)") } } diff --git a/Tests/TimecodeKitCoreTests/Timecode/Timecode init Tests.swift b/Tests/TimecodeKitCoreTests/Timecode/Timecode init Tests.swift index adbad494..f1f50b49 100644 --- a/Tests/TimecodeKitCoreTests/Timecode/Timecode init Tests.swift +++ b/Tests/TimecodeKitCoreTests/Timecode/Timecode init Tests.swift @@ -48,7 +48,7 @@ final class Timecode_init_Tests: XCTestCase { let frSep = item.isDrop ? ";" : ":" - XCTAssertEqual(tc.stringValue(format: .showSubFrames), "00:00:00\(frSep)\(frm).00") + XCTAssertEqual(tc.stringValue(format: [.showSubFrames]), "00:00:00\(frSep)\(frm).00") } } }