Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33
+6
-2
@@ -76,7 +76,11 @@ func TestEveryReadARenderMakesIsGathered(t *testing.T) {
|
|||||||
func wantGathered(t *testing.T, s *session, tables map[string]*table, label string, gathered []pathRead, renderOnce func()) {
|
func wantGathered(t *testing.T, s *session, tables map[string]*table, label string, gathered []pathRead, renderOnce func()) {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
var reads []pathRead
|
var reads []pathRead
|
||||||
seen := map[readKey]bool{}
|
type traceKey struct {
|
||||||
|
group, path, table string
|
||||||
|
row int
|
||||||
|
}
|
||||||
|
seen := map[traceKey]bool{}
|
||||||
s.trace = &renderTrace{read: func(group, table string, row int, a arm) {
|
s.trace = &renderTrace{read: func(group, table string, row int, a arm) {
|
||||||
if s.trace.repeatDepth != 0 || !isRef(a.key) {
|
if s.trace.repeatDepth != 0 || !isRef(a.key) {
|
||||||
return
|
return
|
||||||
@@ -85,7 +89,7 @@ func wantGathered(t *testing.T, s *session, tables map[string]*table, label stri
|
|||||||
if table != "" {
|
if table != "" {
|
||||||
r.at.pins.add(tables[table], row)
|
r.at.pins.add(tables[table], row)
|
||||||
}
|
}
|
||||||
if k := (readKey{group, a.path, r.at.rowsKey()}); !seen[k] {
|
if k := (traceKey{group, a.path, table, row}); !seen[k] {
|
||||||
seen[k] = true
|
seen[k] = true
|
||||||
reads = append(reads, r)
|
reads = append(reads, r)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user