docs icon indicating copy to clipboard operation
docs copied to clipboard

HOWTO create a Scala kata

Open hobovsky opened this issue 4 years ago • 3 comments

  • 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 avatar Jul 13 '21 19:07 hobovsky

  • 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.)

error256 avatar Jul 13 '21 21:07 error256

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

hobovsky avatar Jul 08 '22 16:07 hobovsky

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

hobovsky avatar Jul 25 '22 23:07 hobovsky