Explorar o código

added minimal test for my decay store thing

Dan Frank %!s(int64=13) %!d(string=hai) anos
pai
achega
dfd9e5ecc7
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      epsilon_decay_test.go

+ 13 - 0
epsilon_decay_test.go

@@ -0,0 +1,13 @@
+package hostpool
+
+import (
+	"github.com/bmizerany/assert"
+	"log"
+	"testing"
+)
+
+func TestEDS(t *testing.T) {
+	eds := NewDecayStore()
+	eds.Record(1.5)
+	assert.Equal(t, eds.GetWeightedAvgScore(), 1.5)
+}