| 1 | package dstream |
| 2 | |
| 3 | import "testing" |
| 4 | |
| 5 | func TestNewFromContig(t *testing.T) { |
| 6 | |
| 7 | chunked := [][]interface{}{ |
| 8 | {[]float64{1, 2, 3, 4, 5}}, |
| 9 | {[]float64{3, 2, 1, 0, 0}}, |
| 10 | } |
| 11 | |
| 12 | contig := []interface{}{ |
| 13 | []float64{1, 2, 3, 4, 5}, |
| 14 | []float64{3, 2, 1, 0, 0}, |
| 15 | } |
| 16 | |
| 17 | names := []string{"x", "y"} |
| 18 | |
| 19 | dchunked := NewFromArrays(chunked, names) |
| 20 | dcontig := NewFromFlat(contig, names) |
| 21 | |
| 22 | if !EqualReport(dchunked, dcontig, true) { |
| 23 | t.Fail() |
| 24 | } |
| 25 | } |