Spock Web Console

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

Maths

Published 1 year ago by vmj
Actions  ➤ Edit In Console Back To Console Show/Hide Line Numbers View Recent Scripts
class Maths extends Specification {
    def "maximum of two numbers"(int a, int b, int c) {
        expect:
            Math.max(a, b) == c
        where:
            a | b | c
            1 | 3 | 3
            7 | 4 | 4
            0 | 0 | 0
    }
}