(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func Test_fizzBuzz(t *testing.T) { |
| 9 | type args struct { |
| 10 | n int |
| 11 | } |
| 12 | tests := []struct { |
| 13 | name string |
| 14 | args args |
| 15 | want []string |
| 16 | }{ |
| 17 | { |
| 18 | name: "fizz buzz", |
| 19 | args: args{ |
| 20 | n: 15, |
| 21 | }, |
| 22 | want: []string{ |
| 23 | "1", |
| 24 | "2", |
| 25 | "Fizz", |
| 26 | "4", |
| 27 | "Buzz", |
| 28 | "Fizz", |
| 29 | "7", |
| 30 | "8", |
| 31 | "Fizz", |
| 32 | "Buzz", |
| 33 | "11", |
| 34 | "Fizz", |
| 35 | "13", |
| 36 | "14", |
| 37 | "FizzBuzz", |
| 38 | }, |
| 39 | }, |
| 40 | } |
| 41 | for _, tt := range tests { |
| 42 | t.Run(tt.name, func(t *testing.T) { |
| 43 | assert.Equal(t, tt.want, fizzBuzz(tt.args.n)) |
| 44 | }) |
| 45 | } |
| 46 | } |
nothing calls this directly
no test coverage detected