mirror of
https://github.com/google/go-jsonnet.git
synced 2025-09-28 17:01:02 +02:00
Stop depending on nil vs empty slice in a test.
It should not make the difference.
This commit is contained in:
parent
5899996502
commit
ba5dc76509
@ -28,7 +28,7 @@ func TestSimpleNull(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Unexpected error: %+v", err)
|
t.Errorf("Unexpected error: %+v", err)
|
||||||
}
|
}
|
||||||
if ast.FreeVariables() != nil {
|
if len(ast.FreeVariables()) != 0 {
|
||||||
t.Errorf("Unexpected free variabled %+v", ast.FreeVariables())
|
t.Errorf("Unexpected free variabled %+v", ast.FreeVariables())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ func TestSimpleLocal(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Unexpected error: %+v", err)
|
t.Errorf("Unexpected error: %+v", err)
|
||||||
}
|
}
|
||||||
if node.FreeVariables() != nil {
|
if len(node.FreeVariables()) != 0 {
|
||||||
t.Errorf("Unexpected free variables %+v in root local. Expected none.", node.FreeVariables())
|
t.Errorf("Unexpected free variables %+v in root local. Expected none.", node.FreeVariables())
|
||||||
}
|
}
|
||||||
returned := node.Body.FreeVariables()
|
returned := node.Body.FreeVariables()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user