Created
September 11, 2016 15:35
-
-
Save andrewstevenson/7578e76d2427c81725527ca782328a88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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