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

Function TestIsKrishnamurthyNumber

math/krishnamurthy_test.go:32–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30}
31
32func TestIsKrishnamurthyNumber(t *testing.T) {
33 for _, test := range retCases() {
34 t.Run(fmt.Sprintf("%d %s a Krishnamurthy Number", test.input, test.outputString), func(t *testing.T) {
35 res := IsKrishnamurthyNumber(test.input)
36 if res != test.output {
37 t.Errorf("for input %d, expected: %t, found: %t", test.input, test.output, res)
38 }
39 })
40 }
41}
42
43func BenchmarkIsKrishnamurthyNumber(b *testing.B) {
44 for _, test := range retCases() {

Callers

nothing calls this directly

Calls 2

retCasesFunction · 0.85
IsKrishnamurthyNumberFunction · 0.85

Tested by

no test coverage detected