Skip to content

Commit 02a65c3

Browse files
Rename UIFramework.Kind.uiKitSwiftUI
1 parent 2f35570 commit 02a65c3

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

Sources/NodesGenerator/StencilTemplate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public enum StencilTemplate: Sendable, Equatable, CustomStringConvertible {
3131
case swiftUI = "-SwiftUI"
3232

3333
public static func variation(for kind: UIFramework.Kind) -> Self {
34-
kind == .swiftUI ? .swiftUI : .default
34+
kind == .uiKitSwiftUI ? .swiftUI : .default
3535
}
3636
}
3737

Sources/NodesGenerator/UIFramework.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public struct UIFramework: Equatable, Codable {
1010

1111
case appKit = "AppKit"
1212
case uiKit = "UIKit"
13-
case swiftUI = "UIKit (SwiftUI)"
13+
case uiKitSwiftUI = "UIKit (SwiftUI)"
1414
case custom = "Custom"
1515

1616
public var name: String {
@@ -38,7 +38,7 @@ public struct UIFramework: Equatable, Codable {
3838
case .uiKit:
3939
return .uiKit
4040
case .uiKitSwiftUI:
41-
return .swiftUI
41+
return .uiKitSwiftUI
4242
case .custom:
4343
return .custom
4444
}
@@ -168,7 +168,7 @@ public struct UIFramework: Equatable, Codable {
168168
self = .appKit
169169
case .uiKit:
170170
self = .uiKit
171-
case .swiftUI:
171+
case .uiKitSwiftUI:
172172
self = .uiKitSwiftUI
173173
case .custom:
174174
throw DecodingError.typeMismatch(Self.self, DecodingError.Context(

Tests/NodesGeneratorTests/StencilTemplateTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class StencilTemplateTests: XCTestCase, TestFactories {
2525
switch kind {
2626
case .appKit, .uiKit, .custom:
2727
expect(variation) == .default
28-
case .swiftUI:
28+
case .uiKitSwiftUI:
2929
expect(variation) == .swiftUI
3030
}
3131
}
@@ -257,7 +257,7 @@ final class StencilTemplateTests: XCTestCase, TestFactories {
257257
uiFrameworkImport = "AppKit"
258258
case .uiKit:
259259
uiFrameworkImport = "UIKit"
260-
case .swiftUI:
260+
case .uiKitSwiftUI:
261261
uiFrameworkImport = "SwiftUI"
262262
case .custom:
263263
uiFrameworkImport = "<uiFrameworkImport>"

Tests/NodesGeneratorTests/UIFrameworkFrameworkTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ final class UIFrameworkFrameworkTests: XCTestCase {
7878

7979
func testUIKitSwiftUI() {
8080
let swiftUI: UIFramework.Framework = .uiKitSwiftUI
81-
expect(swiftUI.kind) == .swiftUI
81+
expect(swiftUI.kind) == .uiKitSwiftUI
8282
expect(swiftUI.name) == "UIKit (SwiftUI)"
8383
expect(swiftUI.import) == "SwiftUI"
8484
expect(swiftUI.viewControllerType) == "UIHostingController"

Tests/NodesGeneratorTests/UIFrameworkKindTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import XCTest
99
final class UIFrameworkKindTests: XCTestCase {
1010

1111
func testAllCases() {
12-
expect(UIFramework.Kind.allCases) == [.appKit, .uiKit, .swiftUI, .custom]
12+
expect(UIFramework.Kind.allCases) == [.appKit, .uiKit, .uiKitSwiftUI, .custom]
1313
}
1414

1515
func testRawValues() {

Tests/NodesGeneratorTests/UIFrameworkTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ final class UIFrameworkTests: XCTestCase {
7777

7878
func testInitWithSwiftUI() {
7979
let framework: UIFramework = .init(framework: .uiKitSwiftUI)
80-
expect(framework.kind) == .swiftUI
80+
expect(framework.kind) == .uiKitSwiftUI
8181
expect(framework.name) == "UIKit (SwiftUI)"
8282
expect(framework.import) == "SwiftUI"
8383
expect(framework.viewControllerType) == "UIHostingController"
@@ -112,7 +112,7 @@ final class UIFrameworkTests: XCTestCase {
112112

113113
private func givenYAML(for kind: UIFramework.Kind) -> String {
114114
switch kind {
115-
case .appKit, .uiKit, .swiftUI:
115+
case .appKit, .uiKit, .uiKitSwiftUI:
116116
return "framework: \(kind.name)"
117117
case .custom:
118118
return """

0 commit comments

Comments
 (0)