Code coverage: functions generated by attached macros get no instrumentation
Swift Forums
Code coverage: functions generated by attached macros get no instrumentation
Code generated by attached macros is invisible to code coverage: no counters are emitted for generated functions under any filename. This isn't mis-attribution — instrumentation is never produced. Setup — an attached member macro adds a method: @attachedattached(member, names: named(isValid)) public macro Validated() = #externalMacro(module: "MyMacros", type: "ValidatedMacro") // expansion adds: // func isValid() -> Bool { // if name.isEmpty { return false } else {@Validatedruereturn @...
0 comments
No comments yet.