rt(counter == 0)

  action
  assert(counter == 1)

  action
  assert(counter == 1)
}
```
]

---
# Test code evaluation

.seventy-two-left[
```scala
test("a def is evaluated every time it is called") {
  var counter = 0

  def action() = counter += 1
  assert(counter == 0)

  action()
  assert(counter == 1)

  action()
  assert(counter == 2)
}
```
]

---
# Parameters evaluation

.forty-seven-left[
```scala mdoc:reset
def sum(x: Int, y: Int): Unit = {
  val result = x + y
  println(s"The sum is $result")
}
``