Refactor SwiftUI extension generation and generation SwiftUI extension for images
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
This commit is contained in:
@ -23,7 +23,8 @@ final class ColorExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = ColorExtensionGenerator.getExtensionContent(colors: colors,
|
||||
staticVar: false,
|
||||
extensionName: "GenColors")
|
||||
extensionName: "GenColors",
|
||||
isSwiftUI: false)
|
||||
|
||||
// Expect
|
||||
let expect = """
|
||||
@ -58,7 +59,8 @@ final class ColorExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = ColorExtensionGenerator.getExtensionContent(colors: colors,
|
||||
staticVar: true,
|
||||
extensionName: "GenColor")
|
||||
extensionName: "GenColor",
|
||||
isSwiftUI: false)
|
||||
|
||||
// Expect
|
||||
let expect = """
|
||||
|
@ -17,7 +17,7 @@ final class ParsedColorTests: XCTestCase {
|
||||
let color = ParsedColor(name: "red", light: "#FF0000", dark: "#0000FF")
|
||||
|
||||
// When
|
||||
let property = color.getColorProperty()
|
||||
let property = color.getColorProperty(isStatic: false, isSwiftUI: false)
|
||||
|
||||
// Expect
|
||||
let expect = """
|
||||
@ -35,7 +35,7 @@ final class ParsedColorTests: XCTestCase {
|
||||
let color = ParsedColor(name: "red", light: "#FF0000", dark: "#0000FF")
|
||||
|
||||
// When
|
||||
let property = color.getColorStaticProperty()
|
||||
let property = color.getColorProperty(isStatic: true, isSwiftUI: false)
|
||||
|
||||
// Expect
|
||||
let expect = """
|
||||
|
Reference in New Issue
Block a user