• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / arche-model / 4718758755

17 Apr 2023 07:52AM CUT coverage: 96.144% (+0.2%) from 95.946%
4718758755

push

github

GitHub
RowToTable observer adapter (#37)

20 of 20 new or added lines in 2 files covered. (100.0%)

374 of 389 relevant lines covered (96.14%)

135.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/observer/row_to_table.go
1
package observer
2

3
import "github.com/mlange-42/arche/ecs"
4

5
// RowToTable is an observer that serves as adapter from a [Row] observer to a [Table] observer.
6
type RowToTable struct {
7
        Observer Row
8
        values   [1][]float64
9
}
10

11
// Initialize the child observer.
12
func (o *RowToTable) Initialize(w *ecs.World) {
1✔
13
        o.Observer.Initialize(w)
1✔
14
}
1✔
15

16
// Update the child observer.
17
func (o *RowToTable) Update(w *ecs.World) {
1✔
18
        o.Observer.Update(w)
1✔
19
}
1✔
20

21
// Header / column names of the child observer in the same order as data values.
22
func (o *RowToTable) Header() []string {
1✔
23
        return o.Observer.Header()
1✔
24
}
1✔
25

26
// Values for the current model tick in table format.
27
func (o *RowToTable) Values(w *ecs.World) [][]float64 {
2✔
28
        o.values[0] = o.Observer.Values(w)
2✔
29
        return o.values[:]
2✔
30
}
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc