Rename staticVar with isStatic
All checks were successful
gitea-openium/resgen.swift/pipeline/pr-master This commit looks good
All checks were successful
gitea-openium/resgen.swift/pipeline/pr-master This commit looks good
This commit is contained in:
@@ -233,7 +233,7 @@ final class AnalyticsGeneratorTests: XCTestCase {
|
||||
targets: [TrackerType.firebase],
|
||||
sections: [sectionOne, sectionTwo, sectionThree],
|
||||
tags: ["ios", "iosonly"],
|
||||
staticVar: false,
|
||||
isStatic: false,
|
||||
visibility: .public
|
||||
)
|
||||
|
||||
@@ -398,7 +398,7 @@ final class AnalyticsGeneratorTests: XCTestCase {
|
||||
targets: [TrackerType.matomo],
|
||||
sections: [sectionOne, sectionTwo, sectionThree],
|
||||
tags: ["ios", "iosonly"],
|
||||
staticVar: false,
|
||||
isStatic: false,
|
||||
visibility: .package
|
||||
)
|
||||
// Expect Analytics
|
||||
@@ -565,7 +565,7 @@ final class AnalyticsGeneratorTests: XCTestCase {
|
||||
targets: [TrackerType.matomo, TrackerType.firebase],
|
||||
sections: [sectionOne, sectionTwo, sectionThree],
|
||||
tags: ["ios", "iosonly"],
|
||||
staticVar: false,
|
||||
isStatic: false,
|
||||
visibility: .internal
|
||||
)
|
||||
|
||||
|
@@ -23,7 +23,7 @@ final class ColorExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = ColorExtensionGenerator.getExtensionContent(
|
||||
colors: colors,
|
||||
staticVar: false,
|
||||
isStatic: false,
|
||||
extensionName: "GenColors",
|
||||
isSwiftUI: false,
|
||||
visibility: .public,
|
||||
@@ -53,7 +53,7 @@ final class ColorExtensionGeneratorTests: XCTestCase {
|
||||
XCTAssertEqual(extensionContent.adaptForXCTest(), expect.adaptForXCTest())
|
||||
}
|
||||
|
||||
func test_uiKit_GeneratedExtensionContentForStaticVar() {
|
||||
func test_uiKit_GeneratedExtensionContentForIsStatic() {
|
||||
// Given
|
||||
let colors = [
|
||||
ParsedColor(name: "colorOne", light: "#FF00FF", dark: "#00FF00"),
|
||||
@@ -63,7 +63,7 @@ final class ColorExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = ColorExtensionGenerator.getExtensionContent(
|
||||
colors: colors,
|
||||
staticVar: true,
|
||||
isStatic: true,
|
||||
extensionName: "GenColor",
|
||||
isSwiftUI: false,
|
||||
visibility: .public,
|
||||
@@ -103,7 +103,7 @@ final class ColorExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = ColorExtensionGenerator.getExtensionContent(
|
||||
colors: colors,
|
||||
staticVar: false,
|
||||
isStatic: false,
|
||||
extensionName: "GenColors",
|
||||
isSwiftUI: true,
|
||||
visibility: .package,
|
||||
@@ -133,7 +133,7 @@ final class ColorExtensionGeneratorTests: XCTestCase {
|
||||
XCTAssertEqual(extensionContent.adaptForXCTest(), expect.adaptForXCTest())
|
||||
}
|
||||
|
||||
func test_swiftUI_GeneratedExtensionContentForStaticVar() {
|
||||
func test_swiftUI_GeneratedExtensionContentForIsStatic() {
|
||||
// Given
|
||||
let colors = [
|
||||
ParsedColor(name: "colorOne", light: "#FF00FF", dark: "#00FF00"),
|
||||
@@ -143,7 +143,7 @@ final class ColorExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = ColorExtensionGenerator.getExtensionContent(
|
||||
colors: colors,
|
||||
staticVar: true,
|
||||
isStatic: true,
|
||||
extensionName: "GenColor",
|
||||
isSwiftUI: true,
|
||||
visibility: .internal,
|
||||
|
@@ -23,7 +23,7 @@ final class FontExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = FontExtensionGenerator.getExtensionContent(
|
||||
fontsNames: fontNames,
|
||||
staticVar: false,
|
||||
isStatic: false,
|
||||
extensionName: "GenFonts",
|
||||
isSwiftUI: false,
|
||||
visibility: .public
|
||||
@@ -69,7 +69,7 @@ final class FontExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = FontExtensionGenerator.getExtensionContent(
|
||||
fontsNames: fontNames,
|
||||
staticVar: false,
|
||||
isStatic: false,
|
||||
extensionName: "GenFonts",
|
||||
isSwiftUI: true,
|
||||
visibility: .package
|
||||
|
@@ -23,7 +23,7 @@ final class ImageExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = ImageExtensionGenerator.getExtensionContent(
|
||||
images: images,
|
||||
staticVar: false,
|
||||
isStatic: false,
|
||||
extensionName: "GenImages",
|
||||
inputFilename: "myInputFilename",
|
||||
isSwiftUI: false,
|
||||
@@ -53,7 +53,7 @@ final class ImageExtensionGeneratorTests: XCTestCase {
|
||||
XCTAssertEqual(extensionContent.adaptForXCTest(), expect.adaptForXCTest())
|
||||
}
|
||||
|
||||
func test_uiKit_GeneratedExtensionContentForStaticVar() {
|
||||
func test_uiKit_GeneratedExtensionContentForIsStatic() {
|
||||
// Given
|
||||
let images = [
|
||||
ParsedImage(name: "image_one", tags: "id", width: 10, height: 10),
|
||||
@@ -63,7 +63,7 @@ final class ImageExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = ImageExtensionGenerator.getExtensionContent(
|
||||
images: images,
|
||||
staticVar: true,
|
||||
isStatic: true,
|
||||
extensionName: "GenImages",
|
||||
inputFilename: "myInputFilename",
|
||||
isSwiftUI: false,
|
||||
@@ -103,7 +103,7 @@ final class ImageExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = ImageExtensionGenerator.getExtensionContent(
|
||||
images: images,
|
||||
staticVar: false,
|
||||
isStatic: false,
|
||||
extensionName: "GenImages",
|
||||
inputFilename: "myInputFilename",
|
||||
isSwiftUI: true,
|
||||
@@ -133,7 +133,7 @@ final class ImageExtensionGeneratorTests: XCTestCase {
|
||||
XCTAssertEqual(extensionContent.adaptForXCTest(), expect.adaptForXCTest())
|
||||
}
|
||||
|
||||
func test_swiftUI_GeneratedExtensionContentForStaticVar() {
|
||||
func test_swiftUI_GeneratedExtensionContentForIsStatic() {
|
||||
// Given
|
||||
let images = [
|
||||
ParsedImage(name: "image_one", tags: "id", width: 10, height: 10),
|
||||
@@ -143,7 +143,7 @@ final class ImageExtensionGeneratorTests: XCTestCase {
|
||||
// When
|
||||
let extensionContent = ImageExtensionGenerator.getExtensionContent(
|
||||
images: images,
|
||||
staticVar: true,
|
||||
isStatic: true,
|
||||
extensionName: "GenImages",
|
||||
inputFilename: "myInputFilename",
|
||||
isSwiftUI: true,
|
||||
|
@@ -11,7 +11,7 @@ import ToolCore
|
||||
extension StringsFileGeneratorTests {
|
||||
|
||||
static func getExtensionContentExpectation(
|
||||
staticVar: Bool,
|
||||
isStatic: Bool,
|
||||
s1DefOneFr: String = "Section Un - Definition Un",
|
||||
s1DefOneComment: String = "",
|
||||
s1DefTwoFr: String = "Section Un - Definition Deux",
|
||||
@@ -55,7 +55,7 @@ extension StringsFileGeneratorTests {
|
||||
///
|
||||
/// Comment :
|
||||
/// \(s1DefOneComment.isEmpty ? "No comment" : s1DefOneComment)
|
||||
\(visibility) \(staticVar ? "static " : "")var s1_def_one: String {
|
||||
\(visibility) \(isStatic ? "static " : "")var s1_def_one: String {
|
||||
NSLocalizedString("s1_def_one", tableName: kStringsFileName, bundle: Bundle.\(assetBundle), value: "Section Un - Definition Un", comment: "\(s1DefOneComment)")
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ extension StringsFileGeneratorTests {
|
||||
///
|
||||
/// Comment :
|
||||
/// \(s1DefTwoComment.isEmpty ? "No comment" : s1DefTwoComment)
|
||||
\(visibility) \(staticVar ? "static " : "")var s1_def_two: String {
|
||||
\(visibility) \(isStatic ? "static " : "")var s1_def_two: String {
|
||||
NSLocalizedString("s1_def_two", tableName: kStringsFileName, bundle: Bundle.\(assetBundle), value: "Section Un - Definition Deux", comment: "\(s1DefTwoComment)")
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ extension StringsFileGeneratorTests {
|
||||
///
|
||||
/// Comment :
|
||||
/// \(s2DefOneComment.isEmpty ? "No comment" : s2DefOneComment)
|
||||
\(visibility) \(staticVar ? "static " : "")var s2_def_one: String {
|
||||
\(visibility) \(isStatic ? "static " : "")var s2_def_one: String {
|
||||
NSLocalizedString("s2_def_one", tableName: kStringsFileName, bundle: Bundle.\(assetBundle), value: "Section Deux - Definition Un", comment: "\(s2DefOneComment)")
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ extension StringsFileGeneratorTests {
|
||||
///
|
||||
/// Comment :
|
||||
/// \(s2DefTwoComment.isEmpty ? "No comment" : s2DefTwoComment)
|
||||
\(visibility) \(staticVar ? "static " : "")var s2_def_two: String {
|
||||
\(visibility) \(isStatic ? "static " : "")var s2_def_two: String {
|
||||
NSLocalizedString("s2_def_two", tableName: kStringsFileName, bundle: Bundle.\(assetBundle), value: "Section Deux - Definition Deux", comment: "\(s2DefTwoComment)")
|
||||
}
|
||||
}
|
||||
|
@@ -387,7 +387,7 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
// Expect
|
||||
let expect = Self.getExtensionContentExpectation(
|
||||
staticVar: false
|
||||
isStatic: false
|
||||
)
|
||||
|
||||
if extensionContent != expect {
|
||||
@@ -422,7 +422,7 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
// Expect
|
||||
let expect = Self.getExtensionContentExpectation(
|
||||
staticVar: false,
|
||||
isStatic: false,
|
||||
s1DefOneComment: "This is a comment",
|
||||
s1DefTwoComment: "This is a comment",
|
||||
s2DefOneComment: "This is a comment",
|
||||
@@ -437,7 +437,7 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
}
|
||||
|
||||
// MARK: - Extension Content Static
|
||||
func testGeneratedExtensionContentWithStaticVar() {
|
||||
func testGeneratedExtensionContentWithIsStatic() {
|
||||
// Given
|
||||
let sectionOne = Section.Mock.getSectionOne()
|
||||
let sectionTwo = Section.Mock.getSectionTwo()
|
||||
@@ -457,7 +457,7 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
// Expect
|
||||
let expect = Self.getExtensionContentExpectation(
|
||||
staticVar: true,
|
||||
isStatic: true,
|
||||
visibility: .package,
|
||||
assetBundle: .module
|
||||
)
|
||||
@@ -468,7 +468,7 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
XCTAssertEqual(extensionContent.adaptForXCTest(), expect.adaptForXCTest())
|
||||
}
|
||||
|
||||
func testGeneratedExtensionContentWithStaticVarWithComment() {
|
||||
func testGeneratedExtensionContentWithIsStaticWithComment() {
|
||||
// Given
|
||||
let sectionOne = Section.Mock.getSectionOne(
|
||||
defOneComment: "This is a comment",
|
||||
@@ -494,7 +494,7 @@ final class StringsFileGeneratorTests: XCTestCase {
|
||||
|
||||
// Expect
|
||||
let expect = Self.getExtensionContentExpectation(
|
||||
staticVar: true,
|
||||
isStatic: true,
|
||||
s1DefOneComment: "This is a comment",
|
||||
s1DefTwoComment: "This is a comment",
|
||||
s2DefOneComment: "This is a comment",
|
||||
|
Reference in New Issue
Block a user