esl / ice

Apache License 2.0
2 stars 4 forks source link

Delete tpar:eval_tuple #25

Closed lucafavatella closed 10 years ago

lucafavatella commented 11 years ago

Also document important assumption.

lucafavatella commented 11 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.

lucafavatella commented 11 years ago

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.
et4te commented 10 years ago

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.