Sha256: 940d8cc9a9f80794e52485b56fa15fd6e33a5825935ee1f85defe6fd70cff531
Contents?: true
Size: 462 Bytes
Versions: 122
Compression:
Stored size: 462 Bytes
Contents
package summultiples import "testing" func TestSumMultiples(t *testing.T) { for _, test := range varTests { s := SumMultiples(test.limit, test.divisors...) if s != test.sum { t.Fatalf("Sum of multiples of %v to %d returned %d, want %d.", test.divisors, test.limit, s, test.sum) } } } func BenchmarkSumMultiples(b *testing.B) { for i := 0; i < b.N; i++ { for _, test := range varTests { SumMultiples(test.limit, test.divisors...) } } }
Version data entries
122 entries across 122 versions & 1 rubygems