Skip to content

Instantly share code, notes, and snippets.

object Cell {
def willLive(isAlive: Boolean, neighbourCount: Int): Boolean =
if (isAlive) neighbourCount == 2 || neighbourCount == 3
else neighbourCount == 3
}
case class GridPosition(x: Int, y: Int)
object Game {
@ikusalic
ikusalic / notes_on_testing.md
Created October 24, 2013 21:12
Exploration: how to do unit testing

Testing notes

Uncle Bob: Test First

Source: http://blog.8thlight.com/uncle-bob/2013/09/23/Test-first.html

  • tests are specs for the system and are more important than the system itself
  • (Tests should be) short, well factored, and well named. They ought to read like specifications; because they are specifications
  • (Goal:) trust your test suite to the extent that, if it passes, you know you