Tests
(t *testing.T)
| 4 | |
| 5 | // Tests |
| 6 | func TestProblem9_Func(t *testing.T) { |
| 7 | tests := []struct { |
| 8 | name string |
| 9 | want uint |
| 10 | }{ |
| 11 | { |
| 12 | name: "Testcase 1", |
| 13 | want: 31875000, |
| 14 | }, |
| 15 | } |
| 16 | |
| 17 | for _, tt := range tests { |
| 18 | t.Run(tt.name, func(t *testing.T) { |
| 19 | n := Problem9() |
| 20 | |
| 21 | if n != tt.want { |
| 22 | t.Errorf("Problem9() = %v, want %v", n, tt.want) |
| 23 | } |
| 24 | }) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | // Benchmarks |
| 29 | func BenchmarkProblem9(b *testing.B) { |
nothing calls this directly
no test coverage detected