Spock Web Console

subscribe to the feed Subscribe
max (via #spockwebconsole)
tweet this script Tweet

max

Published 4 months ago by thomas with tags max
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
import spock.lang.*

// Hit 'Run Script' below
class MyFirstSpec extends Specification {

  @Unroll("The maximum of #a and #b is #c")
  def "expect correct maximum"() {
    
    expect:
    Math.max(a, b) == c

    where:
    a | b | c
    1 | 2 | 2
    1 | 3 | 4
  }
}