Skip to content

Commit

Permalink
Merge branch 'master' of github.com:krzysztofzablocki/Sourcery
Browse files Browse the repository at this point in the history
# Conflicts:
#	Gemfile.lock
  • Loading branch information
art-divin committed Dec 29, 2024
2 parents 0ccb102 + 8161768 commit 05729bb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 24 deletions.
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"swift"
],
"name": "Debug sourcery",
"program": "${workspaceFolder:Sourcery-master}/.build/debug/sourcery",
"program": "${workspaceFolder:Sourcery}/.build/debug/sourcery",
"args": [],
"cwd": "${workspaceFolder:Sourcery-master}",
"cwd": "${workspaceFolder:Sourcery}",
"preLaunchTask": "swift: Build Debug sourcery"
},
{
Expand All @@ -19,9 +19,9 @@
"swift"
],
"name": "Release sourcery",
"program": "${workspaceFolder:Sourcery-master}/.build/release/sourcery",
"program": "${workspaceFolder:Sourcery}/.build/release/sourcery",
"args": [],
"cwd": "${workspaceFolder:Sourcery-master}",
"cwd": "${workspaceFolder:Sourcery}",
"preLaunchTask": "swift: Build Release sourcery"
}
]
Expand Down
18 changes: 0 additions & 18 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,6 @@
"version" : "0.9.1"
}
},
{
"identity" : "cwlcatchexception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlCatchException.git",
"state" : {
"revision" : "f809deb30dc5c9d9b78c872e553261a61177721a",
"version" : "2.0.0"
}
},
{
"identity" : "cwlpreconditiontesting",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state" : {
"revision" : "02b7a39a99c4da27abe03cab2053a9034379639f",
"version" : "2.0.0"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
Expand Down
2 changes: 2 additions & 0 deletions SourceryRuntime/Sources/Linux/AST/MethodParameter_Linux.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class MethodParameter: NSObject, SourceryModel, Typed, Annotated, Diffabl
return asSource
case "index":
return index
case "isOptional":
return isOptional
default:
fatalError("unable to lookup: \(member) in \(self)")
}
Expand Down
5 changes: 3 additions & 2 deletions SourceryTests/SourcerySpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,7 @@ class SourcerySpecTests: QuickSpec {

}

#if canImport(ObjectiveC)
context("given project") {
var originalProject: XcodeProj?

Expand Down Expand Up @@ -1429,15 +1430,14 @@ class SourcerySpecTests: QuickSpec {
}.toNot(throwError())
}

#if canImport(ObjectiveC)
it("links generated files") {
expect {
try Sourcery(cacheDisabled: true, prune: true).processFiles(sources, usingTemplates: templates, output: output, baseIndentation: 0)
}.toNot(throwError())

expect(sourceFilesPaths.contains(outputDir + "Other.generated.swift")).to(beTrue())
}
#endif

it("links generated files when using per file generation") {
templatePath = outputDir + "PerFileGeneration.stencil"
update(code: """
Expand All @@ -1463,6 +1463,7 @@ class SourcerySpecTests: QuickSpec {
}.toNot(throwError())
}
}
#endif
}
}
}
8 changes: 8 additions & 0 deletions Templates/Tests/Context_Linux/AutoMockable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,18 @@ protocol ClosureProtocol: AutoMockable {
func setClosure(_ closure: @escaping () -> Void)
}

protocol NullableClosureProtocol: AutoMockable {
func setClosure(_ closure: (() -> Void)?)
}

protocol MultiClosureProtocol: AutoMockable {
func setClosure(name: String, _ closure: @escaping () -> Void)
}

protocol MultiNullableClosureProtocol: AutoMockable {
func setClosure(name: String, _ closure: (() -> Void)?)
}

protocol NonEscapingClosureProtocol: AutoMockable {
func executeClosure(_ closure: () -> Void)
}
Expand Down

0 comments on commit 05729bb

Please sign in to comment.