テストを書きたくない話 / I don't want to write tests

テストを書きたくない話 / I don't want to write tests

2019/10/11に行われた「「テスト」の話を聞いてみようの会」での登壇資料です

9e840766611f942c7c0a9ad6987a5d78?s=128

Naoki Kishida

October 11, 2019
Tweet

Transcript

  1. 4.

       @Test public void testCalc() { assertEquals("1", FizzBuzz.calc(1));

    assertEquals("2", FizzBuzz.calc(2)); assertEquals("Fizz", FizzBuzz.calc(3)); assertEquals("4", FizzBuzz.calc(4)); assertEquals("Buzz", FizzBuzz.calc(5)); assertEquals("Fizz", FizzBuzz.calc(6)); assertEquals("7", FizzBuzz.calc(7)); assertEquals("8", FizzBuzz.calc(8)); assertEquals("Fizz", FizzBuzz.calc(9)); assertEquals("Buzz", FizzBuzz.calc(10)); assertEquals("11", FizzBuzz.calc(11)); assertEquals("Fizz", FizzBuzz.calc(12)); assertEquals("13", FizzBuzz.calc(13)); assertEquals("14", FizzBuzz.calc(14)); assertEquals("FizzBuzz", FizzBuzz.calc(15)); assertEquals("16", FizzBuzz.calc(16)); assertEquals("17", FizzBuzz.calc(17));
  2. 5.

      @Test public void testCalc() { assertEquals("1", FizzBuzz.calc(1)); assertEquals("2",

    FizzBuzz.calc(2)); assertEquals("Fizz", FizzBuzz.calc(3)); assertEquals("4", FizzBuzz.calc(4)); assertEquals("Buzz", FizzBuzz.calc(5)); assertEquals("Fizz", FizzBuzz.calc(6)); assertEquals("7", FizzBuzz.calc(7)); assertEquals("8", FizzBuzz.calc(8)); assertEquals("Fizz", FizzBuzz.calc(9)); assertEquals("Buzz", FizzBuzz.calc(10)); assertEquals("11", FizzBuzz.calc(11)); assertEquals("Fizz", FizzBuzz.calc(12)); assertEquals("13", FizzBuzz.calc(13)); assertEquals("14", FizzBuzz.calc(14)); assertEquals("FizzBuzz", FizzBuzz.calc(15)); assertEquals("16", FizzBuzz.calc(16)); assertEquals("17", FizzBuzz.calc(17)); assertEquals("Fizz", FizzBuzz.calc(18)); assertEquals("19", FizzBuzz.calc(19)); assertEquals("Buzz", FizzBuzz.calc(20));           
  3. 7.

         • (- !' $0 

      • .1  *, " &%/#  •  + ) 
  4. 8.

        • • • • ( •

    ( • • • • ) •
  5. 13.

     •  •  •    

        @Test public void testCalc() { assertEquals("1", FizzBuzz.calc(1)); assertEquals("Fizz", FizzBuzz.calc(3)); assertEquals("Buzz", FizzBuzz.calc(5)); assertEquals("FizzBuzz", FizzBuzz.calc(15)); }
  6. 14.

       •  "'.% &- $/+1  •

     &- $/+1 • $* 5)  •  24 $*,3!0 !# (