MCPcopy Create free account
hub / github.com/datasweet/datatable / TestSimpleConcat

Function TestSimpleConcat

concat_test.go:50–68  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

48}
49
50func TestSimpleConcat(t *testing.T) {
51 a, b, _ := sampleForConcat(t)
52 dt, err := a.Concat(b)
53 assert.NoError(t, err)
54 assert.Equal(t, "magasin1", dt.Name())
55 assert.Equal(t, 8, dt.NumRows())
56
57 checkTable(t, dt,
58 "prenom", "nom", "ville", "date_naissance", "total_achat",
59 "Léon", "Dupuis", "Paris", time.Date(1983, time.March, 6, 0, 0, 0, 0, time.UTC), int64(135),
60 "Marie", "Bernard", "Paris", time.Date(1993, time.July, 3, 0, 0, 0, 0, time.UTC), int64(75),
61 "Sophie", "Dupond", "Marseille", time.Date(1986, time.February, 22, 0, 0, 0, 0, time.UTC), int64(27),
62 "Marcel", "Martin", "Paris", time.Date(1976, time.November, 24, 0, 0, 0, 0, time.UTC), int64(39),
63 "Marion", "Leroy", "Lyon", time.Date(1982, time.October, 27, 0, 0, 0, 0, time.UTC), int64(285),
64 "Paul", "Moreau", "Lyon", time.Date(1976, time.April, 19, 0, 0, 0, 0, time.UTC), int64(133),
65 "Marie", "Bernard", "Paris", time.Date(1993, time.July, 3, 0, 0, 0, 0, time.UTC), int64(75),
66 "Marcel", "Martin", "Paris", time.Date(1976, time.November, 24, 0, 0, 0, 0, time.UTC), int64(39),
67 )
68}
69
70func TestGrowColConcat(t *testing.T) {
71 a, b, c := sampleForConcat(t)

Callers

nothing calls this directly

Calls 5

sampleForConcatFunction · 0.85
checkTableFunction · 0.85
NumRowsMethod · 0.80
ConcatMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected