add vendoring with go dep

This commit is contained in:
Adrian Todorov
2017-10-25 20:52:40 +00:00
parent 704f4d20d1
commit a59409f16b
1627 changed files with 489673 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package models
import "testing"
func TestMarshalPointNoFields(t *testing.T) {
points, err := ParsePointsString("m,k=v f=0i")
if err != nil {
t.Fatal(err)
}
// It's unclear how this can ever happen, but we've observed points that were marshalled without any fields.
points[0].(*point).fields = []byte{}
if _, err := points[0].MarshalBinary(); err != ErrPointMustHaveAField {
t.Fatalf("got error %v, exp %v", err, ErrPointMustHaveAField)
}
}