MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / TestProblem16_Func

Function TestProblem16_Func

project_euler/problem_16/problem16_test.go:6–23  ·  view source on GitHub ↗

Tests

(t *testing.T)

Source from the content-addressed store, hash-verified

4
5// Tests
6func TestProblem16_Func(t *testing.T) {
7 tests := []struct {
8 name string
9 exponent int64
10 want int64
11 }{
12 {"2^15", 15, 26},
13 {"2^1000", 1000, 1366},
14 }
15
16 for _, tt := range tests {
17 t.Run(tt.name, func(t *testing.T) {
18 if got := Problem16(tt.exponent); got != tt.want {
19 t.Errorf("Problem16() = %v, want %v", got, tt.want)
20 }
21 })
22 }
23}
24
25// Benchmark
26func BenchmarkProblem16_Func(b *testing.B) {

Callers

nothing calls this directly

Calls 1

Problem16Function · 0.85

Tested by

no test coverage detected