Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make lambda test cases language independent #33

Open
cjerdonek opened this issue Jan 7, 2012 · 0 comments
Open

Make lambda test cases language independent #33

cjerdonek opened this issue Jan 7, 2012 · 0 comments
Labels
infrastructure structural changes not affecting test content

Comments

@cjerdonek
Copy link
Contributor

Many languages that support Mustache (especially non-scripting languages like C++, Java, C#, etc) are not currently supported by the lambda test cases. It is also non-trivial to write new test cases in the current form.

It occurs to me that the lambda test cases could be written in a language-independent way. Naively, one might think that a dictionary for each lambda of input-output pairs would suffice to define the lambdas for test cases purposes (similar to how partial data is handled in the partial test cases.

However, given our issue #30 discussion, something like an (ordered) list of triples of (expected lambda called, output, expected input args) might be closer to the appropriate structure. The right structure would also address the question of how best to test things like lambda evaluation order and non-caching independent of each other.

Implementers would need to change or add to their test harnesses code (in their respective languages) to create the lambdas from that data. The lambdas would need to include assertions that the expected input is correct. Assertions should probably also be made about the overall (global, across-lambda) evaluation order.

@jgonggrijp jgonggrijp added the infrastructure structural changes not affecting test content label Nov 9, 2023
@mustache mustache locked and limited conversation to collaborators Nov 9, 2023
@jgonggrijp jgonggrijp converted this issue into a discussion Nov 9, 2023
@jgonggrijp jgonggrijp reopened this Nov 9, 2023
@mustache mustache unlocked this conversation Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure structural changes not affecting test content
Projects
None yet
Development

No branches or pull requests

2 participants