MCPcopy Create free account
hub / github.com/cogentcore/core / TestAppendRows

Function TestAppendRows

tensor/table/table_test.go:54–76  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

52}
53
54func TestAppendRows(t *testing.T) {
55 st := NewTestTable()
56 dt := NewTestTable()
57 dt.AppendRows(st)
58 dt.AppendRows(st)
59 dt.AppendRows(st)
60 for j := 0; j < 3; j++ {
61 for i := 0; i < st.Rows; i++ {
62 sr := j*3 + i
63 ss := st.StringValue("Str", i)
64 ds := dt.StringValue("Str", sr)
65 assert.Equal(t, ss, ds)
66
67 sf := st.Float("Flt64", i)
68 df := dt.Float("Flt64", sr)
69 assert.Equal(t, sf, df)
70
71 sf = st.Float("Int", i)
72 df = dt.Float("Int", sr)
73 assert.Equal(t, sf, df)
74 }
75 }
76}

Callers

nothing calls this directly

Calls 5

NewTestTableFunction · 0.85
AppendRowsMethod · 0.80
EqualMethod · 0.80
StringValueMethod · 0.65
FloatMethod · 0.65

Tested by

no test coverage detected