Tests
(t *testing.T)
| 4 | |
| 5 | // Tests |
| 6 | func TestProblem14_Func(t *testing.T) { |
| 7 | tests := []struct { |
| 8 | name string |
| 9 | input uint64 |
| 10 | want uint64 |
| 11 | }{ |
| 12 | {"Input 30", 30, 27}, |
| 13 | {"Input 1e6", 1e6, 837799}, |
| 14 | } |
| 15 | |
| 16 | for _, tt := range tests { |
| 17 | t.Run(tt.name, func(t *testing.T) { |
| 18 | got := Problem14(tt.input) |
| 19 | if got != tt.want { |
| 20 | t.Errorf("Problem14() = %v, want %v", got, tt.want) |
| 21 | } |
| 22 | }) |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | // Benchmarks |
| 27 | func BenchmarkProblem14_Func(b *testing.B) { |
nothing calls this directly
no test coverage detected