Sha256: ed42a3d36e7d330cd92b141406e7c5d21c06b14f4a935210bfbd658efefe7946

Contents?: true

Size: 1.93 KB

Versions: 57

Compression:

Stored size: 1.93 KB

Contents

{
  "exercise": "grains",
  "version": "1.0.0",
  "comments": [
    "The final tests of square test error conditions",
    "The expectation for these tests is -1, indicating an error",
    "In these cases you should expect an error as is idiomatic for your language"
  ],
  "cases": [
    {
      "description": "returns the number of grains on the square",
      "cases": [
        {
          "description": "1",
          "property": "square",
          "input": 1,
          "expected": 1
        },
        {
          "description": "2",
          "property": "square",
          "input": 2,
          "expected": 2
        },
        {
          "description": "3",
          "property": "square",
          "input": 3,
          "expected": 4
        },
        {
          "description": "4",
          "property": "square",
          "input": 4,
          "expected": 8
        },
        {
          "description": "16",
          "property": "square",
          "input": 16,
          "expected": 32768
        },
        {
          "description": "32",
          "property": "square",
          "input": 32,
          "expected": 2147483648
        },
        {
          "description": "64",
          "property": "square",
          "input": 64,
          "expected": 9223372036854775808
        },
        {
          "description": "square 0 raises an exception",
          "property": "square",
          "input": 0,
          "expected": -1
        },
        {
          "description": "negative square raises an exception",
          "property": "square",
          "input": -1,
          "expected": -1
        },
        {
          "description": "square greater than 64 raises an exception",
          "property": "square",
          "input": 65,
          "expected": -1
        }
      ]
    },
    {
      "description": "returns the total number of grains on the board",
      "property": "total",
      "expected": 18446744073709551615
    }
  ]
}

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
trackler-2.2.1.105 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.104 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.103 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.102 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.101 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.100 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.99 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.98 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.97 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.96 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.95 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.94 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.93 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.92 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.91 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.90 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.89 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.88 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.87 problem-specifications/exercises/grains/canonical-data.json
trackler-2.2.1.86 problem-specifications/exercises/grains/canonical-data.json