Sha256: 0dc334891395e0758cafff4249fff4675f261c266e8743a2c34e371146151412
Contents?: true
Size: 1.07 KB
Versions: 40
Compression:
Stored size: 1.07 KB
Contents
package grains // Source: exercism/problem-specifications // Commit: d4554e6 grains: fix a typo in comments of canonical data // Problem Specifications Version: 1.0.0 // returns the number of grains on the square var squareTests = []struct { description string input int expectedVal uint64 expectError bool }{ { description: "1", input: 1, expectedVal: 1, }, { description: "2", input: 2, expectedVal: 2, }, { description: "3", input: 3, expectedVal: 4, }, { description: "4", input: 4, expectedVal: 8, }, { description: "16", input: 16, expectedVal: 32768, }, { description: "32", input: 32, expectedVal: 2147483648, }, { description: "64", input: 64, expectedVal: 9223372036854775808, }, { description: "square 0 returns an error", input: 0, expectError: true, }, { description: "negative square returns an error", input: -1, expectError: true, }, { description: "square greater than 64 returns an error", input: 65, expectError: true, }, }
Version data entries
40 entries across 40 versions & 1 rubygems