Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RHS merges cleanly with 0.10.0

Signed-off-by: Jon Seymour <[email protected]>
  • Loading branch information
jonseymour committed Feb 29, 2016
2 parents f18d7e7 + 716cdd7 commit 73b3a2a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
8 changes: 6 additions & 2 deletions tsdb/engine/tsm1/bool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ func Test_BooleanEncoder_Multi_Compressed(t *testing.T) {

func Test_BooleanEncoder_Quick(t *testing.T) {
if err := quick.Check(func(values []bool) bool {
expected := values
if values == nil {
expected = []bool{}
}
// Write values to encoder.
enc := tsm1.NewBooleanEncoder()
for _, v := range values {
Expand All @@ -96,8 +100,8 @@ func Test_BooleanEncoder_Quick(t *testing.T) {
}

// Verify that input and output values match.
if !reflect.DeepEqual(values, got) {
t.Fatalf("mismatch:\n\nexp=%+v\n\ngot=%+v\n\n", values, got)
if !reflect.DeepEqual(expected, got) {
t.Fatalf("mismatch:\n\nexp=%#v\n\ngot=%#v\n\n", expected, got)
}

return true
Expand Down
10 changes: 8 additions & 2 deletions tsdb/engine/tsm1/float_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ func TestFloatEncoder_Roundtrip_NaN(t *testing.T) {

func Test_FloatEncoder_Quick(t *testing.T) {
quick.Check(func(values []float64) bool {

expected := values
if values == nil {
expected = []float64{}
}

// Write values to encoder.
enc := tsm1.NewFloatEncoder()
for _, v := range values {
Expand All @@ -225,8 +231,8 @@ func Test_FloatEncoder_Quick(t *testing.T) {
}

// Verify that input and output values match.
if !reflect.DeepEqual(values, got) {
t.Fatalf("mismatch:\n\nexp=%+v\n\ngot=%+v\n\n", values, got)
if !reflect.DeepEqual(expected, got) {
t.Fatalf("mismatch:\n\nexp=%#v\n\ngot=%#v\n\n", expected, got)
}

return true
Expand Down
9 changes: 7 additions & 2 deletions tsdb/engine/tsm1/int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,11 @@ func Test_IntegerEncoder_MinMax(t *testing.T) {

func Test_IntegerEncoder_Quick(t *testing.T) {
quick.Check(func(values []int64) bool {
expected := values
if values == nil {
expected = []int64{} // is this really expected?
}

// Write values to encoder.
enc := NewIntegerEncoder()
for _, v := range values {
Expand All @@ -439,8 +444,8 @@ func Test_IntegerEncoder_Quick(t *testing.T) {
}

// Verify that input and output values match.
if !reflect.DeepEqual(values, got) {
t.Fatalf("mismatch:\n\nexp=%+v\n\ngot=%+v\n\n", values, got)
if !reflect.DeepEqual(expected, got) {
t.Fatalf("mismatch:\n\nexp=%#v\n\ngot=%#v\n\n", expected, got)
}

return true
Expand Down
8 changes: 6 additions & 2 deletions tsdb/engine/tsm1/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ func Test_StringEncoder_Multi_Compressed(t *testing.T) {

func Test_StringEncoder_Quick(t *testing.T) {
quick.Check(func(values []string) bool {
expected := values
if values == nil {
expected = []string{}
}
// Write values to encoder.
enc := NewStringEncoder()
for _, v := range values {
Expand All @@ -114,8 +118,8 @@ func Test_StringEncoder_Quick(t *testing.T) {
}

// Verify that input and output values match.
if !reflect.DeepEqual(values, got) {
t.Fatalf("mismatch:\n\nexp=%+v\n\ngot=%+v\n\n", values, got)
if !reflect.DeepEqual(expected, got) {
t.Fatalf("mismatch:\n\nexp=%#v\n\ngot=%#v\n\n", expected, got)
}

return true
Expand Down

0 comments on commit 73b3a2a

Please sign in to comment.