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

Function TestMeanUsingAndXor

math/binary/arithmeticmean_test.go:10–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8import "testing"
9
10func TestMeanUsingAndXor(t *testing.T) {
11 tests := getTests()
12 for _, tv := range tests {
13 t.Run(tv.name, func(t *testing.T) {
14 result := MeanUsingAndXor(tv.a, tv.b)
15 if result != tv.result {
16 t.Errorf("Wrong result! Expected:%d, returned:%d ", tv.result, result)
17 }
18 })
19 }
20
21}
22
23func TestMeanUsingRightShift(t *testing.T) {
24 tests := getTests()

Callers

nothing calls this directly

Calls 2

MeanUsingAndXorFunction · 0.85
getTestsFunction · 0.70

Tested by

no test coverage detected