Add visibility parameters to control scope of generated extension
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:
@ -55,11 +55,11 @@ final class AnalyticsDefinitionTests: XCTestCase {
|
||||
definition.path = "ecran_un/"
|
||||
|
||||
// When
|
||||
let propertyScreen = definition.getProperty()
|
||||
|
||||
let propertyScreen = definition.getProperty(visibility: .internal)
|
||||
|
||||
// Expect
|
||||
let expectScreen = """
|
||||
func logScreenDefinitionName() {
|
||||
internal func logScreenDefinitionName() {
|
||||
logScreen(
|
||||
name: "Ecran un",
|
||||
path: "ecran_un/",
|
||||
@ -76,11 +76,11 @@ final class AnalyticsDefinitionTests: XCTestCase {
|
||||
let definition = AnalyticsDefinition(id: "definition_name", name: "Ecran un", type: .event)
|
||||
|
||||
// When
|
||||
let propertyEvent = definition.getProperty()
|
||||
|
||||
let propertyEvent = definition.getProperty(visibility: .public)
|
||||
|
||||
// Expect
|
||||
let expectEvent = """
|
||||
func logEventDefinitionName() {
|
||||
public func logEventDefinitionName() {
|
||||
logEvent(
|
||||
name: "Ecran un",
|
||||
action: "",
|
||||
@ -99,11 +99,11 @@ final class AnalyticsDefinitionTests: XCTestCase {
|
||||
definition.path = "ecran_un/"
|
||||
|
||||
// When
|
||||
let propertyScreen = definition.getStaticProperty()
|
||||
|
||||
let propertyScreen = definition.getStaticProperty(visibility: .private)
|
||||
|
||||
// Expect
|
||||
let expectScreen = """
|
||||
static func logScreenDefinitionName() {
|
||||
private static func logScreenDefinitionName() {
|
||||
AnalyticsManager.shared.logScreen(
|
||||
name: "Ecran un",
|
||||
path: "ecran_un/",
|
||||
@ -120,11 +120,11 @@ final class AnalyticsDefinitionTests: XCTestCase {
|
||||
let definition = AnalyticsDefinition(id: "definition_name", name: "Ecran un", type: .event)
|
||||
|
||||
// When
|
||||
let propertyEvent = definition.getStaticProperty()
|
||||
|
||||
let propertyEvent = definition.getStaticProperty(visibility: .package)
|
||||
|
||||
// Expect
|
||||
let expectEvent = """
|
||||
static func logEventDefinitionName() {
|
||||
package static func logEventDefinitionName() {
|
||||
AnalyticsManager.shared.logEvent(
|
||||
name: "Ecran un",
|
||||
action: "",
|
||||
|
Reference in New Issue
Block a user