Skip to content

React test lambda destructuring #39

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

Merged
merged 2 commits into from
Mar 16, 2017
Merged

Conversation

sdavids13
Copy link
Contributor

The original test implementation for the react test via #29 was specifying multiple constructors in order to specify different lambda parameter counts which allowed for a test to be written like: reactor.ComputeCell(one, two) { x, y -> x + y * 10 }. The multiple constructor approach was ditched in favor of a single constructor but taking in a list into a lambda expression which resulted in a test of: reactor.ComputeCell(one, two) { it[0] + it[1] * 10 }

Now that Kotlin 1.1 has come out (#38) we can provide a similar test syntax originally provided by using the new lambda destructuring capability to provide a test of: reactor.ComputeCell(one, two) { (x, y) -> x + y * 10 }.

@sdavids13 sdavids13 merged commit 7b5f1dc into master Mar 16, 2017
@sdavids13 sdavids13 deleted the react-test-lambda-destructuring branch March 16, 2017 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant