Skip to content

Instantly share code, notes, and snippets.

@andrewstevenson
Created September 11, 2016 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewstevenson/7578e76d2427c81725527ca782328a88 to your computer and use it in GitHub Desktop.
Save andrewstevenson/7578e76d2427c81725527ca782328a88 to your computer and use it in GitHub Desktop.
local someInputs = {
pb.value{
elements = {
{
value = a,
children = {
{ value = a-a, children = {} },
{ value = a-b, children = {} }
}
},
{
value = b,
children = {
{ value = b-a, children = {} },
{ value = b-b, children = {} }
}
}
}
}
}
local whatWeExpect = {
pb.value{
elements = {
{ value = a, id=1, parent=0 },
{ value = a-a, id=2, parent=1 },
{ value = a-b, id=3, parent=1 },
{ value = b, id=4, parent=0 },
{ value = b-a, id=5, parent=4 },
{ value = b-b, id=6, parent=4 },
}
}
}
return pb
.forInputs(someInputs)
.expectOutputs(whatWeExpect)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment