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

見てわかるテスト駆動開発

Recruit
August 09, 2024

 見てわかるテスト駆動開発

2024年度リクルート エンジニアコース新人研修の講義資料です

Recruit

August 09, 2024
Tweet

More Decks by Recruit

Other Decks in Technology

Transcript

  1.  ໢ཏ͍ͨ͠ςετγφϦΦͷϦετʢςετϦετʣΛॻ͘  ςετϦετͷத͔Βʮͻͱ͚ͭͩʯબͼग़͠ɺ࣮ࡍʹɺ۩ମతͰɺ࣮ߦՄೳͳςετίʔ υʹ຋༁͠ɺςετ͕ࣦഊ͢Δ͜ͱΛ֬ೝ͢Δ w ͜͜ͰUFTUλάΛ͚ͭͯίϛοτ  ϓϩμΫτίʔυΛมߋ͠ɺ͍·ॻ͍ͨςετʢͱɺͦΕ·Ͱʹॻ͍ͨ͢΂ͯͷςετʣΛ ੒ޭͤ͞ΔʢͦͷաఔͰؾ͍ͮͨ͜ͱ͸ςετϦετʹ௥Ճ͢Δʣ

    w ͜͜ͰGFBUλάΛ͚ͭͯίϛοτ  ඞཁʹԠͯ͡ϦϑΝΫλϦϯάΛߦ͍ɺ࣮૷ͷઃܭΛվળ͢Δ w ͜͜ͰSFGBDUPSλάΛ͚ͭͯԿճ͔ίϛοτ  ςετϦετ͕ۭʹͳΔ·Ͱεςοϓʹ໭ͬͯ܁Γฦ͢ IUUQTXXXDPOWFOUJPOBMDPNNJUTPSHKBW 5%%ͱ(JUͱ$POWFOUJPOBM$P̼NJUT
  2. Write a program that prints the numbers from 1 to

    100. But for multiples of three print “Fizz” instead of the number and for the multiples of fi ve print “Buzz”. For numbers which are multiples of both three and fi ve print “FizzBuzz”. ͔Β·Ͱͷ਺ΛϓϦϯτ͢ΔϓϩάϥϜΛॻ͚ɻ ͨͩ͠ͷഒ਺ͷͱ͖͸਺ͷ୅ΘΓʹň'J[[ʼnͱɺͷഒ ਺ͷͱ͖͸ň#V[[ʼnͱϓϦϯτ͠ɺͱ྆ํͷഒ਺ͷ৔ ߹ʹ͸ň'J[[#V[[ʼnͱϓϦϯτ͢Δ͜ͱɻ http://tickletux.wordpress.com/2007/01/24/using- fi zzbuzz-to- fi nd-developers-who-grok-coding/ http://www.aoky.net/articles/jeff_atwood/why_cant_programmers_program.htm % &. 0 σϞ'J[[#V[[໰୊