Upgrade to Pro — share decks privately, control downloads, hide ads and more …

コードカバレッジとの付き合い方を知ってテストを書く

 コードカバレッジとの付き合い方を知ってテストを書く

Daiki Katayama

April 10, 2019
Tweet

More Decks by Daiki Katayama

Other Decks in Programming

Transcript

  1. ͳͥεςʔτϝϯτΧόϨοδ ͚ͩͳͷ͔ • AppleͷυΩϡϝϯτʹ͸
 ʮCode coverage in Xcode is a

    testing option supported by LLVMʯ ➡ ΧόϨοδऔಘ͸LLVMͷػೳ https://developer.apple.com/library/archive/documentation/DeveloperTools/ Conceptual/testing_with_xcode/chapters/07-code_coverage.html
  2. ClangͷυΩϡϝϯτʹ͸ҎԼͷ 4͕ͭܭଌͰ͖Δͱॻ͍ͯ͋Δ • Function coverage • Instantiation coverage • Line

    coverage • Region coverage ClangͰ৭ʑऔΕΔͳΒಉ͡LLVM࢖͏SwiftͰ΋औΕͳ͍͔ͳ… https://clang.llvm.org/docs/SourceBasedCodeCoverage.html