Sha256: de54b676da0f3736106f999b7a34eb5013b9852bac966ad17259ad3f19dafae8
Contents?: true
Size: 1.16 KB
Versions: 168
Compression:
Stored size: 1.16 KB
Contents
@Grab('org.spockframework:spock-core:1.0-groovy-2.4') import spock.lang.* class SquaresSpec extends Specification { @Unroll("can square the sum of the numbers up to #integer") def "can square the sum up to the given integer"() { expect: new DifferenceOfSquares(integer).squareOfSums() == result where: integer | result 5 | 225 10 | 3025 100 | 25502500 } @Ignore @Unroll("can sum the squares up to #integer") def 'can sum the squares up to the given integer'() { expect: new DifferenceOfSquares(integer).sumOfSquares() == result where: integer | result 5 | 55 10 | 385 100 | 338350 } @Ignore @Unroll("can subtract sum of squares from square of sums of #integer") def 'can subtract sum of squares from square of sums'() { expect: new DifferenceOfSquares(integer).difference() == result where: integer | result 0 | 0 5 | 170 10 | 2640 100 | 25164150 } }
Version data entries
168 entries across 168 versions & 1 rubygems