Add function to check is YNode zero

This commit is contained in:
Donny Xia
2020-12-11 14:52:35 -08:00
parent cc43a2d732
commit bae3228557
4 changed files with 30 additions and 1 deletions

View File

@@ -750,6 +750,10 @@ func TestRNodeIsNilOrEmpty(t *testing.T) {
if NewListRNode("foo").IsNilOrEmpty() {
t.Fatalf("non-empty list should not be empty")
}
if !NewRNode(&Node{}).IsNilOrEmpty() {
t.Fatalf("zero YNode should be empty")
}
}
const deploymentJSON = `