test for chi2 special case

Add test for chi squared distance special case, with both bins == 0.
This commit is contained in:
Jonathan J Lawlor
2014-10-19 18:35:42 -04:00
parent f510cbd899
commit 5d7e4d3b79

View File

@@ -570,6 +570,11 @@ func TestChiSquare(t *testing.T) {
q: []float64{50, 50, 50, 50},
res: 12.5,
},
{
p: []float64{40, 60, 30, 45, 0, 0},
q: []float64{50, 50, 50, 50, 0, 0},
res: 12.5,
},
} {
resultpq := ChiSquare(test.p, test.q)