MCPcopy
hub / github.com/canopy-network/canopy / TestMultiplication2

Function TestMultiplication2

lib/crypto/classgroup_test.go:70–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestMultiplication2(t *testing.T) {
71 t12_11_3 := NewClassGroup(big.NewInt(12), big.NewInt(11), big.NewInt(3))
72 t93_109_32 := NewClassGroup(big.NewInt(93), big.NewInt(109), big.NewInt(32))
73
74 x := CloneClassGroup(t12_11_3)
75 y := t12_11_3.Multiply(x)
76 require.Equal(t, y, NewClassGroup(big.NewInt(2), big.NewInt(1), big.NewInt(3)), "they should be equal")
77
78 x = CloneClassGroup(t93_109_32)
79 y = t93_109_32.Multiply(x)
80 require.Equal(t, y, NewClassGroup(big.NewInt(2), big.NewInt(-1), big.NewInt(3)), "they should be equal")
81}
82
83func TestMultiplication3(t *testing.T) {
84 t12_11_3 := NewClassGroup(big.NewInt(12), big.NewInt(11), big.NewInt(3))

Callers

nothing calls this directly

Calls 4

MultiplyMethod · 0.95
NewClassGroupFunction · 0.85
CloneClassGroupFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected