Skip to content

Commit

Permalink
Fix for failing SwiftTemplate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-savelev-bumble committed Dec 22, 2023
1 parent 8f1bd2b commit a09bdf4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public enum AccessLevel: String {
}
"""),
.init(name: "", content:
.init(name: "GenericParameter.swift", content:
"""
import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public enum AccessLevel: String {
}
"""),
.init(name: "GenericParameter", content:
.init(name: "GenericParameter.swift", content:
"""
import Foundation
// For DynamicMemberLookup we need to import Stencil,
Expand Down
6 changes: 6 additions & 0 deletions SourcerySwift/Sources/SwiftTemplate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,12 @@ struct FolderSynchronizer {
struct File {
let name: String
let content: String

init(name: String, content: String) {
assert(name.isEmpty == false)
self.name = name
self.content = content
}
}

func sync(files: [File], to dir: Path) throws {
Expand Down

0 comments on commit a09bdf4

Please sign in to comment.