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

Function NewTestTable

tensor/table/table_test.go:40–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40func NewTestTable() *Table {
41 dt := NewTable()
42 dt.AddStringColumn("Str")
43 dt.AddFloat64Column("Flt64")
44 dt.AddIntColumn("Int")
45 dt.SetNumRows(3)
46 for i := 0; i < dt.Rows; i++ {
47 dt.SetString("Str", i, strconv.Itoa(i))
48 dt.SetFloat("Flt64", i, float64(i))
49 dt.SetFloat("Int", i, float64(i))
50 }
51 return dt
52}
53
54func TestAppendRows(t *testing.T) {
55 st := NewTestTable()

Callers 1

TestAppendRowsFunction · 0.85

Calls 7

AddStringColumnMethod · 0.95
AddFloat64ColumnMethod · 0.95
AddIntColumnMethod · 0.95
SetNumRowsMethod · 0.95
SetStringMethod · 0.95
SetFloatMethod · 0.95
NewTableFunction · 0.70

Tested by

no test coverage detected