// TestLipmaaDecomposition checks whether filtering of Lagrangian works - e.g.
// whether the function returns a slice containing only non-zero roots.
TestLipmaaDecomposition checks whether filtering of Lagrangian works - e.g.
whether the function returns a slice containing only non-zero roots.
// TestLipmaaDecomposition checks whether filtering of Lagrangian works - e . g . // whether the function returns a slice containing only non - zero roots .
func TestLipmaaDecomposition(t *testing.T) {
	tests := []struct {
		n           *big.Int
		expectedLen int
	}{
		{big.NewInt(0), 0},
		{big.NewInt(1), 1},
		{big.NewInt(5), 2},
		{big.NewInt(24), 3},
		{big.NewInt(7), 4},
	}
	for _, test := range tests {
		res, _ := LipmaaDecomposition(test.n)
		assert.Equal(t, len(res), test.expectedLen, "filtering lagrangian does not work")
	}
}
func TestLipmaaDecomposition ( t * testing . T ) { tests := [ ] struct { n * big . Int expectedLen int } { { big . NewInt ( 0 ) , 0 } , { big . NewInt ( 1 ) , 1 } , { big . NewInt ( 5 ) , 2 } , { big . NewInt ( 24 ) , 3 } , { big . NewInt ( 7 ) , 4 } , } for _ , test := range tests { res , _ := LipmaaDecomposition ( test . n ) assert . Equal ( t , len ( res ) , test . expectedLen , " " ) } }
TestLipmaaDecomposition checks whether filtering of Lagrangian works - e.g.
TestLipmaaDecomposition checks whether filtering of Lagrangian works - e . g .