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

Function TestProblem13_Func

project_euler/problem_13/problem13_test.go:5–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3import "testing"
4
5func TestProblem13_Func(t *testing.T) {
6 tests := []struct {
7 name string
8 expected string
9 }{
10 {"Test Case 1", "5537376230"},
11 }
12
13 for _, tt := range tests {
14 t.Run(tt.name, func(t *testing.T) {
15 actual := Problem13()
16 if actual != tt.expected {
17 t.Errorf("Expected: %v, but got %v", tt.expected, actual)
18 }
19 })
20 }
21}
22
23func BenchmarkProblem13_Func(b *testing.B) {
24 for i := 0; i < b.N; i++ {

Callers

nothing calls this directly

Calls 1

Problem13Function · 0.85

Tested by

no test coverage detected