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

Test like a team.

Test like a team.

Tesing is a discussion.
Testは對話。

さっちゃん

November 10, 2018
Tweet

More Decks by さっちゃん

Other Decks in Programming

Transcript

  1. Test code. test “鳴く” = do meow cat Application code.

    meow :: Cat -> IO () meow cat = do print “Meow”
  2. Test code. Application code. meow :: Cat -> IO ()

    meow cat = do print “Meow” 實裝します
  3. Test code. test “鳴く” = do assert $ meow cat

    Application code. meow :: Cat -> IO () meow cat = do print “Meow” 呼び出してみるよ
  4. Test code. test “鳴く” = do assert $ meow cat

    test “鳴き声” do assert (“Meow” == whatMeow cat) Application code. meow :: Cat -> IO () meow cat = do print $ whatMeow cat whatMeow :: Cat -> String whatMeow cat = “Meow” 難し過ぎんよ 任せるよ 何て鳴くの?
  5. Can you share any tips or techniques you have found

    useful in uncovering bugs? I suppose the biggest tip would be to become a better programmer. In particular, study what functions that programs are calling, and ensure that the calling code is following the rules of those functions 100%. (Theo de Raadt, of OpenBSD)