Instrument program flow
May 20, 2015 ยท View on GitHub
- Given swift file
- Filter to lines that contain statements
- Precede first statement of lines with
println("co.swizzlr.worstthing: __FILE__ // __LINE__"); - Record all occurrences of println insertion
Generate coverage output
- Build special version of module under test with above modifications
- Run test suite against module
- Record output
- Filter by
co.swizzlr.worstthing - Parse line occurrences
- For each line generate
nullif no println statement, or anintdisplaying how many times the statement was triggered.
Submit to coveralls
- Take above output, profit.