Closed lucafavatella closed 10 years ago
As agreed with Ed, I will test that tuples end up in the right order adding specific unit tests and updating the pull request.
Ed, Isn't tea_tests:tuple1test enough? (copied below for convenience) If so, I will not update this pull request.
tuple1_test_ () ->
{ok, Tree} = tea:string(" [t <- 1, s <- 2] "),
TimeD = {[0],"t"},
SpaceD = {[0],"s"},
K = [{TimeD,100}, {SpaceD,100}],
D = [TimeD,SpaceD],
fun () ->
?assertMatch({{te,[{TimeD,1},{SpaceD,2}]}, _},
tcore:eval(Tree, [],[],K, D, [0], 0))
end.
Hey Luca, could be enough unless the function varies with bigger contexts (doubtful). The way it works underneath is that the results are sorted at the end of a tthread:join, which should order args / tuples appropriately.
I'll merge this now, I can't see any problems with the pull request.
Also document important assumption.