Sha256: 636c8eb3c0be1cb5e1f78a8ef4c2a24060717e25b7460b5a9ff20637cd00b47e

Contents?: true

Size: 1.94 KB

Versions: 209

Compression:

Stored size: 1.94 KB

Contents

{
  "exercise": "trinary",
  "version": "1.0.0",
  "cases": [
    {
      "description": "returns the decimal representation of the input trinary value",
      "cases": [
        {
          "description": "trinary 1 is decimal 1",
          "property": "toDecimal",
          "input": 1,
          "expected": 1
        },
        {
          "description": "trinary 2 is decimal 2",
          "property": "toDecimal",
          "input": 2,
          "expected": 2
        },
        {
          "description": "trinary 10 is decimal 3",
          "property": "toDecimal",
          "input": 10,
          "expected": 3
        },
        {
          "description": "trinary 11 is decimal 4",
          "property": "toDecimal",
          "input": 11,
          "expected": 4
        },
        {
          "description": "trinary 100 is decimal 9",
          "property": "toDecimal",
          "input": 100,
          "expected": 9
        },
        {
          "description": "trinary 112 is decimal 14",
          "property": "toDecimal",
          "input": 112,
          "expected": 14
        },
        {
          "description": "trinary 222 is decimal 26",
          "property": "toDecimal",
          "input": 222,
          "expected": 26
        },
        {
          "description": "trinary 1122000120 is decimal 32091",
          "property": "toDecimal",
          "input": 1122000120,
          "expected": 32091
        },
        {
          "description": "invalid trinary digits returns 0",
          "property": "toDecimal",
          "input": "1234",
          "expected": 0
        },
        {
          "description": "invalid word as input returns 0",
          "property": "toDecimal",
          "input": "carrot",
          "expected": 0
        },
        {
          "description": "invalid numbers with letters as input returns 0",
          "property": "toDecimal",
          "input": "0a1b2c",
          "expected": 0
        }
      ]
    }
  ]
}

Version data entries

209 entries across 209 versions & 1 rubygems

Version Path
trackler-2.2.1.25 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.24 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.23 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.22 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.21 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.20 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.19 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.18 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.17 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.16 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.15 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.14 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.13 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.12 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.11 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.10 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.9 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.8 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.7 problem-specifications/exercises/trinary/canonical-data.json
trackler-2.2.1.6 problem-specifications/exercises/trinary/canonical-data.json