Fixed a low level bug with locating nodes.

locating nodes was looking through two levels to locate something. This is not the correct behavior, after making the change - lots of tests needed to be updated to be correct in what they put into as a the root node.
This commit is contained in:
Dave Shanley
2022-11-04 09:50:20 -04:00
parent 131513a6f6
commit a184c5e909
34 changed files with 220 additions and 161 deletions

View File

@@ -23,7 +23,7 @@ x-cake: hot`
idx := index.NewSpecIndex(&idxNode)
var n Example
err := low.BuildModel(&idxNode, &n)
err := low.BuildModel(idxNode.Content[0], &n)
assert.NoError(t, err)
err = n.Build(idxNode.Content[0], idx)
@@ -49,7 +49,7 @@ x-cake: hot`
idx := index.NewSpecIndex(&idxNode)
var n Example
err := low.BuildModel(&idxNode, &n)
err := low.BuildModel(idxNode.Content[0], &n)
assert.NoError(t, err)
err = n.Build(idxNode.Content[0], idx)
@@ -76,7 +76,7 @@ value:
idx := index.NewSpecIndex(&idxNode)
var n Example
err := low.BuildModel(&idxNode, &n)
err := low.BuildModel(idxNode.Content[0], &n)
assert.NoError(t, err)
err = n.Build(idxNode.Content[0], idx)
@@ -107,7 +107,7 @@ value:
idx := index.NewSpecIndex(&idxNode)
var n Example
err := low.BuildModel(&idxNode, &n)
err := low.BuildModel(idxNode.Content[0], &n)
assert.NoError(t, err)
err = n.Build(idxNode.Content[0], idx)