mirror of
https://github.com/gonum/gonum.git
synced 2025-10-21 06:09:26 +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)
|
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) {
|
func TestKolmogorovSmirnov(t *testing.T) {
|
||||||
|
Reference in New Issue
Block a user