Spock Web Console

subscribe to the feed Subscribe
Max with examples (via #spockwebconsole)
tweet this script Tweet

Max with examples

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

// Hit 'Run Script' below
@Unroll class MyFirstSpec extends Specification {
  def "max of #a and #b is #expected"() {
    expect: Math.max(a, b) == expected
    where:
    a  | b  | expected
    1  | 1  | 1
    1  | 2  | 2
    2  | 1  | 2
    10 | 20 | 20
  }
}