mirror of
https://github.com/gonum/gonum.git
synced 2025-10-20 05:54:41 +08:00
Add test for JensenShannon panic
Add test when p and q have different lengths.
This commit is contained in:
@@ -496,6 +496,9 @@ func TestJensenShannon(t *testing.T) {
|
||||
t.Errorf("JS mismatch case %v. Expected %v, found %v.", i, js1, js2)
|
||||
}
|
||||
}
|
||||
if !Panics(func() { JensenShannon(make([]float64, 3), make([]float64, 2)) }) {
|
||||
t.Errorf("JensenShannon did not panic with p, q length mismatch")
|
||||
}
|
||||
}
|
||||
|
||||
func TestKolmogorovSmirnov(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user