packagebn256import("crypto/rand""testing")funcTestLatticeReduceCurve(t*testing.T){k,_:=rand.Int(rand.Reader,Order)ks:=curveLattice.decompose(k)ifks[0].BitLen()>130||ks[1].BitLen()>130{t.Fatal("reduction too large")}elseifks[0].Sign()<0||ks[1].Sign()<0{t.Fatal("reduction must be positive")}}funcTestLatticeReduceTarget(t*testing.T){k,_:=rand.Int(rand.Reader,Order)ks:=targetLattice.decompose(k)ifks[0].BitLen()>66||ks[1].BitLen()>66||ks[2].BitLen()>66||ks[3].BitLen()>66{t.Fatal("reduction too large")}elseifks[0].Sign()<0||ks[1].Sign()<0||ks[2].Sign()<0||ks[3].Sign()<0{t.Fatal("reduction must be positive")}}