Debian Codegraph @

dstream/concathorizontal_test.go

raw symbols SCIP
1 package dstream
2
3 import "testing"
4
5 func TestConcatHoriz1(t *testing.T) {
6
7 x := [][]interface{}{
8 {
9 []float64{0, 1, 1},
10 []float64{0, 0, 1, 0},
11 },
12 {
13 []float64{1, 1, 1},
14 []float64{1, 1, 1, 1},
15 },
16 }
17 da := NewFromArrays(x, []string{"x1", "x2"})
18
19 y := [][]interface{}{
20 {
21 []float64{2, 3, 4},
22 []float64{5, 6, 7, 8},
23 },
24 {
25 []float64{9, 8, 7},
26 []float64{6, 5, 4, 3},
27 },
28 }
29 db := NewFromArrays(y, []string{"x3", "x4"})
30
31 z := [][]interface{}{x[0], x[1], y[0], y[1]}
32 de := NewFromArrays(z, []string{"x1", "x2", "x3", "x4"})
33
34 dq := ConcatHorizontal(da, db)
35
36 if !EqualReport(dq, de, true) {
37 t.Fail()
38 }
39 }