MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / TestProblem14_Func

Function TestProblem14_Func

project_euler/problem_14/problem14_test.go:6–24  ·  view source on GitHub ↗

Tests

(t *testing.T)

Source from the content-addressed store, hash-verified

4
5// Tests
6func 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
27func BenchmarkProblem14_Func(b *testing.B) {

Callers

nothing calls this directly

Calls 1

Problem14Function · 0.85

Tested by

no test coverage detected