File tree 2 files changed +23
-0
lines changed
Sources/SageSwiftKitMacros/MockableMacros
Tests/SageSwiftKitTests/MockableMacrosTests
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,27 @@ public enum AutoMockable: PeerMacro {
64
64
) ,
65
65
memberBlock: MemberBlockSyntax (
66
66
members: try MemberBlockItemListSyntax ( itemsBuilder: {
67
+ // Init
68
+ InitializerDeclSyntax (
69
+ modifiers: . init( itemsBuilder: {
70
+ DeclModifierSyntax ( name: accessLevel. tokenSyntax)
71
+ } ) ,
72
+ signature: . init(
73
+ parameterClause: . init(
74
+ parameters: . init(
75
+ itemsBuilder: { }
76
+ )
77
+ )
78
+ ) ,
79
+ body: . init(
80
+ statements: . init(
81
+ itemsBuilder: {
82
+
83
+ }
84
+ )
85
+ )
86
+ )
87
+
67
88
// Classes that has mock data for each function
68
89
for funcData in functionsToMock {
69
90
ClassMockForFunctionBuilder ( funcData: funcData) . build ( )
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ final class MockableMacrosTests: XCTestCase {
32
32
}
33
33
34
34
internal class PlayingObjectMock: PlayingObject {
35
+ internal init() {
36
+ }
35
37
internal class TmpFunc_Value {
36
38
internal struct Parameters {
37
39
internal let value: String
You can’t perform that action at this time.
0 commit comments