lang: Output of tests should also show autogrouped resources
This makes our test cases slightly more complete.
This commit is contained in:
@@ -2165,7 +2165,7 @@ func TestAstFunc3(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// stringResFields is a helper function to store a resource graph as a text
|
// stringResFields is a helper function to store a resource graph as a text
|
||||||
// format for test comparisons.
|
// format for test comparisons. This also adds a line for each vertex as well!
|
||||||
func stringResFields(res engine.Res) (string, error) {
|
func stringResFields(res engine.Res) (string, error) {
|
||||||
m, err := engineUtil.ResToParamValues(res)
|
m, err := engineUtil.ResToParamValues(res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -2191,6 +2191,8 @@ func stringResFields(res engine.Res) (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
s += fmt.Sprintf("Vertex: %s\n", x) // add one for the res itself!
|
||||||
|
|
||||||
// add a prefix to each line?
|
// add a prefix to each line?
|
||||||
s = strings.Trim(s, "\n") // trim trailing newlines
|
s = strings.Trim(s, "\n") // trim trailing newlines
|
||||||
for _, f := range strings.Split(s, "\n") {
|
for _, f := range strings.Split(s, "\n") {
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ Field: value[value1].Any = "i am value1"
|
|||||||
Field: value[value2].Any = "i am value2"
|
Field: value[value2].Any = "i am value2"
|
||||||
Field: value[value3].Any = "i am value3"
|
Field: value[value3].Any = "i am value3"
|
||||||
Group: print[print2]: Field: print[print3].Msg = "i am value3"
|
Group: print[print2]: Field: print[print3].Msg = "i am value3"
|
||||||
|
Group: print[print2]: Vertex: print[print3]
|
||||||
Vertex: print[print1]
|
Vertex: print[print1]
|
||||||
Vertex: print[print2]
|
Vertex: print[print2]
|
||||||
Vertex: value[value1]
|
Vertex: value[value1]
|
||||||
|
|||||||
Reference in New Issue
Block a user