Sha256: c1429e04da0d966de8772caf05b708f5731cb2fc1bf7841d1eed530d8f281ac8

Contents?: true

Size: 1.47 KB

Versions: 11

Compression:

Stored size: 1.47 KB

Contents

{
  "valid": [
    {
      "description": "single digit strings can not be valid",
      "input": "1",
      "expected": false
    },
    {
      "description": "A single zero is invalid",
      "input": "0",
      "expected": false
    },
    {
      "description": "simple valid sin",
      "input": " 5 9 ",
      "expected": true
    },
    {
      "description": "valid Canadian SIN",
      "input": "046 454 286",
      "expected": true
    },
    {
      "description": "invalid Canadian SIN",
      "input": "046 454 287",
      "expected": false
    },
    {
      "description": "invalid credit card",
      "input": "8273 1232 7352 0569",
      "expected": false
    },
    {
      "description": "valid strings with a non-digit added become invalid",
      "input": "046a 454 286",
      "expected": false
    },
    {
      "description": "punctuation is not allowed",
      "input": "055-444-285",
      "expected": false
    },
    {
      "description": "symbols are not allowed",
      "input": "055£ 444$ 285",
      "expected": false
    },
    {
      "description": "single zero with space is invalid",
      "input": " 0",
      "expected": false
    },
    {
      "description": "lots of zeros are valid",
      "input": " 00000",
      "expected": true
    },
    {
      "description": "another valid sin",
      "input": "055 444 285",
      "expected": true
    },
    {
      "description": "nine doubled is nine",
      "input": "091",
      "expected": true
    }
  ]
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
trackler-2.0.7.0 common/exercises/luhn/canonical-data.json
trackler-2.0.6.44 common/exercises/luhn/canonical-data.json
trackler-2.0.6.43 common/exercises/luhn/canonical-data.json
trackler-2.0.6.42 common/exercises/luhn/canonical-data.json
trackler-2.0.6.41 common/exercises/luhn/canonical-data.json
trackler-2.0.6.40 common/exercises/luhn/canonical-data.json
trackler-2.0.6.39 common/exercises/luhn/canonical-data.json
trackler-2.0.6.38 common/exercises/luhn/canonical-data.json
trackler-2.0.6.37 common/exercises/luhn/canonical-data.json
trackler-2.0.6.36 common/exercises/luhn/canonical-data.json
trackler-2.0.6.35 common/exercises/luhn/canonical-data.json