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

HOWTO create a Scala kata #338

Open
hobovsky opened this issue Jul 13, 2021 · 3 comments
Open

HOWTO create a Scala kata #338

hobovsky opened this issue Jul 13, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation kind/tutorial New Tutorial language/scala

Comments

@hobovsky
Copy link
Contributor

hobovsky commented Jul 13, 2021

  • Test suite styles: https://www.scalatest.org/user_guide/selecting_a_style
  • Be careful with generated tests: test suite crashes with incomprehensible error if names of test cases are not unique
  • Long startup time
  • Be aware of java interop for kata with code restrictions
  • How to override default assertion messages?
@hobovsky hobovsky added documentation Improvements or additions to documentation kind/tutorial New Tutorial language/scala labels Jul 13, 2021
@error256
Copy link
Contributor

  • ScalaTest does shrinking itself and doesn't care how input is generated, so if, for example, a ScalaCheck generator is used to generate only positive numbers, ScalaTest still can shrink it to zero, so an additional constraint is needed to discard invalid input. (Although I don't remember anyone else using generators is Scala at all.)

@hobovsky
Copy link
Contributor Author

hobovsky commented Jul 8, 2022

A translation with custom clues, and sequential execution: https://www.codewars.com/kumite/62c852fc8984fe000eb07db0?sel=62c85c4176acd6000e12037a

@hobovsky
Copy link
Contributor Author

"Comparison of Scala test styles" kumite: https://www.codewars.com/kumite/62defdd51b6b8313b95ec22e?sel=62defdd51b6b8313b95ec22e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation kind/tutorial New Tutorial language/scala
Projects
None yet
Development

No branches or pull requests

2 participants