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

Function TestProblem9_Func

project_euler/problem_9/problem9_test.go:6–26  ·  view source on GitHub ↗

Tests

(t *testing.T)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

Problem9Function · 0.85

Tested by

no test coverage detected